Yii is a free, open-source Web application development framework written in PHP5 that promotes clean, DRY design and encourages rapid development. It works to streamline your application development and helps to ensure an extremely efficient, extensible, and maintainable end product. Yii is a perfect choice for any sized project. However, it has been built with sophisticated, enterprise applications in mind.
Features of Yii Framework : Whether you are one developer building a fairly simple Web site, or a team of distributed developers building an extremely complex Web application, using Yii is like augmenting your development team with additional experienced, professional, and efficient resources.
1. Model-View-Controller (MVC) design pattern : Yii implements the model-view-controller (MVC) design pattern, which is widely adopted in Web programming. MVC aims to separate business logic from user interface considerations, so that developers can more easily change each part without affecting the other. In MVC, the model represents the information (the data) and the business rules; the view contains elements of the user interface such as text, form inputs; and the controller manages the communication between the model and the view.
2. Database Access Objects (DAO), Query Builder, Active Record, DB Migration : Built on top of the PHP Data Objects (PDO) extension, Yii Data Access Objects (DAO) enables accessing to different database management systems (DBMS) in a single uniform interface. Applications developed using Yii DAO can be easily switched to use a different DBMS without the need to modify the data accessing code. Yii Query Builder offers an object-oriented method for building SQL queries, which helps reduce risk of SQL injection attacks.
3. Form input and validation : Collecting user data via HTML forms is one of the major tasks in Web application development. Besides designing forms, developers need to populate the form with existing data or default values, validate user input, display appropriate error messages for invalid input, and save the input to persistent storage. Yii greatly simplifies this workflow with its MVC architecture.
4. AJAX-enabled widgets : Extending Yii is a common activity during development. For example, when you write a new controller, you extend Yii by inheriting its CController class; when you write a new widget, you are extending CWidget or an existing widget class. If the extended code is designed to be reused by third-party developers, we call it an extension.
5. Authentication and authorization : Yii has a built-in authentication/authorization (auth) framework which is easy to use and can be customized for special needs.The central piece in the Yii auth framework is a pre-declared user application component which is an object implementing the [IWebUser] interface. The user component represents the persistent identity information for the current user. We can access it at any place using Yii::app()->user. Using the user component, we can check if a user is logged in or not via CWebUser::isGuest; we can login andlogout a user; we can check if the user can perform specific operations by calling CWebUser::checkAccess; and we can also obtain the unique identifier and other persistent identity information about the use