After using bake a bit, and modifying the resulting files to build our
latest admin panel for a 35 table app with access control, paging,
ajax, various field data types, etc., I thought I would share some
musings, and see what people think.

Firstly, I came to realize that, for an app of medium complexity,
baking (unless I am using it wrong) doesn't save as much time as I
thought, relative to the total time to bring an admin panel to full
production quality.

It does create a prototype admin panel very nicely and almost
instantly, so for simple apps it is the holy grail - but I'm finding
the additional time to bring the admin panel to product quality, after
bake is done, requires much more work.

What were the changes I was making to the baked files?

For the view, partly styling, partly markup changes, partly logic.
Things like:

- changing all the column titles to English;
- deleting unneeded columns;
- changing some input fields to dropdowns and/or selectTags/radios/
checkboxes etc.;
- removing code for unneeded "related" models;
- adding javascript for date selectors;
- adding ajax observeField;
- setting the column widths of each field;
- making labels boldface;
- capitalizing first characters of names;
- centering certain columns;
- adding certain print formats for things like prices;
- formatting/commenting the view code so I could work with it more
easily to do all this,
- etc., etc.

Then for the controllers, I had to:

- add access control
- set the layout
- add custom validation
- add code to pass certain stuff needed for navigation menus
- add flash messages
- ajax actions
- format/comment the code to be able to work with it more easily.,
etc.

So, all the above modifications would take a significant amount of
additional time for each file. I realized if I were to bake all my
views and controllers, and then have to make all these additional
modifications to each one, times 35 tables, it would take far too
long.

Another factor was the time to launch bake and answer all it's
questions - without making any mistakes, and do that 35 times.

So, I decided to only bake the first controller and view, a
representative selection of a "typical enough" one with a typical
number of  associations, then made all my changes to that controller
and view file.  After the changes were made, I simply copied and
pasted that controller and view for the remaining 34 controllers and
views, and did global "search and replace" on the model/controller
names in that file to make it work for that model/controller. Then
went to work making the file-specific changes for that file.

I think doing it this way saved me time over baking everything. Even
after that, there was still some fine tuning required.

This is in no way a criticism of bake or cakePHP.

I love both and wouldn't develop any other way. Cake is the best. The
developers of cake are smarter and more experienced than I am, and I
certainly could never do near as excellent a job as they have done.

Cake is, and will be, my development framework of choice.

But, I thought I would pour some cold water of reality on myself, and
realize bake does not speed up development by "orders of magnitude" as
I have heard said. Perhaps for small simple apps, but I don't see how
as the admin panels get larger or more complicated.

What are other people's experiences with apps of a few dozen tables,
different data field types, searching/sorting, access control, ajax,
etc ?

Were you able to get more mileage out of bake than I've described?

(again, no lack of appreciation here, I fully realize my development
on the whole is faster and of higher quality by using cake)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to