CMS usability. A core programmer view

After a long gap i am return to blog. Last time i am here talking about synfony and linux. Now i working on drupal cms for since last six months.
It is always a question in front of a php person if using a cms compared to framework or core programming is good approach.
While cms are good RAD tools. You can make applications in few days/week which will take month to complete using core or even framework.
Cms are also very rich through their plugin system. So  customizaton is easier if using fine plugins.
They have the advance cache management.
But not all things was cms is not right. They are very unflexible to their architecture. Customization is not always easy. Some time small functionality requires big work to done.
They used database for load all content which includes html also. So even small application have big db space.
Caching is just not a feature but a requirement even into development period. This can be a advantage of frameworks which can work without caching in development mode as they use only required db space.

So in case of complex projects it is not always wise decision to use cms. But project have requiring good content management and little customization are better suitable to cms.

Relational v/s Object Sql Model in PHP

Im confusing about using relational or object model for database in programming languages. while relational model is tradional, simpler, fast and easy. But It is very bad practice for frameworks where good coding standards are requirement. Object Model is good in this case but it make developer life more complex. and most of object model also lack of completeness for all sql statements in general. One example is UNION statment which is not an easy in Object Model to implement. and Also performing subquery using OM is also a big challenge.

Let see an example For Sql Query

Relational Model :

$q = “SELECT id, name FROM tbl_test WHERE id=1”;
$query = mysql_query($q);
$row = mysql_fetch_row($query);

Relational Model :(Using Symfony Framework)

$c = new Criteria();

$c->add(TestPeer::ID, 1);

$RS = TestPeer::doSelectRS($c);
Now you can see the elegantness but complexity of OM.