--- Simon Cozens <simon at simon-cozens.org> wrote:
> Peter Speltz:
> > My real maypole question here is Why not have a dumb object by default?
>
> I don't believe there's a good reason to. This is, after all, what
> Template::Plugin::Class is for.
>
Assuming maypole can make a dumb object of the class as easily as i think it
can, I see several reasons.
Efficiency: In the process function Maypole already knows what type of class
you want to create. So just make a dumb one there instead of later in the
templates. Saves a couple of lookups and some code writing and maintenance.
Convenience: You don't have to remeber to put [%USE class . . .%] in your
header somewhere.
Extensibility : How do you know what class you want to use?
classmetadata.class didn't give anything to me in the "customer/list/" page.
I'm sure there's a way but it take a few minutes to figure it out and take some
more code.
Easier: Beginners can just use it instead of having to plugin something and
then figure out how to get the class name they are working with from the
template data. Granted they should learn this stuff anyway but if you're just
Prototyping a Proof of concept you don't want to be hung up on this kind of
stuff. My server won't start now after installing the Plugin cause of this
error:
Template::Stash::XS object version 2.13 does not match bootstrap parameter 2.14
at /usr/lib/perl5/site_perl/5.8.3/i586-linux-thread-multi/Template/Stash/XS.pm
line 22.
Many People will Use it: Unless my design is flawed, i think like me, many
people will want stuff like default values and options for a model class
accessible from the class itself and thus will need the object before they
actually put a new one in the database.
Independent Functionality: One less module people need to install in order to
get the functionality they want out of Maypole.
That's my two cents. I'm not saying change maypole. I can subclass it. But why
not?
> > The other why the hell doesn't what Simon said work for me. I think there's
> a
> > plugin i may need. Let me go look for it.
>
> Yeah, you probably won't be able to use Class if you don't have it installed;
> sorry, but that's how it goes.
>
> --
> dd.c: sbrk(64); /* For good measure */
> - plan9 has a bad day
>
> _______________________________________________
> maypole mailing list
> maypole at lists.netthink.co.uk
> http://lists.netthink.co.uk/listinfo/maypole
>
=====
pjs
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail
_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole
This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:56 GMT