The way I see it Website development (PHP, JS, MySQL) by Damian Sromek

26Oct/110

PHPCon PL 2011 – Yii Framework – just another MVC or maybe small revolution? (Krzysztof Maziarz)

Yii logo
The author of the presentation was trying to convince us that Yii Framework is all that we ever needed for website development.
All features of that framework will let you do anything you want and to do it really fast.

I've heard of that framework many months (or maybe even few years) ago. I've looked at it a bit but I was not convinced it's so much better than the other frameworks.
After that presentation I've decided to take a bit closer look. That's what I think about it.

Pros:

  • It lets you create a web application really fast. A lot of the code can be autogenerated so you have to just adjust it to your needs.
  • Code easy to understand and use. Behaviors.
  • Prepared for testing (PHPUnit).
  • Good documentation. Sample applications included so you can see in practice how an app looks like.

Cons:

  • Active record - it's easy to use but it often does not work efficient enough for heavy loaded apps.
  • Not as "loosely coupled" as some would like it to be.
  • No dependency injection container.

After just few hours spend on getting familiar with that framework I could recommend it for small or medium projects.
If you need to create fast not so complex webpage this framework will definitely help you with that.
It's using many where known solutions (eg. Active Record, MVC) so person familiar with that should not have problems with starting using Yii.

I would not recommend it for big projects where you want things really decoupled, independent and testable.
I think dependency injection container, Doctrine 2, totally independent parts (modules, bundles - whatever you call it) that can be easy configured (eg. with annotations) are what makes your life easy and beautiful.
Yes, I'm thinking about Symfony 2 (and maybe Zend Framework 2 soon) when I think about framework for big projects.

I think Yii authors will change it so it will look more like "modern" frameworks (eg. Symfony 2) if they would want it to be widely used in big projects. Right now Yii is using well known solutions that are also well known to be NOT enough when there's huge amount of code, modules, functionality etc.

But I haven't used Yii. Maybe I'm wrong. But this framework definitely did not make such a big and good impression on me as Symfony 2 did.

Twitt

Facebook comments:

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.