Which PHP framework should I choose between ZendFramework or YII?
Points I need to consider:
- Performance (assuming an accelerator is used)
- Documentation
- stability of framework
- less to code.
Which PHP framework should I choose between ZendFramework or YII?
Points I need to consider:
As I, myself, ventured into a similar question lately I'll share my thoughts with you.
Yii is relatively new in contrast with other frameworks, so it poses a risk regarding availability in know how and longer production runs with it. It also lacks features.
Zend framework is backed by Zend itself, lots of companies are using it in a day to day basis, lots of great documentation and rich feature set. There are two pitfalls though as I've seen from my experiments. One, there is no special way in how you'd do the thing in the "right way" - it is pretty much flexible to your ways. I see that as a plus rather than a minus. Second, as with other frameworks you give up performance to MVC layout - it looks like, in case with Zend, more so than with some other frameworks. During my tests it didn't show up as much as I'd thought it would and I am prepared to accept that performance level - even though I have a project that is somewhat heavily loaded with user hits.
Another option I would suggest you to pursue is CodeIgniter. It resembles Zend Framework, but is more lean and performance less hungry. I chose Zend because of a more complete feature set, official backing by Zend and the fact that I liked it when I made tests with it.
However, I would suggest you make a demo with all of three frameworks and see for youself which one you like most. It doesn't have to be a large demo, but try to grasp some of the features you will make in production (authentication, database manipulation etc.) and implement it in different frameworks - answer will come out by itself. Just try it yourself, do yourself a favour - I was looking for an answer all over, but in the end these tests were the one that provided me with one.
It's hard to answer your question based on those four categories. You should really choose a framework based on your project/personal goals not your development ideals. Everyone wants their code to run fast, have great documentation and be stable with minimal lines of code.
Zend is something you choose if you are going to do many projects with it. If you only need a framework for a project or two then choose something else. I would not choose Yii simply because it is new. Using new software always increases the risk of project failure.
To answer your question I would say Yii assuming this is for a personal project and going off of your profile. You will find it much more exciting to work with than Zend.
I know it's not on the list, but I have you had a look at Kohana (http://www.kohanaphp.com)? Kohana is my personal framework of choice for a couple reasons.
I know that Yii is created by the main guy behind Prado and I never liked Prado myself. It is very intelligently designed but I just didn't click with its templating system. Seemed like a case of "smart guys develop smart system that people don't want to use".
That said I am currently evaluating Yii because it does look impressive and is boasts pretty high performance (and it has abandoned the Prado way of templating... well, it has it as an optional feature).
Zend FrameWork is really slow ... Yii is really fast
Zend FrameWork must run on PHP 5.2.X( You can't use Zend_Date or Zend_Locale on 5.1 ) Yii must run on PHP 5.1.X
Zend_Mail has many bug .... shit . and never fix it (v0.1~v1.7) !!
Why so many developer design ZF , but give us slow and bug framework ...
For Performance I use DooPHP, just found out this framework recently. And I use Zend framework components with it since they share the same new BSD license. DooPHP + Zend = Performance + rich list of features
Besides the framework is really easy to get started than Yii or CodeIgniter. IMHO the database ORM in Doophp is very good.
Here is my experience with both.
Performance : Yii wins Documentation : Zend Wins stability of framework : Draw less to code. : Yiiiiiiiiiiiiiiii (ZF is too much espaguetti)
You can achieve the same result with both, but, with Yii it's easier, quick, SIMPLE. And, can it be use some modules from Zend framework, not the entire framework.
zend = windows yii = mac
the author of yii knows what user-friendlyness is. that is a VERY important aspect.
yes, zend got a huge codebase, but just have a look at their online api documentation...than you take a look at yii:s..and that is the difference you should be concerned about.
a userfriendly way will always win over time
I do prefer Yii over all other PHP frameworks.
Yii
has a very good documentation.
is super fast.
gives you great power with strong code controlling.
is not only fast in performance, it is also fast in framework release. Yii core team are releasing very often with a lot of new features.
community is growing rapidly.
is 100% true OOP framework.
Everyone has their own prefer framework but if you choose less code, high performance then I tend to Yii.
Some mentioned that Yii is young but I donot agree as the fact that Yii is the rebuilt of Prado which is even OLDER than Zend consider the time framework is mature enough to use in production environment. Prado has been used 4-5 year ago but its event-driven architecture plus its XML based heavy configuration mechanism make it slow. Yii is rewritten to fix those kind of issues.
Zend is huge as its big name. I think practical minds choose Yii as so many people still using CodeIgniter. The reason is simpler as better and because Zend is a bunch of dependent components it will become slow in moving forward, adding new things as dependency is high.
Personally, I choose a framework for speed and short learning curve. Check out the framework architecture to make sure there is not too much dependency among components and layers are well structured. Don't care additional features such as a a lib to zip/unzip, create feed or connect to Yahoo/Googe API. In this open source world, when you really need those things, you can always found the best for your need as people keep porting good lib from one framework to another all the time.
If you need a sandbox for your project startup, consider FlexicaCMS which is a Yii based CMS. It's pretty fast and has some exceptional editing/customizing features that even Joomla, Drupal or Wordpess don't have.