intro-yii.md 3.3 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
Yii is a generic Web programming framework, meaning that it can be used for developing all kinds
Larry Ullman committed
13
of Web applications using PHP. Because of its component-based architecture and sophisticated caching
14 15
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?
-------------------------------------------

Larry Ullman committed
21 22
If you're already familiar with another framework, you may appreciate knowing how Yii compares:

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

Larry Ullman committed
34 35 36
Yii is not a one-man show, it is backed up by a [strong core developer team][], as well as a large community
of professionals constantly contributing to Yii's development. The Yii developer team
keeps a close eye on the latest Web development trends and on the best practices and features
Larry Ullman committed
37
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
38
via simple and elegant interfaces.
39

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

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

Larry Ullman committed
45
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
Larry Ullman committed
46 47
technologies and protocols, including Composer, PSR, namespaces, traits, and so forth. Version 2.0 represents the current
generation of the framework and will receive the main development efforts over the next few years.
48 49 50 51 52 53
This guide is mainly about version 2.0.


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

Larry Ullman committed
54 55
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.
56

Larry Ullman committed
57
Using Yii requires basic knowledge of object-oriented programming (OOP), as Yii is a pure OOP-based framework.
Larry Ullman committed
58 59
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.
60