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.

--
Zbigniew Lukasiak
http://brudnopis.blogspot.com/
_______________________________________________
List: Catalyst@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/

Reply via email to