CakePHP

It has been quite a while since I have last messed up with CakePHP but recently due new projects CakePHP has come into my horizon again.

As usual, before facing a project, I always study the environment, the frameworks and everything that can help me jump-start and today I was a bit impressed with CakePHP.

Basically the MVC structure is there, but, at least at first, there isn’t much you need to do to work it up. Create your Model that will hold the table information, you will need to create the controller that will hold your actions and finally the views.

What impressed me the most on Cake was the model layer.

Take for instance the Model class Cars. The file name will be called cars.php (under the models directory) and the table name will be cars. If every variable that you have match the column name, there is nothing else you will need to do to construct a brand new model. In another words instead of programming 8 hours for a full model class, you will program 1 hour. In the business world this means profit.

Another amazing function that CakePHP provides to talk directly to the Model class without you even seeing anything of a query is the find.all function.

Check this line of code:

$this->set(‘cars’, $this->Car->find(‘all’));

Basically you are telling in the Controller that you will be setting the view variable cars with all cars that the Model class can find.

I will keep this post short, got get back to the coding and study, but here is how I will rate CakePHP:

  1. MVC:
  2. Routes:
  3. Controllers:
  4. Views:
  5. Models:
  6. Config:
  7. Installing:
  8. Database Config:
  9. General Config:
  10. Comparison to Zend Framework: Not yet rated (after I complete the full app, I will be able to rate this)
Advertisements

About mcloide

Making things simpler, just check: http://www.mcloide.com View all posts by mcloide

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: