What are the advantages of the YII framework?

Source: Internet
Author: User
Tags php template smarty template

Reply content:

What are the advantages of the YII framework? -Zhou Jian's answer
Yes, this answer is for your answer, countless times at the wrong person, I decided to cancel at the Orz.

When I see this answer and a series of questions in the pit, I can't wait to put my pants back and forth (to) answer your questions.
First of all, you use a number of absolute, I can only say 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", you this series absolutely, for me is not set up, even if 100 people 99 people agree with your opinion, And I am a person retort, "absolute" the word is not set up!
existence is the rational, so for the TP frame good or bad I do not comment, but once in the know to see a friend of TP evaluation, although explicit, but I feel justified-"TP not design, can only be said to be a collection of tools", even so, I do not deny TP, after all, in the domestic share in that, like a lot of people spray PHP, Or that sentence, existence is reasonable
Okay, here's the answer to your question.
--------------Split Line-----------
1, first of all, put forward this question, that your understanding of the MVC pattern is biased, MVC just put forward the data-view-business logic separation, can not say that the view cannot have PHP code, as long as the view of PHP is doing "performance" thing, he does not deviate from MVC.
Second, even if, as you say, the view does not appear in the PHP code, then yii can introduce smarty template engine, but I also think that there is no need, in many scenarios, the introduction of Smarty, back-end and front-end developers need to re-learn a set of languages, and if directly in PHP template, Front-end developers only need a simple learning grammar can be set up the work of the page, even if the efficiency aside, if the front-end staff would have neither PHP nor smarty, then he simply learn some PHP syntax, the cost is not smarty higher than learning. Therefore, at present in my company (front and back of each 20+ personnel scale) is directly with Yii, and use PHP to do template;
2, widgets, obviously he is not omnipotent, but you can cite an example to illustrate what is omnipotent? Money Smile ~), to give a suitable scene: The site of many pages appear in the search box, using widgets to do is very convenient
As to say the problem of JS, used for 5 months do not know how to use Yii ClientScript, also shows that the use is not too deep;
3. The GII is not designed to generate business logic for you, and the GII is to generate lists, forms, and delete actions for regular CRUD operations on tables in the Web development process, not to mention anything else, all the projects I've done are based on GII, and the development efficiency boost is not too great;
As for the style, since you don't need it, don't you know you can customize your own set of templates for the GII?
4, about the author abroad or at home, this question I think there is no need to answer, which is not related to yii itself.


In general, the answer is only for the answer to the question of the Lord, not blowing black, to vomit trough yii I probably can also say 800 words, just answer the question of the Lord is not yii should be black point, but see answer the representative of the people said a number of "absolute" Could not help but raise objections to join a blog yiiframework a simpler way to construct a local page is to build C # Html.renderaction under the YII framework

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

1, YII framework code style on the net closer, convenient for our team original staff can be very convenient to read PHP code, get started quickly.
2, YII framework for extended support is very high, easy to expand, we slowly expanded their own many components. Recently, we have even modified the program entry so that we can manipulate the program more within the framework.
3, very important performance, YII performance is relatively excellent, but also belongs to the lightweight framework. Spl_autoload_register Pre-registration, on-demand loading files and so on performance has greatly improved.
4, modules design is a very good thing, he can theoretically unlimited nesting, of course, not recommended nesting more than three layers. Although we have nested two layers.
4, widget widgets for the application, can be more convenient to construct a common module. Of course, we also have a more convenient way to construct universal modules, said the back.
5, in fact, the integrated model, as well as the Cactiverecord model contains the verification mechanism, are very good things, but the binding is relatively strong.
6, have to say the caching mechanism, the YII framework encapsulates a variety of caching methods, so that you only need to call a unified method can be switched in different caches.

Loads the view of the specified action into the current page in inline mode · Issue #2579 · Yiisoft/yii GitHub I wrote a more convenient way to construct a common interface. Not very perfect, still in perfect. I hate his activeform and jquery binding so deep, use it, for jquery tired, do not, the future people will certainly scold me! And it's getting zend.

Others are like too complex, the original concise PHP, so complicated, if not deep learning, it is difficult to use I used CI,TP,ZF and yii, feel TP is pseudo-OOP framework, there is no design mode, especially smart such template engine embedded into the framework is a big failure, The only advantage is that it is easy to learn, and the individual feels that Yii is more than 2 levels higher than TP. Yii has three groups,
Two full, 121116851 yii China 67572979 yii
One's almost full. 127319423 Yiibook Discussion Group
There's going to be a lot of people here right now.
Every day in the hair code

The advantages of Yii I conclude that: Yii is a best practice for rapid development of PHP. Specific reference: http://www. Yiiframework.com/doc/gu ide/1.1/zh_cn/changes And http://www. Yiiframework.com/featur es/
To be really realized, need to use.

6.20 Supplement:
At present, the domestic well-known companies have a grand, more play, rice No, small red umbrella and so on. Reference: http://www. isyii.com/sites
Yii-based open source projects are: http://www. Isyii.com/open
I wrote the Yii extension based on the Sina Open platform: / http yii4sae.sinaapp.com Yii4sae is the best practice for the YII framework to be deployed to the Sina Open platform (SAE). The framework extensibility of YII deployment to Sae,yii can be seen without modifying the Yii source framework code.


2016.6.3 Supplement:
At present, Yii has developed to 2.0,YII use of the company has been dozens of times times more than the original. The biggest advantage of Yii is fast, agile, not procrastination, to the ability of the programmer to fly. Of course, please do not contrast, different people fit/like different things, if you have not used Yii can try, at least I spent almost 2 years, feel good. Yii is really good, if it is too dependent on the framework will lead to the inability to really understand programming, I am opposed.
At least Yii is helpful to understand and improve the programming, if you have not studied Yii is here to say that Yii does not work, or suggest you go to see yii it! I used to learn PHP when the files are random, controller, the concept of the model is not very clear.
With a period of time yii, you can form a good habit.

The components are very powerful and many things have been written. Can be used for direct use. Let's just say the shortcomings.

Yii migrate this pit slightly larger, but it is estimated that no one actually uses it.
The document is slightly concise.
  • 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.