There are quiet a few frameworks available in the market today. But the big question for a user is to know which framework is to be used and when? I took some time to list some of the comparison between top two LAMP frameworks i.e. Yii and CodeIgniter.
Yii (‘Yes It Is’) is very powerful component-based framework which is used for large scale web applications where as CodeIgniter is for the coders who need a simple web application and it is great for the beginners. Yii is a complete web based development framework where CodeIgniter is just more than MVC framework.
Yii provides powerful cache support where Codeigniter doesn’t. Yii provides more security standards like input validations, output filtering, SQL injection and cross site scripting etc.
Let’s do a quick comparison on these 2 frameworks using following table:
|Database||MYsql, PostGreSQL, Oracle, SQLite||MS SQL SERER 2008 R2, MySQL, PostGreSQL|
|Database Model||Rational Object-oriented||Rational NoSQL|
|Machine Code Generation||Yes||No|
|GII Code Generator||Yes||No|
As per above table, it is clear that Yii is much better than codeigniter but this is not the end of good features of YII. Here are some other characteristics mentioned below which will surly help you in deciding that which framework should be chosen.
Database relations: Yii provides lazy loading which means that you don’t have to write JOINs each time you need to get a value of related table.
Consistency. Yii is better if multiple developers are working on same project.
HTML Grid component: Yii provides Grid component which helps to display content in tabular form.
Translations: Developing multilingual websites in Yii is really easy whereas Codeigniter does not provide such feature.
Yii is more complex than Codeigniter so the people who are new to MVC can start-up from Codeigniter. No doubt, Codegnitier is older framework (hence tested with time) as compare to YII due to which more documents and support links can be seen for Codeigniter. But still Yii has much wide scope and is preferable these days over Codeignite by many.