> > No . Its a request config. The View stashes in the template arg "base"
> > before it processes it.
>
> I don't know what you mean here.
>
I just mean that you set it by saying "$r->config->{uri_base}". And
that setting is put into a template variable called "base" in the
Maypole::View::Base::vars sub.
> I haven't thought about it but off the top of my head I'd prefer:
>
> link = $obj->config->uri_base . "/" . $obj->table;
>
> or better yet:
>
> link = $presentation_object->link;
>
Where object is "Presentation" Type right ? I like that too. Let me
see if I can sum up the structure you have in mind:
Controller -- Handles apache request controls dictates flow.
Presentation -- Presents the web interface to the model. Defines
actions, the uri base for this model, and form inputs (?). Sets
template variables. Delegates data manipulation to model.
Model -- Simple a plain class used to manipulate data in a table. Can
be used outside maypole without issue and knows nothing about Maypole
or anything else in the framework.
View -- Maypole::View type class and the templates
That sound about right? Makes sense to me. Simon actually said he
should have separated out the actions from the model. I did not fully
appreciate it at time but I see the benefit now.
Except for one thing: It is trivial to set up a cdbi class on a table.
How much of the code do you actually reuse across Maypole and non
maypole processes ? . The part I use outside of Maypole is simple the
3 or 4 lines of code to setup the class across the db in general but
I could see how you could share more model activity than that.
At any rate it seems it would be fairly simple to factor out a
Presentation layer. Could base presentation on the model class or
have it delegate to it. I think i like delegation but that may make
some backward incompatibilities. I wonder what Catalyst does ?
cheers,
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Maypole-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-devel