⬆️ ⬇️

Yii Framework

Another PHP-framework met by chance. I usually glance through new frameworks, but this one is very interesting for me.



The authors (Qiang Xue, Xiang Wei Zhuo), perhaps, are known to you by the rather flexible, but also rather inhibited Prado framework.



So, what's so interesting about him?



Performance



If you believe the numbers, it is faster CodeIgniter, CakePHP, ZF and Symfony . And when using APC - not just faster, but faster, more than twice. Here of course it is worth considering that only the most basic things are compared.

')

Architecture and features



- Fully object-oriented without a single global variable or function.

- Component MVC.

- DAO, Active Record.

- Validation of forms.

- Authentication, authorization.

- Generation of WSDL and comprehensive support for web services.

- Internationalization, localization.

- Multi-level caching system (data, pages, parts of pages). Support for various cache repositories in the form of backends.

- A lot of things to prevent XSS, CSRF and other attacks.

- All output code is XHTML.

- Console generators skeleton code.

- Allows you to use any other code (Zend Framework, PEAR, etc.)

- The client uses jQuery.



Borrowing ideas



- Prado: Well, it's understandable. Still, the authors are the same ... Ideas are taken from it: component structure, event programming, a DBMS abstraction layer, modularity, internationalization, localization, etc.

- Ruby on Rails: Convention over configuration (you can start working, and configure as needed). Somewhere in the comments to the documentation people say that it’s easier to figure out than with Rails. Also RoR is similar to Active Record.

- Symfony: filters, plugins.

- Joomla: Modules, string translation.



Documentation



Documentation is certainly not as simple and small as in CodeIgniter, but very, very good. There is nothing in Russian, but the documentation in English is very good:



API documentation

The Definitive Guide to Yii (122 pages in detail and with examples).

Offline options



The third day was the release of a stable version 1.0.0. Distributed by new BSD (can be used for both open and closed applications).



We try

Source: https://habr.com/ru/post/46553/



All Articles