[Catalyst] Why scaffolding? Validation and Learning

Zbigniew Lukasiak zzbbyy at gmail.com
Sat Aug 19 11:04:18 CEST 2006

The subclassing of templates sounds really interesting, but actually I don't
have many strong convitions on this front - I think we need some more

Or perhaps I have one idea about the templates.  I found it really simpler
to code some more complicated parts as perl functions, put them on the stash
and then use them as kind of macros in the templates, than coding it in the
templating language.


On 8/18/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
> Zbigniew Lukasiak wrote:
> > Some more technical details.
> >
> > The main idea of how the scaffolding should work is that we generate
> > only a skeleton of directories, nearly empty controllers and some config
> > stuff.  The generated controllers  only contain their package
> > declaration and a 'use base Catalyst::Example::Controller::InstantCRUD'
> > line. So there is not that much of generated code here.  After the
> > controllers are generated users are expected to copy the methods that
> > they want to modify from the Catalyst::Example::Controller::InstantCRUD
> > superclass - doing that they are taking responsibility for the copied
> > code.  This way the main Instant controller, which is just a standard
> > library and can be updated with standard means, is also an integral part
> > of the example.  The copying perhaps is not such a trivial step - but in
> > fact should be pretty natural for people working with Object Oriented
> > code - it's just overwriting of SUPER class methods. I am also planning
> > to make it more intuitive by the way of documentation.
> >
> > This is the theory - in practice the config stuff required to have a
> > working application is a bit big, but we are working on it.
> >
> > A separate thing are the templates for the views, in the current CPAN
> > version they are treated in a similar way that the controllers - the
> > users are expected to just copy the generic templates from the
> > InstantCRUD directory and modify them to their liking.  There were
> > people on this list complaining about this and in the svn version now we
> > create the basic templates in the generated application.  This means
> > problems with the templates when upgrading the library, but perhaps we
> > need to treat the templates separately from the code and expect them to
> > be really quickly rewritten by the programmers.
> We have an approach that allows standard templates to effectively be
> subclassed; once it goes to public announce I'd love to have your opinion
> on
> them since templates are the hardest issue for scaffolding and it's clear
> you've done a fair bit of thinking about it.
> None of what I'm saying denigrates InstantCRUD - it's a very
> well-implemented
> Scaffold and I recommend it to people regularly. I just think it's
> possible to
> achieve the same things a better way.
> --
>       Matt S Trout       Offering custom development, consultancy and
> support
>    Technical Director    contracts for Catalyst, DBIx::Class and BAST.
> Contact
> Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more
> information
> + Help us build a better perl ORM:
> http://dbix-class.shadowcatsystems.co.uk/ +
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/

Zbigniew Lukasiak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060819/654ed069/attachment.htm 

More information about the Catalyst mailing list