nazly.me

Weblog of Nazly Ahmed

Nazly Ahmed

Nazly Ahmed

Web Developer. PHP Addict. Wordpress Hacker. FOSS Enthusiast. (Micro)Blogger. Photo Hobbyist. Cricket Fanatic. Husband. Dad.

In the recent poll results of the International PHP Magazine, CakePHP has ranked on top with 56.1% votes as the most favorite PHP Framework. I'm not really a Framework fan but have been digging lately a bit on CakePHP. I personally don't use a particular Framework but have been building lot of classes and functions that help me in increasing the speed of my development.

What is Cake?

Cake is a rapid development framework for PHP which uses commonly known design patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility.

Initially it looked too complicated but once I sat down and read through the manual I was good to go. After reading couple of tutorials I was more on track and started doing little little stuff on my local machine.

Here are couple of tutorials that helped me to get going with CakePHP.

The Cake Blog Tutorial

Cook up Web sites fast with CakePHP

After developing few sample applications I figured out the advantages of using a Framework. Here are some of the features I love in CakePHP. I'm still in the early stages so it will be a very short list of what I have gained so far.

MVC Pattern

The MVC pattern is heavily implemented in Cake. It lets us separate our Model, Controller and View. So our application can be broken down and the code becomes more maintainable.

Read More about MVC Pattern

Scaffolding

I really like the scaffolding feature in Cake. It quickly lets us build CRUD operations of our application with very minimal amount of coding based on the design of the database. When I say minimal amount I meant it only required me to declare the variable called $scaffold in my controller. Thats it. Of course there is very less amount of flexibility using Scaffolding but its really a handy way to get a prototype model going.

Bake Script

Bake is a command line PHP script that will auto magically generate a model, controller and views based on the design of the database. After running the bake script, files are generated and written to the file system. Then we can start doing modification to those files which can be a handy method for starters.

I will post more on this topic when I get familiarized with it. Your comments on CakePHP will help me a great deal in learning more about this framework.

Posted on 18th May 2007 09:26:48