I didn't mean it has to be perfect but i think this is rather necessary.

I won't be able to say which one is good but at least other framwork like
symfony and zend works like that.
The generator creates database abstraction layer and work on sub class so
that when you decide to change the
relationship or adding extra field you run the generator to remake those DAL
classes. Information of relationship
between tables can be kept on the ini file or xml file so that you don't
have to type or remember like you need to
do with the baker.



On Wed, Apr 13, 2011 at 2:32 AM, euromark <dereurom...@googlemail.com>wrote:

> bake simply isnt GOD
> it just can't guess any possible scenario you want to create.
> especially with some model + foreign_key relations, custom fields or
> even virtual fields etc.
> as soon as you need to change (and you always will!) the baked files,
> re-baking simply forgets all
> your custom changes.
>
> if you want it to be god, go ahead, and try to tweak it this way.
> i bet you will dead end pretty soon.
>
> you need to see bake as a great help at the beginning.
> as a time saver and a coding machine that helps you to get the CRUD
> started.
> everything else after that is your own responsibility (and done
> manually twice as fast as re-baking anyway).
> It is important to have a solid DB structure at the beginning. this
> way, there will be only minor changes.
> If you start up messy you will - of course - run into heavy
> restructuring problems..
>
> abstract classes - while extending the AppModel might be pretty hairy,
> I imagine.
> it also adds another layer. Not sure if others would agree.
> A change to make this a core feature you might want to add as a ticket
> on http://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets
> If possible with a patch. Maybe it will clarify things.
> But I am still not quite convinced that i'll work out.
>
>
>
> On 13 Apr., 08:59, Shinya Koizumi <sh.koiz...@gmail.com> wrote:
> > That's why it's useless.
> >
> > If it's a simple copy-and-paste thing why bother using it?
> >
> > If we want to use the baker to speed up the development I think we need
> > it to generate abstract class for each tables ( probably within /cake
> folder
> > )
> > and you work on the sub class if you want to add extra functions. That
> way
> > you never have to touch the abstract classes
> >
> > On Tue, Apr 12, 2011 at 3:23 PM, euromark <dereurom...@googlemail.com
> >wrote:
> >
> >
> >
> >
> >
> >
> >
> > > you only bake once!
> > > after that you need to manually adjust the relations
> > > its a simple copy-and-paste thing
> > > no need to override (and therefore delete) previous changes
> >
> > > On 13 Apr., 00:07, Shinya Koizumi <sh.koiz...@gmail.com> wrote:
> > > > Well the bake itself works.
> >
> > > > Problem I see is that I usually create a functions in models, but
> later
> > > on
> > > > when I decided to join another table and make the hasmany
> relationship in
> > > > bake
> > > > it will overwrite those functions that I made within the class.
> Instead I
> > > > need to edit manually( to make the relationship ).
> > > > That's why I think bake doesn't really work the way I want to.
> >
> > > > Or yo don't usually change the model classes?
> >
> > > --
> > > Our newest site for the community: CakePHP Video Tutorials
> > >http://tv.cakephp.org
> > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > > others with their CakePHP related questions.
> >
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com For more options, visit this
> group
> > > athttp://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
> cake-php+unsubscr...@googlegroups.com 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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to