CakePHP Modifications is on Temporary Hiatus
I’m going to take a break from my CakePHP modifications project. I am currently working on a project using the Python-powered framework, [Django][django]. Needless to say, just like CakePHP it’s been improving with each and every iteration. Though it’s not even in “1.0″ yet, the features it currently sports are very impressive and, dare I say, inspiring! However, PHP has been my bread and butter for close to 3 years now. Though I have so many gripes with PHP as a language, I still find it useful and it still gets the job done.
CakePHP modifications will continue once I finish my current project and once CakePHP 1.2.x.x gets sorted out.
It’s interesting to see the direction that CakePHP 1.2.x.x is currently taking. It seems that most of the functionality I’m am currently working on with my modifications for 1.1.x.x is in the works for 1.2.x.x. Here’s the short list of features that I really need:
Lazy-loaded models (already backported into 1.1.x.x) — This was one of the major gripes that I had with CakePHP as it loads class files for models that you do not even use. This feature increases performance and reduces memory footprint for very large applications with a large number of models.
Validator classes — This new feature allows for more complex data validation while maintaining the DRY principle. I never liked the idea of using simple regex strings for data validators. What if I wanted to do more complex data validation? (e.g. query a user database if a username already exists) In my old framework, I used validator classes when handling form data. Each form field has its own validator chain and can include as many validator objects as it needs.
i18n and l10n — Because it’s a big world out there and not everyone speaks English. There is now the beginnings of an internationalization and localization API in the framework.
User Authentication — Although it’s not clear yet where this is going, I expect that there would be an extensible authentication framework with support for both simple authentication (username+password) and challenge-response authentication (username+password+challenge token).
Now, if only they could throw in a “standard” regression and unit testing framework and add a generous smattering of metaprogramming constructs into the mix…
I have also been following a very interesting discussion with regards to [using the built-in system ACL in limiting user access to data][acl]. The current ACL system built into CakePHP uses what’s called MPTT or Modified Pre-ordered Tree Traversal to navigate through a network of ACO’s and ARO’s. I have made my own MPTT implementation for the object system in my new CMS.The code for this is not for the faint of heart. Yet, the flexibility that you end up with is well worth the effort.
The current discussion on the list about ACL’s made me look deeper into my MPTT implementation. From what I can gather, it will not scale very well as the number of objects increase as it uses a recursive algorithm when reordering the tree traversal data. So now I’m off to look for a better implementation…
[django]: http://www.djangoproject.com/ “Django Project Home” [acl]: http://groups-beta.google.com/group/cake-php/browse_thread/thread/263d3ffd6fb7533d “Using ACL to limit access to data”
