You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by James G Smith <JG...@TAMU.Edu> on 2002/06/10 23:47:13 UTC

Re: separating C from V in MVC

Valerio_Valdez Paolini <pa...@students.cs.unibo.it> wrote:
>
>> Ray Zimmerman wrote:
>> So how is everybody else handling URL mapping?
>
>On Mon, 10 Jun 2002, John Hurst wrote:
>
>> In the filesystem. Directly requested .tt files are all sent to a
>> default template handler:
>[...]
>> % cat admin/proj-edit.tt
>> [% Ctrl.DBEdit.run(ObjectType => 'Project') %]
>
>I used html pages with augmented tags parsed by a standard handler:

I'm doing something similar, but using a database (and caches) for
url<->filename mappings (usually to Mason components, searching the
component root path) and then using a filter in the autohandler to
change urls of the form "comp:docs/index" to a url that maps to that
component.

This lets me rearrange the public view of the site without moving any
files and allows me to rearrange the files without changing the
public view.

I'm working on a framework that will use the Mason component as the
controller, Perl modules as the model, and either Mason components or
TT templates called from the controller as the view.  The view would
output XML that would then be put through AxKit or similar by the
autohandler to add style information and produce HTML or whatever
format we needed.

The end result is that the work-code (model) is indepenent of
interface, the controller is independent of view, and the view is
somewhat (via XML) independent of look&feel.

I don't have benchmarks yet to demonstrate its non-scalability.
-- 
James Smith <JG...@TAMU.Edu>, 979-862-3725
Texas A&M CIS Operating Systems Group, Unix

Re: separating C from V in MVC

Posted by Valerio_Valdez Paolini <pa...@students.cs.unibo.it>.
On Mon, 10 Jun 2002, Matt Sergeant wrote:

> > It seems perfect for mod_perl2. Really interesting, xml appears to be
> > the final destination for most of us, even if now i prefer objects.
>
> There's no conflict between using XML and using Objects if you're using AxKit.
> Especially thanks to Simon Cozen's nice new taglib.

I know also this; i subscribed Axkit ml on 31 May 2000, but still does not
have the courage to look at xml and co. :) I'll post a question on the
other ml, ok?

Ciao, Valerio



 Valerio Paolini, <http://130.136.3.200/~paolini>
--------------------------------------------------
 what is open-source about? Learn, and then give back


Re: separating C from V in MVC

Posted by Matt Sergeant <ma...@sergeant.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 10 June 2002 11:09 pm, Valerio_Valdez Paolini wrote:
> On Mon, 10 Jun 2002, James G Smith wrote:
> > I'm working on a framework that will use the Mason component as the
> > controller, Perl modules as the model, and either Mason components or
> > TT templates called from the controller as the view.  The view would
> > output XML that would then be put through AxKit or similar by the
> > autohandler to add style information and produce HTML or whatever
> > format we needed.
>
> It seems perfect for mod_perl2. Really interesting, xml appears to be
> the final destination for most of us, even if now i prefer objects.

There's no conflict between using XML and using Objects if you're using AxKit. 
Especially thanks to Simon Cozen's nice new taglib.

- -- 
<:->get a SMart net</:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9BSVWVBc71ct6OywRAtMWAJ94l9mq+ZMWduAMHRD81mHV+a0V7gCgg/bP
jPXqIBNKQD64RDnDRLatSBM=
=wH5R
-----END PGP SIGNATURE-----

Re: separating C from V in MVC

Posted by Valerio_Valdez Paolini <pa...@students.cs.unibo.it>.
On Mon, 10 Jun 2002, James G Smith wrote:

> I'm working on a framework that will use the Mason component as the
> controller, Perl modules as the model, and either Mason components or
> TT templates called from the controller as the view.  The view would
> output XML that would then be put through AxKit or similar by the
> autohandler to add style information and produce HTML or whatever
> format we needed.

It seems perfect for mod_perl2. Really interesting, xml appears to be
the final destination for most of us, even if now i prefer objects.

Ciao, Valerio


 Valerio Paolini, <http://130.136.3.200/~paolini>
--------------------------------------------------
 what is open-source about? Learn, and then give back