Bake me a Cake

February 12th, 2006 at 10:42 pm

Initial thoughts on trying to work with the Cake PHP Framework (read: Ruby on Rails in PHP)…

  • The documentation sure is lacking
  • Why doesnt the ‘bake’ script have a ‘–help’ (or any other help type switch)?
  • I refuse to name my db table primary keys as ‘id’. In my opinion it should always be singular-table-name+id, i.e. ‘Users’ table β†’ userid (or user_id), ‘Books’ table β†’ bookid, etc. Is this an normal “Active Record” thing (it seems thats how RoR does it too)? I see that Cake may support the defining of primary key names, but I’m somewhat concerned this will complicate the association magic of it’s ActiveRecord implementation. Again, it’d be nice to have some clear documentation on this.
  • The rd11 programs are interesting resources for fully functioning Cake apps, but so nearly completely uncommented it’s unfortunate (at least, rdBloggery is).
  • I really wish it had some sort of drop-in user system. RoR’s Login Engine looks really nice, and as a ‘rails engine’ it is “a way of dropping in whole chunks of functionality into your existing application without affecting any of your existing code. [Engines] could also be described as mini-applications, or vertical application slices – top-to-bottom units which provide full MVC coverage for a certain, specific application function.” (Introduction in Rails Engines)

Anyways… Overall, I’m not completely dissatissfied with the experience, but the above are really making it more of an uphill battle than it needs to be, especially since, after having read several different cake reference resources for days, once I finally had my ‘Ah-ha’ moment, I had something working after only an hour of work. One of the beautiful things about PHP is it’s online documentation. I’ve pretty much earned my living for the last few years using a language I learned almost entirely through the online documentation (plus a good 10 years of computer programming experience to build-upon, but still! :P )