What are the advantages of the YII Framework? -Php Tutorial

Source: Internet
Author: User
Php Chinese network (www.php.cn) provides the most comprehensive basic tutorial on programming technology, introducing HTML, CSS, Javascript, Python, Java, Ruby, C, PHP, basic knowledge of MySQL and other programming languages. At the same time, this site also provides a large number of online instances, through which you can better learn programming... Reply: What are the advantages of the YII Framework? -Answer from Zhou Jian
Yes, this answer is for you. after countless at ERRORS, I decided to cancel at orz ..

When I saw this answer and a series of questions, I couldn't wait to raise my pants to answer your series of questions.
First of all, you have used several absolute terms. I can only say that I admire your self-confidence, "TP development efficiency is definitely higher than Yii", "TP must be more suitable for Chinese thinking", "TP additional value is definitely higher than Yii", your series of absolute, for me, this is not true. even if 99 out of 100 people agree with your opinion, the word "absolute" is not true!
Existence is justifiedSo I did not comment on the quality of the TP framework, but I once saw a friend's comment on TP. although explicit, I think it is reasonable-"TP is not designed, it can only be said that it is a collection of tools. "Even so, I do not deny TP. after all, the share in China is there. it is like a lot of people are still saying PHP, Existence is reasonable.
Okay. I will answer your questions one by one.
-------------- Split line -----------
1. first, this question is raised, indicating that your understanding of the MVC model is biased. MVC only proposes the separation of data-View-business logic, but there is no PHP code in the view, as long as the PHP in the view is doing "performance", it will not deviate from MVC.
Second, even if PHP code is not displayed in the view, Yii can introduce templates such as Smarty, but I also think it is unnecessary. in many scenarios, the introduction of Smarty requires backend and front-end developers to re-learn a set of languages. If PHP is used as a template directly, front-end developers only need to simply learn the syntax to set pages, even if we leave aside the efficiency, if the front-end staff would neither be php nor smarty, then they simply learn some php syntax, and the cost is not necessarily higher than learning smarty. Therefore, at present, in our company (each with 20 + personnel), Yii is used directly and php is used as a template;
2. widget, apparently, is not omnipotent, but can you give another example to illustrate what is omnipotent? (Money? Laugh ~), An applicable scenario: the search box that appears on many pages of the site. it is very convenient to use widgets.
As for the issue of passing JavaScript code, I haven't known how to use Yii ClientScript after five months. it also shows that I am not using it too deeply;
3. the original design of gii is not to generate business logic for you. gii is to generate a list, form, and delete actions for regular CRUD operations on tables during Web development, the background of all projects I have done is generated based on gii, and the development efficiency is greatly improved;
As for the style, since you don't need it, don't you know that you can customize a set of Gii templates?
4. there is no need to answer this question if the author is abroad or in China. this has nothing to do with Yii.

To sum up, the answer is only for answering the primary question. if you don't want to blow it off, I can say about 800 words if you want to vomit yii, the answer to the primary question is indeed not the point where yii should be hacked, however, when I saw the speaker's voice, the speaker said a number of "absolutely" could not help but raise objections. I joined my blog, "yiiframework, a simpler way to construct a local page." C is created under the Yii Framework. # Html. renderAction

The team has been using Yii for nearly two years.
We migrated from NET to use php for re-development. at that time, we considered a considerable number of frameworks and finally decided to use Yii.

1. the code style of the Yii Framework is similar to that of net, so that the original staff of our team can easily read the php code and get started quickly.
2. the Yii Framework has a high support for expansion, which is very convenient. we have extended many components by ourselves. Recently, we even modified the program entry, allowing us to manipulate the program in the framework.
3. important performance: Yii has excellent performance and is a lightweight framework. Spl_autoload_register pre-registration, File loading on demand, and so on have greatly improved performance.
4. the modules design is very good. Theoretically, it can be nested infinitely. of course, it is not recommended to nest more than three layers. Although we nested two layers.
4. the application of widget widgets makes it easier to construct common modules. Of course, we also have more convenient methods to construct common modules.
5. in fact, the integrated model and the verification mechanism contained in the CActiveRecord mode are good, but the constraints are also relatively strong.
6. the Yii Framework encapsulates various caching methods, allowing you to switch between different caches by calling a uniform method.

Load the view of the specified action to the current page in inline mode · Issue #2579 · yiisoft/yii · GitHub I wrote a more convenient method to construct a common interface. Not perfect. it is still being improved. I hate his activeform and jquery binding so deeply. use it. I am tired of jquery. don't use it. people who take over will scold me! Also, zend is becoming more and more popular.

Others like php, which is simple and complicated. if you do not study it in depth, it is difficult for me to use ci, tp, zf, and yii, I feel that tp is a pseudo-oop framework, and there is no design pattern at all. in particular, embedding templates such as smart into the framework is a big failure. The only advantage is that it is easy to learn, I personally think that yii is more than two levels higher than tp. Yii has three groups,
Two are full, 121116851 Yii China 67572979 Yii
It's almost full. 127319423 Yiibook discussion group
There will be a lot of people reporting it right away...
Sending code every day

Yii is the best practice for PHP rapid development. Reference: http://www.yiiframework.com/doc/guide/1.1/zh_cn/changes And http://www.yiiframework.com/features/
You need to use it.

6.20 supplement:
Currently, well-known companies in China are listed as Shanda, dual play, rice, and red umbrella. Reference: http://www.isyii.com/sites
YII-based open source projects include: http://www.isyii.com/open
Yii extension based on sina open platform I wrote: http://yii4sae.sinaapp.com Yii4sae is the best practice for deploying the Yii Framework to the Sina open platform (SAE. Yii can be deployed to SAEs without modifying the Yii source framework code. the scalability of Yii is evident.

2016.6.3 supplement:
Yii has now grown to 2.0, and Yii has been used by dozens of times or more companies. Yii has the biggest advantage of being fast, agile, and not procrastinating. it gives programmers the ability to fly. Of course, please do not compare. different people are suitable for/like different things. if you have never used Yii, you can try it. at least I have been using it for almost two years. it feels good. YII is really good. I am against it if it is too dependent on the framework to really understand programming.
At least YII's understanding and improvement on programming are helpful. if you haven't studied YII, you can't say YII here. I suggest you check YII! When I used to learn PHP, files were randomly stored, and the concepts of controllers and models were not very clear.
After using yii for a while, you can get into good habits.

The components are very powerful and many things have been written. It can be used directly. Let's talk about the disadvantages.

Yii migrate is a little pitfall, but it is estimated that no one actually uses it.
The document is concise.

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.