views:

277

answers:

3

Hi There

I know some PHP and now I'm the stage of choosing a framework. After some diggs, I've find that CakePhp is a good choice. After some manual/tutorial readings and trying some cakephp code samples I'm wondering myself about how good is the idea of naming convention used by CakePHP.

They are using the term: "convention over configuration". What do you think about this (give me your pro/cons opinions )?

Many thanks.

A: 

This question is a duplicate.

André Hoffmann
+1  A: 

It means you only need to specify unconventional aspects of the application.

karim79
+1  A: 

If you don't have any experiencie and you don't have the habit of use a naming convention maybe is a good choice. For me, always is good have some kind of convention in code and filenames. And a framework with that philosophy like Ruby on Rails once you now the convention the development of your web app could be really fast. But for choose a framework there is another things that you should analyse. For example perfomance, realiability, resources in the web, etc.

l2mt
many thanks l2mt for your replay. Do you have some bad opinions about CakePHP in terms of performance, realiability ....
dole doug
Mmm... Maybe in perfomance a little... it depends... Retrieving data from the database could be slow but I think that it's because Cakephp is like an ORM too.. You don't get only the data of one table... if there is a relation between tables you get the data from the other table too.. For example if you get data from categories you get the products of each category too... But this you can configure in some file that I don't remember... I'm not an expert in CakePhp so I can't talk about reliability and perfomance in detail... I hope my comment help you :)
l2mt
Performance issues related to grabbing too much data can be done by setting recursion levels before submitting, or explicitly defining the fields you want to grab. That, along with CakePHP's caching system, makes Cake pretty snappy from my experience.
spelley
as said from the comment above performance issues from grabbing too much data can be "fixed" by specifying which fields to return. take a look at containable behavior ( http://book.cakephp.org/view/474/Containable ) as well as linkable behavior ( http://blog.rafaelbandeira3.com/2008/11/16/linkable-behavior-taking-it-easy-in-your-db/ ). I found I had to use Linkable behavior because Cake's Containable behavior was not joining the tables. Instead it was breaking down what normally would be 1 join query into 30+ small queries.
centr0