CakePHP: Initial Thoughts
Despite my previous proclamations, I'm not actually against the idea of using a framework (and in case you're actually not sick of hearing about it, I might have another framework post up my sleeve). But let me set that issue aside. This is really about CakePHP. And I've decided to jump in head first for this project I'm working on.
For those of you unfamiliar with it, it's yet another MVC framework, much like Ruby on Rails and Django, except it's in PHP. Keep in mind, this article isn't a comparison of CakePHP versus these other frameworks but simply to highlight what I like or don't like about my limited exposure to the framework so far.
Getting set up
Installation was nice and smooth. I dumped the download into a folder on my dev server and loaded up the page in my browser. Much to my surprise, there was a page greeting me telling me what to do. No database configuration information. Off I went to configure the database. I created an empty database and came back to refresh the page. A nice message told me it could connect to the database. It also points me to how to change the layout and the content for the default page. How helpful! Changing the default look and feel for the application was a cinch and reading up on how to change these defaults gave me a greater sense of how the entire application works.
Just for fun, I went to a dummy url. And wouldn't you know it... more helpful information. It tells me how to create my controller with a nice little code example and where to put it. Once that's done, and I refresh the page, it tells me my model is missing - once again with code and location. Refresh. It tells me I need a table. Refresh. I need a default action for my controller. Refresh. Now it tells me I need my views. Who needs documentation when it tells me how to do everything?
An aside: I'd be incredibly impressed if it had a wizard that let me create the shell for all of this automatically; including a wizard for setting up the database table for the model.
Now that I actually need to program something, I delve into the documentation. Unfortunately, this is where things begin to falter. The site is a little scattered. Documentation lies in one of three places: Manual, API, and Wiki. Although, plans are in the works to replace the Wiki with the Bakery, which seems to be a centralized place for people to post CakePHP articles.
The manual is pretty good but is light on content with some sections missing entirely. The wiki, on the other hand, seems to have more content but feels clunky and has numerous errors — usually grammar but even weird things with words or sentences appearing out of place, like some drag and drop gone wrong.
I'm just getting into things so I hope to be able to report more on this framework.