Home >Backend Development >PHP Tutorial >Yii Framework Official Tutorial Supplement 1 - Getting Started: What is Yii

Yii Framework Official Tutorial Supplement 1 - Getting Started: What is Yii

黄舟
黄舟Original
2017-02-11 09:19:551250browse



Yii Framework Official Tutorial Supplement 1 - Getting Started: What is Yii

Yii is a high-performance component-based PHP framework for rapid development of large-scale web applications. It maximizes reusability in web development and can significantly increase the speed of your web application development. The name Yii (pronounced Yee or [ji:]) is an abbreviation of "Yes It Is!". This is often the most accurate answer to some frequently asked questions:

Is Yii fast? is it safe? Professional? Is it suitable for my next project? Yes, it is!

Xue Qiang, the author of the Yii framework, is also the author of the Prado Framework. In the process of writing the Yii framework, the author maximized the use of Prado, Ruby On Rails, CakePHP and The best of Symfony to create a modern, feature-rich, and reusable PHP framework.

1. Environmental requirements

To run a Yii-driven web application, you need to have a web server (such as Apache or Nginx) that supports PHP 5.1.0 or above.

For developers who plan to use Yii, understanding object-oriented programming (OOP) will be very helpful. Because Yii is a pure OOP framework. (To learn more about PHP's object-oriented features and syntax, please refer to /p/tag/Object-oriented)

Yii uses the standard MVC design pattern architecture.

Almost all web applications are now based on related databases. Therefore, how a framework manages interaction with the database is crucial. The Yii framework can implement database operations in many ways, but the standard practice is to use the ORM method implemented through AR (this method is also used in Ruby On Rails).

For low-level database interaction, you can use PHP5’s PDO extension. PDO provides a data access abstraction layer that allows you to use the same piece of code to interact with multiple different databases, regardless of the related database application calls.

Development tool preparation:

Netbeans (Reference: 23 kinds of PHP development tool collection - after trial, I feel that Netbeans is the best for Yii integration!)

PhpStorm (Reference: Configuring PHPStorm IDE to integrate Yii framework tutorial)

Sublime Text 2 (Reference: /p/tag/sublime-text)

2. What is Yii best used for?

Yii is a general web programming framework that can be used to develop almost all web applications. Because it is lightweight and has a mature caching solution, it is particularly suitable for developing high-traffic applications, such as portals, forums, content management systems (CMS), e-commerce systems, etc.

Some websites built using the Yii framework:

Yii official website

Stay.com

VICE.com

Yii Chinese Community

Some open source programs based on Yii framework:

Chive

Zurmo

LimeSurvey2

Yincart

3. How does Yii compare to other frameworks?

Similar to most PHP frameworks, Yii is an MVC framework.

Yii outshines other frameworks with its excellent performance, rich functionality, and clear documentation. Yii was carefully designed from the ground up to be suitable for strictly prohibited web application development. It is neither a derivative of other projects nor a combination of third-party work. It is the result of the author's rich experience in Web application development and research and thinking on most popular Web programming frameworks and applications.

4. Before you start,

have the following knowledge reserves:

1) Have relevant web development experience

2) Master HTML, CSS, Javascript, jQuery, PHP, MySQL and SQL related knowledge

3) It is inevitable to experience confusion and frustration when learning to master anything new, so be mentally prepared

5. Introductory series of articles:

Environment Building: Using source code to compile and install Apache+MySQL+PHP+phpMyAdmin in Ubuntu

Yii Framework Official Guide Series 2 - Getting Started: Installing Yii Framework

Yii Framework Official Guide Series 3 ——Start: Create the first Yii application

The above is the Yii framework official tutorial supplement 1——Start: What is Yii? For more related content, please pay attention to the PHP Chinese website (www.php.cn )!


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