Featured no image

Published on February 3rd, 2020 📆 | 3457 Views ⚑

0

Yii Framework Features


Speech Synthesis

Yii is a free open-source web application development framework written in PHP5.

It simplifies your application development and help to create an extremely efficient, extensible and maintainable product.

Yii is highly recommended for any sized project.

You can stay focused on the tasks specific to your business requirements and let Yii provide an implementation strategy for all of the following:

1. Model-View-Controller (MVC) design pattern:

Yii implements the most widely adopted design pattern in Web programming i.e model-view-controller (MVC).

The basic idea behind MVC is to separate the representation of information from the user's interaction with it.

MVC means,

Model: It represents the information (the data) and the business rules.

View: The view contains elements of the user interface such as text, form inputs.

Controller: The controller manages the communication between the model and the view.

2. DB Migration:

Yii Query Builder offers an object-oriented method for building SQL queries, which helps reduce risk of SQL injection attacks.

Yii Data Access Objects (DAO) enables accessing to different database management systems (DBMS) in a single uniform interface.

Applications developed in Yii DAO can be easily switched to use a different DBMS without the need to modify the data accessing code.

3.Form input and validation:

One of the major tasks in Web application development is handling the forms and collecting user data.

Developers need to populate the form with existing data or default values, validate the user input, display appropriate error messages for invalid input and save the input data to storage.

Yii's MVC architecture simplifies this workflow.

4. Extensions:

Developer normally extends Yii during development, like when you write a new controller, you extend Yii by inheriting its Controller class.





If such extended code is going to be reused by third-party developers, then they call it an extension.

5. Authentication and authorization:

Yii comes with a built-in authentication and authorization (auth) functionality which is easy to use and modify.

The central piece in the Yii authorization framework is a pre-declared user application component which is an object implementing the [IWebUser] interface.

The user component stores for the current user, we can access it at any place using Yii::app()->user.

We can perform many functionalities by using this component like:

- Check if a user is logged in or not

- Login and Logout a user

- Check if the user has access to a specific operation

- Can obtain the unique identifier and other related identity information about the user.

6. Skinning and theming:

In Yii every theme is represented as a directory containing view files, layout files, images, CSS files, JavaScript files, etc.

The directory name is the theme name.

All themes reside under the one directory i.e directoryWebRoot/themes.

Only one theme can be active at a time.

7.Web services:

Yii provides simplified way of implementing web service in a web application.

The API's are grouped into classes, called service providers.

WSDL generated by Yii for each class describes what APIs are available and how they should be invoked by client.

Source by Jimmy Brion

Tagged with:



Comments are closed.