Yii is a relatively young framework for PHP which is open-source and relative powerful. It is used to develop large web applications. The emphasis is mainly on pragmatism, re-usability and simplicity of use. It is a strictly object-oriented system. All components are independent, configurable and extensible.
A stable version released in May 2010 is currently available. The framework development is based on the collaboration of an international team of developers including Qiang Xue from the US., Wei Zhuo from Australia, Kyle Ferreira from Canada, Sebastian Thierer from Argentina, István Beregszászi from Hungary and Johan Turnquist from the US.
The original proposal is the work of the first mentioned and has been inspired by the following projects.
Prado. From Prado was taken the component and events-controlled paradigm, modular application architecture, layers of the database abstraction, localisation and system of internationalisation.
Ruby on Rails. The principle “convention before configuration” and inspiration during the implementation of the ActiveRecord model is based there.
Symfony. Inspiration in the section of filters and plug-in architecture.
Joomla. Modular architecture was taken from it.
Jquery. It was integrated as a basic library for JavaScript support.
Typical Yii’s features
Application and presentation logic are divided on the basis of the architectural principle MVC. This principle allows the relative independence of the database, application and presentation layer of the application which leads to better administration.
Resources are addressed using Database Access Objects (DAO) and Active Record.
The favourite JavaScript library jQuery is integrated in the role of the basic library.
Processing forms and input data validation are simple and safe.
Authentication and authorisation access control is provided by RBAC hieratic roles.
It supports motives and quick visual changes of the application.
It automatically generates WSDL services specifications and processing of its requirements.
Translation of messages, formatting of numbers and date and time data uses localisation (L10N) and internationalisation (l18N).
It has a layered cache for data, pages, page fragments and dynamic content. This cache allows the application to reduce its reaction time.
It ensures processing, filtering and archiving of errors.
It protects the application against various types of attacks.
It generates a valid XHTML code.
The advantages of using Yii
It has CRUD generators using Gii.
It offers users a wide range of options for layouts and themes that can be used to create unique web design.
It contains Ajax helpers.
It protects us from rewriting the same code.
It is the safest available Framework for development of large-scale applications. It has a perfect performance which is appropriate particularly in the case of forums, e-commerce or systems for maintaining the content and data.
Architecture helps developers to create a smart web page with its database servers isolated from users and helps developers to built an effective and clean web solution.
The originally designed controller helps to link different libraries and packages which reduces the programming burden.
Changes in one line are reflected across the programme.
Sensitive data are protected against threads.
Server and client validation can be turned on and off as required by the application.
It makes it possible to link to the third-party interface which facilitates integration with other frameworks.
Smart cashing and a component-based structure makes it possible to save the developer’s work and maintain maximum performance.
It can process a significant number of requests per second.
The disadvantages of using Yii
It doesn’t support AR queries.
It doesn’t have too well integrated Ajax functionalities, so sometimes developers have to use JavaScript.
A single error can cause wide consequences across the application.
Yii requires a relatively wide knowledge of PHP, of programming in general and of various add-ons attached to it.
It depends very much on static methods.