Zf2+doctrine2 and Yii, which option would you prefer?

Source: Internet
Author: User
Individual from the frame to compare preferences ZF2, he is indeed more cumbersome, slightly lower performance, but his coupling and scalability are better, and the environment of social programming is relatively strong, the whole recently managed to GitHub. However, the ZF2 ZF tool is a garbage, the function is too simple, some other tools have automatic code generation tools are not, compared to the impact of development efficiency. But there is an ORM tool called Doctrine2, comparing PHP version of MyBatis (say, MyBatis even C # support, why do not want to support PHP, feel Hurt), by adding annotations when encoding, you can use his command line tools to automatically generate code, This feature is awesome and can reduce unnecessary work. and composer is similar to Maven's dependency management style, and it's also a great feature.

Yii, lightweight, relatively high performance, Yii extension is also rich, but the coupling degree of the frame is slightly higher, so for some customization and extension is not very friendly. One of the biggest highlights of YII is its own gii, which is quite good as the model layer's generative tool. If you customize your code template, you can also add more important ORM features such as caching, lazy loading, and more. Moreover, Yii's Chinese documentation makes it easier for people to study and learn. ZF2 's Chinese document, or the document itself, is poorly written.

Of course, there are a lot of other frameworks that are outside my scope of discussion. Therefore, the two frameworks have a certain understanding and preferences of friends can discuss the use of their own feelings. Ci/thinkphp/symphony supporters please don't hit me, I'm not black they mean.

Reply content:

Individual from the frame to compare preferences ZF2, he is indeed more cumbersome, slightly lower performance, but his coupling and scalability are better, and the environment of social programming is relatively strong, the whole recently managed to GitHub. However, the ZF2 ZF tool is a garbage, the function is too simple, some other tools have automatic code generation tools are not, compared to the impact of development efficiency. But there is an ORM tool called Doctrine2, comparing PHP version of MyBatis (say, MyBatis even C # support, why do not want to support PHP, feel Hurt), by adding annotations when encoding, you can use his command line tools to automatically generate code, This feature is awesome and can reduce unnecessary work. and composer is similar to Maven's dependency management style, and it's also a great feature.

Yii, lightweight, relatively high performance, Yii extension is also rich, but the coupling degree of the frame is slightly higher, so for some customization and extension is not very friendly. One of the biggest highlights of YII is its own gii, which is quite good as the model layer's generative tool. If you customize your code template, you can also add more important ORM features such as caching, lazy loading, and more. Moreover, Yii's Chinese documentation makes it easier for people to study and learn. ZF2 's Chinese document, or the document itself, is poorly written.

Of course, there are a lot of other frameworks that are outside my scope of discussion. Therefore, the two frameworks have a certain understanding and preferences of friends can discuss the use of their own feelings. Ci/thinkphp/symphony supporters please don't hit me, I'm not black they mean.

It makes no sense to ask, but I would obviously prefer yii in terms of development efficiency and execution efficiency. A one-stop solution is simply a mighty domineering. In real-world use, the combination of GII and ActiveRecord enables very rapid development of complex functional applications. The functionality of the framework itself is well represented in terms of security and extensibility.

However, the question of bias needs to explain your needs first. If you need an entire decoupling of the framework, I might recommend you use Symfony2. But for rapid development and efficient operation, the choice of yii is the right thing to do.

PS: Which frame is not hosted on GitHub ...

  • 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.