Yii 2.x and 1.x differences and yii2.0 installation

Source: Internet
Author: User

There is a similar problem: http://www.zhihu.com/question/22924271/answer/23085751

The general idea will not change, the development process changes is not very big.
What's changed is that
1, Yii2 brought into the PHP5.4 characteristics, introduced the namespace to resolve the naming conflict, so the base class will not start with the C word
2. instead of inheriting all classes from component component, choose to inherit object and component ( also inherited from object, but with event functionality, and behavior functionality for extensions)
3, more MVC, the original view layer is basically a controller directly included in, now have the view of the class to control, so the view layer in the use of controller to bring the parameters of a slightly different way.
4, YII2 basic version (looks and 1 similar) and Advanced Edition (sub-foreground and backstage), advanced version is more suitable for the development of large-scale projects.
5, the other is the details of changes, such as Block assignment (basic to collect form data) more convenient. The installation is finished with the bootstrap style, and so on.
There are, of course, many other features that you can refer directly to Yii's updated documentation on GIT:
Yii2/docs/guide/upgrade-from-v1.md at Master Road Yiisoft/yii2 Road GitHub

Yii Basic and Advanced differences:

It's not quite the difference, actually. Yii2-app-basic has only one web app, and yii2-app-advanced is the default with two Web apps with foreground and background, integrates two apps into one project, and then uses the common app to store some of the things that are common to both apps. Some of the differences are explained in the documentation on the official website:

http://www.zhihu.com/question/27916823/answer/38633322

Http://www.digpage.com/improvement.html

yii2.0 Manual Installation:

If you are using a compressed package installation method, follow these steps:

    1. Download the latest compressed package from yiiframework.com.

    2. Unzip the compressed package to the /path/to/digpage.com directory.

    3. Modify the config/web.php file and enter the cookievalidationkey configuration key. This key is used primarily for cookie authentication. If you install using composer, composer automatically sets a key

(Reference: http://www.digpage.com/install.html)

Yii 2.x and 1.x differences and yii2.0 installation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.