First you scaffold...
then you write the methods you want to actually implement
then you turn off scaffolding.
then you haven't repeated yourself ;)

I don't actually bake the default CRUD because it doesn't "fat model" at all
and I end up needing to rewrite a bunch of stuff that was baked....

On Fri, Jan 28, 2011 at 5:41 PM, keymaster <[email protected]> wrote:

> Although I have been developing with cake for some time (generally
> loving every minute), I have never understood the rationale for cake’s
> bake utility duplicating so many nearly identical copies of every
> action and every view all across your system, in a seemingly total
> contradiction of DRY principles.
>
> Why would you want basically the same code duplicated all across your
> app?
>
> Wouldn’t it be smarter for bake to create a single instance of generic
> crud ops in the AppController, with a single admin_index.ctp
> configurable for  cols, labels, models, error msgs, fields, etc. and
> if there is nothing configured, it defaults to what it can learn from
> the database?
>
> The generic actions/views could always be overrided in specific
> controllers.
>
> Anyone have a clue why bake works this way?
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected]<cake-php%[email protected]>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to