First look at CakePHP
Finally, I found some time to take CakePHP for a spin. I’ve heard some really good things about it, and I’ve been trying to get some time to try it out. I installed the framework and went through the tutorial on building a simple blog application. I have to say I’m quite impressed.
CakePHP is an MVC PHP framework.
MVC stands for Model-View-Controller. It is what’s called a ‘design pattern’ in the programming sphere. It’s a way of looking at the parts that makes up an application – in this case 3 parts, the model represents the application data, the view represents it’s presentation, and the controller is the glue that ties the data to the presentation. I’m not going to go into detail about this, you can google for plenty of materials about MVC, or just give any MVC framework (like CakePHP) a try and you’ll get the idea.
Bearing in mind, I’ve only just completed the CakePHP tutorial, but this is what I found out about it.
Easy to get it going
Between downloading the installation files and setting it up to run on my XAMPP install probably took about 5 mins to show the CakePHP default screen. The hardest part about it was to turn on my Apache rewrite module, even then, the documentation was quite clear about what I had to do.
Very natural and fast
Clearly, the tutorial has shown that it’s possible to rapidly develop applications. But realistically speaking, the real world apps are not made with one database table. I’m sure it’ll take longer than a few minutes to really pull together a real application. However, between building the same application from scratch and using CakePHP, CakePHP will still win hands-down because a lot of the fundamental stuff has already been taken care of.
Good programming standard
There’s a world of difference between one person developing an application versus a group of people working on the same application. Certain standards needs to be enforced, so that the group can work more efficiently and effectively. This is where CakePHP excels, the underlying framework forces the programmer to adopt a certain conventionof writing their code , this makes it easy for the next guy to come along and pick up where the first guy left off.
Suitable for beginners?
Now that I’ve hands-on on a framework like CakePHP, I would definately look at adopting it and working my next project with it. But are frameworks suitable for beginners learning PHP? I don’t think so. The frameworks adds another layer of complexity to the whole learning process if you haven’t grasped the basics like object oriented programming, etc.
I would say this framework is best for programmers who have completed one or two major PHP applications, and looking to stablize themselves in a standardized approach and improving their productivity in developing applications.