intro-yii.md 3.22 KB
Newer Older
Qiang Xue committed
1 2 3
What is Yii
===========

4
Yii is a high performance, component-based PHP framework for rapidly developing modern Web applications.
Larry Ullman committed
5 6
The name Yii (pronounced `Yee` or `[ji:]`) means "simple and evolutionary" in Chinese. It can also
be thought of as an acronym for **Yes It Is**!
Qiang Xue committed
7 8 9 10 11


What is Yii Best for?
---------------------

12 13 14 15
Yii is a generic Web programming framework, meaning that it can be used for developing all kinds
of Web applications based on PHP. Because of its component-based architecture and sophisticated caching
support, it is especially suitable for developing large-scale applications such as portals, forums, content
management systems (CMS), e-commerce projects, RESTful Web services, and so on.
Qiang Xue committed
16 17 18 19 20


How does Yii Compare with Other Frameworks?
-------------------------------------------

21 22 23 24
- Like most PHP frameworks, Yii implements the MVC (Model-View-Controller) design pattern and promotes code
  organization based on this pattern.
- Yii takes the philosophy that code should be written in a simple yet elegant way. It will never try to
  over-design things mainly for the purpose of following some design pattern.
Larry Ullman committed
25 26 27
- Yii is a full-stack framework providing many proven and ready-to-use features, such as: query builders
  and ActiveRecord, for both relational and NoSQL databases; RESTful API development support; multi-tier
  caching support; and more.
28
- Yii is extremely extensible. You can customize or replace nearly every piece of core code. You can also
Larry Ullman committed
29
  take advantage of its solid extension architecture, to use or develop redistributable extensions.
30 31
- High performance is always a primary goal of Yii.

Carsten Brandt committed
32
Yii is not a one-man show, it is backed up by a [strong core developer team][] as well as a large community
Larry Ullman committed
33 34 35
with many professionals constantly contributing to the development of Yii. The Yii developer team
keeps a close eye on the latest trends of Web development, and on the best practices and features
found in other frameworks and projects. The most relevant best practices and features found elsewhere are regularly incorporated into the core framework and exposed
Qiang Xue committed
36
via simple and elegant interfaces.
37

Carsten Brandt committed
38
[strong core developer team]: http://www.yiiframework.com/about/
39 40 41 42

Yii Versions
------------

Larry Ullman committed
43 44
Yii currently has two major versions available: 1.1 and 2.0. Version 1.1 is the old generation and is now in maintenance mode. Version 2.0 is a complete rewrite of Yii, adopting the latest
technologies and protocols, including Composer, PSR, namespaces, traits, and so forth. Version 2.0 represents the latest
45 46 47 48 49 50 51
generation of the framework and will receive our main development efforts in the next few years.
This guide is mainly about version 2.0.


Requirements and Prerequisites
------------------------------

Larry Ullman committed
52 53
Yii 2.0 requires PHP 5.4.0 or above. You can find more detailed requirements for individual features
by running the requirement checker included in every Yii release.
54 55

Using Yii requires basic knowledge about object-oriented programming (OOP), as Yii is a pure OOP-based framework.
Larry Ullman committed
56 57
Yii 2.0 also makes use of the latest features of PHP, such as [namespaces](http://www.php.net/manual/en/language.namespaces.php) and [traits](http://www.php.net/manual/en/language.oop5.traits.php). Understanding these concepts will help
you more easily pick up Yii 2.0.
58