Archive for August, 2008
Scaffolding in cakePHP is a very powerful and useful feature. It allows you to set up a prototype of your application within no time.
Although the manual of cakePHP states that’s you shouldn’t take customization of this scaffolding too far, it’s still something that offers a nice perspective in terms of flexible CMS-systems.
Today I did some experimenting with it, just to see how far I could take it.
I’m working on a rather big application: 6 websites managed by 1 CMS. Obviously with a setup like that, you can’t make use of cakes admin-routing anymore. You will need an independent CMS, running as a stand-alone application by itself.
Since the website is very dynamic, tables will come and go on a weekly basis.
In other words, the CMS will need to be very flexible and maintainable:
- controller, view and model subfolders to group related stuff
- controllers, views and models in different subfolders can have the same name (f.i. a dashboardController for each group)
- adding CRUD (Create, Read, Upate, Delete) functionality for a database table by using scaffolding
- choosing the table columns in the index view by setting an array in the controller
- search functionality and paging is taken care of automatically
Once everything will be set up, it should be possible to add the management of a new table in a matter of minutes, with paging, column selection, sorting, searching, and export to MS Excel, CSV and printer.
The whole setup is up and running. It required quite some tweaking of cake and the scaffolding more specifically, but eventually we managed to create a great CMS that fulfills all requirements above.
So are we happy we the result? Yes and no. The fact that we achieved what we wanted is very satisfying of course, but during the whole development process our enthusiasm about cakePHP slowly dropped to a rather low level.
The framework is pretty well documented, but the quality of the documentation is often poor, uncomplete, or outdated. Some modules just don’t work like they are supposed to, and because cake is based on conventions for the most part, it makes it often hard to figure out what is actually going on when things go wrong.
Don’t get me wrong, I’m still convinced it’s a powerful framework with some really great features. I just have the impression that you quickly meet the bounderies of the system once you start using it for more complicated stuff, and then the time consuming tweaking starts… So for now, I’ll let cakePHP mature a bit longer, see how it evolves, and then have another look at it.