My First Contact With CakePHP

Meta: February 26th 2009 // CakePHP // 74 views

If you have been reading the blog lately you will of noticed that I have changed my development path from Django using Python to CakePHP, tada, using PHP. I spent quite alot of time attempting to elarn both Python and the Django framework together. Much like learning Ruby on Rails or another language and framework combination, if you don’t know the language before dealing with the framework the learning curve can be quite high, in my experience and opinion. So I decided to jump back into PHP and find a framework that suits what i need and how i work. One of my good friends recommended that i take a look at CakePHP. So i did.

Before i got started with CakePHP however i decided that i had better take a look at other frameworks i had heard were like CakePHP. Two of them was Symfony and CodeIgniter. Not hearing much about Symfony but a fair bit on google about CodeIgniter i decided to look up comparisons as to when to use CI and when to use CakePHP. I wanted to stear clear of libraries and instead work closely with a firm Model View Controller (MVC) methodology. Alot of the posts, infact all that i read, pointed to CodeIgniter being awesome for smaller projects as it can be considered a bit of a box of magic tricks. From what i read CI is more so a library kit with standardised methods, whereas CakePHP is a strong framework which still has the automagic found in CI.

So i bought a bunch of CakePHP books and began to read through the structure of MVC design patterns and how to use CakePHP with models, controllers and views, along with its helpers, actions, behaviours, elements etc. CakePHP is amazingly easy to pick up. The structure of accessing the models, and structuring the models is amazing. I think this is where most of the magic comes into it. Form validation is generated and controlled through the model definitions, handled through controllers and displayed with the views. I like this method of putting alot of weight on the Models access, it reinforces the proposed database structure and enforces data integrity. Instead of dealing with regexs in the controller across many controllers that access the same models and possibly a bunch of different views and their forms.

This is a bit of a ramble post i know. Its a bit late and time for bed. I just wanted to do a quick post on how much i’m enjoying the development speed, impressive structure and logic that i work with, with CakePHP. I think if i had still been carrying on with Django, although impressive, i would still be losing hair at a much faster pace that i am now! Only a week into CakePHP and i can easily say my project is around the 40% mark :) Yay! Sorry for the rambling, it is indeed time for bed, hope to get some time to write a well structured post and not just a blog entry.

Tags: , , , , , , ,

WeDecal.com

Postscript: Leave A Comment // Subscribe (RSS Feed)

Want To Be Heard? Comment Here!

// I Love Comments, Especially Nice Ones

Who Are You?

Your Email Address

Your Website

:D :) :o :eek: :( :lol: :wink: :arrow: :idea: :?: :!: :evil: :p

You can follow any responses to this entry via its RSS comments feed. You may also leave a trackback by clicking this link.