Frameworks, Yii Framework, Zend framework

Yii Framework vs Zend framework 2

Zend Framework and Yii Framework are object oriented web application frameworks written in PHP. Over the recent years Yii has become extremely popular with the developers for implementing large scale secure and fast web applications, better to say, has become number 1 choice for many of them. However with the long-awaited release of Zend Framework 2 (ZF2) that supports all great PHP 5.4 features the position of Yii may sufferJ

So let`s start with the “newborn” Zend Framework 2. In no way it can`t be compared with the older ZF versions as ZF has been totally rewritten. More than 5 years have passed since ZF 1.0.0 release! Zend framework 2 includes almost all the advance PHP features which have taken the framework to the next level.

Some of the great features:

Modular Approach. Zend Framework 2.0 introduces a new and powerful approach to modules. This new module system is designed with flexibility, simplicity, and re-usability in mind. ZF2 emphasize on dividing your application logic into several modules rather than controllers. Each module in ZF2 application acts as a separate application with its own configuration and layout. Application module will be loaded every time so the default stuff goes into the application module. A module may contain just about anything: PHP code, including MVC functionality; library code; view scripts; and/or public assets such as images, CSS, and JavaScript. The possibilities are endless. Such an extensive modular approach not only improves the performance of application but also make it easy to manage and debug.
Service Manager. It`s one of the best features of ZF2. Service manager is simply a layer which will return you the object of any service you want to use in your application with the flexibility to include your own factories.
Event Manager. The basic architecture allows you to attach and detach listeners to named events, both on a per-instance basis as well as via shared collections; trigger events; and interrupt execution of listeners.
PHP Composer. Another great addition in the ZF2 which will automatically get the dependences of the project groom is the PHP composer. Composer makes sure that every project is using the same libraries with same versions.

ZF2 minuses.

Some developers may call it over engineered as the learning curve of the framework is quite hard. Also documentation is currently the weakest part of ZF2: Zend has followed its tradition of bad documentation. However the Zend skeleton application tutorial may provide you with some info about the framework.

And now let`s move to YiiJ Yii is a component-based high-performance PHP framework for developing large-scale web applications. We have already had a couple of articles in our blog dedicated to this frameworkJ To cut the story short , Yii is very fast and flexible and has many pluses and great features. Here are some of them

Integration with Javascript framework jQuery. Yii library comes with all the jQuery extensions like tabs and datepicker, allowing you to use jquery extensions in a very PHP way and initialize them on server so you can control their behavior on the client side in efficient way.
Yii Community. It is very vibrant and active and its participants can render great assistance to every developer.
Gii Module. Yii has handy built-in code generator Gii. With its help it`s possible to create web 2.0 applications in minutes. Basically this module allows you to create a model from your database table and then can from that model you can create the CRUD operations.
Active Record. One of the pluses is comfortable work with database: it can be used either as Data Access Objects, or as Active Record

Yii minuses:

Among the downsides of the framework many developers name a quite tough learning curve. Besides while using YIi developers need to be very careful about what you are dealing with, if you can do it well you are good to go.

Have you already tried to work with Zend Framework 2? Would you prefer ZF2 or Yii for your projects? Interesting to know your thoughts.

Anna Kozik

Anna Kozik

Business Development Manager

Skype: kozik_anna
LI Profile: Anna Kozik

10 thoughts on “Yii Framework vs Zend framework 2”

  1. i remember having a really bad experience with ZF1, so i went to learn Yii. Now i use wordpress for websites and i write my own code for no-frontend projects. One of my friends started a framework, i helped him for a while, but at the end, i couldn’t get comfortable with a frameword as ususal lol. Seriously i need a framework!

  2. Yii is great. I have not workded with zend. Yii has much more pluses than written in this blog, like security, performance, much better databases support etc. I have a wonderful experience with this framework.

  3. I’ve tried to develop an app using Zend a long while ago and I remember it was awful. It was so bad that I had the idea that using a Framework wasn’t really helpful. All this related to the lack of documentation.

    In the past months I’ve been learning YII and it has been a pretty good experience, there are a few documents and tutorials and it has made my coding a lot easier.

    I’ll just keep using Yii and which luck to anyone starting with ZF!

  4. I can only confirm some of the comments. When it is time to find a framework you get to try the big names like Zend or Symfony. At the end, Yii was the one that really delivered efficiently.

  5. I’ve tried Zend framework 2 and it’s completely different from Zend 1. I don’t even understand Zend 1 documentation if I go through it.
    Some of the features I like are:
    – Dependency injection
    – Service managers
    – TableGateways and Hydrators (Similar to Gii, more coding but also more control)
    – View Helpers
    – Useful namespacing

  6. Yii is to PHP what Jquery was to Javascript. A God send. Yii makes building web 2.0 a breeze regardless of the project scale. Not used any other framework since I discovered Yii.

  7. Yii is not only very fast in execution, it is also very fast to develop with it. And now with Yii 2 in beta release and stable release scheduled for soon, Yii will support the PHP 5.4 features and others many useful enhancements. I think Yii is much better than ZF2 for rapid development.

  8. I disagree that Yii has a tough learning curve. Documentation is excellent. I could get a basic website running in minutes with no prior experience in Yii. For more difficult problems, I almost always found answers and great tutorials from its community of users. My recommendation is with Yii.

  9. I’m not a techie personally, so I had to search around to hire a Yii developer for my project and found Can anyone recommend them or any other good Yii developer or a development team, say 3-4 developers?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s