What to Expect from Yii 2.0

In this post i will explain What to Expect from Yii 2.0. The latest version of Yii 2 is 2.0.0, released on October 12, 2014. It’s aimed to become a state-of-the-art of the new generation of PHP framework. Yii 2.0 is not compatible with 1.1. Yii 2.0.0 is a complete rewrite of its previous version Yii 1.1 which is one of the most popular PHP frameworks.

Requirements

The usage of namespaces and traits upped the requirements to PHP 5.4. Additionally, you’ll need the mb_string, PDO and intl extensions when you start developing. This should not be a problem if you run your own server, but might be if you’re on a shared environment. Of course, in time, that issue will disappear.

Feathures :

Quick prototyping with support for common APIs for ActiveRecord;

Response format negotiation (supporting JSON and XML by default);

Customizable object serialization with support for selectable output fields;

Proper formatting of collection data and validation errors;

Efficient routing with proper HTTP verb check;

Support for OPTIONS and HEAD verbs;

Authentication;

Authorization;

Support for HATEOAS;

HTTP Caching;

Rate limiting.

Install via Composer

This is the preferred way of installing Yii 2.0. If you do not have Composer yet, you may install it by following the instructions here

After installing Composer, run the following command to install the Composer Asset Plugin:

Install from an Archive File

Conclusion

The documentation quality for Yii 2.0 improved from Yii 1.1. I had a hard time figuring stuff out when I started with Yii 1.1 a few years ago and I feel the documentation is more extensive than before.

Have you looked at Yii 2.0 already or perhaps even built something with it already? Please tell us what you came across. I would love to know your experiences!

Share this post:

Related Tutorials

About: Prem Tiwari

Prem Tiwari is the founder of FreeWebMentor.com and also a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies. View all posts by Prem Tiwari

Subscribe my updates via Email

We use cookies to ensure that we give you the best experience and deliver relevant ads based on your interest, by using our website, you acknowledge that you have read our privacy policy.OkPrivacy policy