Home  >  Article  >  Backend Development  >  What are the advantages and disadvantages of YII2 framework

What are the advantages and disadvantages of YII2 framework

黄舟
黄舟Original
2017-09-05 09:10:097908browse

What are the advantages and disadvantages of YII2 framework

YII2 framework introduction:

yii is a high-performance component-based PHP framework for developing large-scale Web applications. Yii is written in strict OOP and has complete library references and comprehensive tutorials.

Yii has two main versions: Yii1.1 and Yii2.0. Yii1.1 is an old version, and no new development is being carried out now. The official is only carrying out maintenance, updating security vulnerabilities, etc., and will not introduce new features.

Yii2.0 is a framework that is completely rewritten based on Yii1.1. It absorbs many of the latest technologies and mainstream conventions in development, and is the representative of the latest generation of Web development frameworks.

Uses new technologies and standards such as PHP namespace, Trait, PSR standard, Composer and Bower package manager.

Implemented new architecture and new modes such as dependency injection, dependency injection container and service locator (Service Locator).

Yii2.0 attaches great importance to security and adopts a series of measures to effectively prevent SQL injection, XSS attacks, CSRF attacks, cookie tampering, etc.

Provides Yii debugging toolbar, Gii code generator and document generator and other efficient development tools for hard-working coders.

Integrates Codeception and Faker, and combines with DB Migration to provide a fixture framework to facilitate test development.

Provides a simple application template and an advanced application template, which are suitable for different development scenarios and can help developers build their own applications as soon as possible.

Advantages and disadvantages of YII2 framework

Advantages:

1. Pure OOP

2. Used for large-scale Web applications

3. The model is easy to use

4. The development speed is fast and the running speed is also fast. Excellent performance and rich functions

5. Use command line tools.

6. Support composer package management tool

7. GII is quite good. It simplifies the development process and can generate most codes. The efficiency of developing the backend is quite high

Disadvantages:

1. Less guidance and consideration for the Model layer

2. Fewer document examples

3. Too much English

4. It requires proficiency in PHP technology and proficiency in OOP programming!

5. View is not an ideal view. The ideal view may only be html code and will not involve PHP code.

6. Under the trend of complete separation of front and back ends, the coupling of yii2 front and back ends is still a bit heavy.

For more related knowledge, please visit PHP Chinese website! !

The above is the detailed content of What are the advantages and disadvantages of YII2 framework. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn