Yii, Laravel, Phalcon which is better?

Source: Internet
Author: User
Tags php framework
Company to re-develop the mall site, before the Ecshop, and now to re-development, to use the framework to write, the above three personal reference to the online comments, is the most good, but do not know how to choose. On the one hand, I hope to have a greater degree of control over the mall Web site, mainly to the late expansion of the mall and not limited to the framework, but also easy to combine with the framework. My junior Phper, ask the great God to give some advice

Reply content:

A personal comparison of Yii is recommended for the following reasons:
    • Performance: Phalcon > Yii≈laravel, because Phalcon is developed in C language and loaded in PHP extensions, so it does not require additional parsing and execution of the framework, so performance is good. But at the same time it also reduces the control of the framework, the framework level of the bug is not easy to troubleshoot, do not understand the C language and PHP extension development is difficult to repair.
    • The readability of the code is more laravel. (Strong expressive, do not understand PHP basic can also understand what he is doing)
    • But from the speed of development, Yii≥laravel > Phalcon.
    • From the study cost, the use cost: Yii≥laravel > Phalcon.
Combined with the above: Yii leads with a slight advantage, recommending Yii. Yii powerful components, rich class Library, mature mode, convenient gii, all kinds of widgets, so that you develop a few levels of speed
I have spent several years, the company's projects are basically yii.
More cases: http://www. yiichina.com/cases I used a lot of PHP framework, Ci/kohana/zend/yii/qcodo, also research over laravel, nothing does not like, but technically I have been too lazy to distinguish between their length, can not form the essence of the difference. Yii is a well-established framework, its architecture is close to the actual use cases, the source code is also very good to read, this is not to say that other frameworks are not so, but that Yii did very well.

I ended up in Yii's camp, first of all, of course I like the possibility that this framework provides for development, and its architecture design;

But the main reason is that Yii's author Manggold j, Qiang Xue | Linkedin
Qiang Xue is a established software engineer with + + years of enterprise software development experience. He is a expert in business intelligence software as well as WEB framework development. He is the founder of Yii, one of the most popular web frameworks, powering thousands of Web applications. Qiang is an avid open source contributor, a big fan and practitioner of test-driven development and agile methodology. Qiang received his PhD, degree in computer, from Duke University.
is a Chinese language, if I intend to invest my time in a key technology or a community, I think the author and as a user of the culture overlap is very important non-technical factors;

Maybe it's just my personal feeling--until one day I quietly noticed that my French colleague strongly admired Symfony for being lazy to look at yii even if I put all sorts of advantage in the hands of beginners (presumably SF) and agile Development in PowerPoint.

Culture is important, with yii let me and it have a kind of connection, I compare care, plainly, because the elder brother is Chinese, flow is not popular really, calculate a what, moreover Yii is also very popular, use it to do a lot of projects, has been very comfortable. For your reference: I read a lot of articles before the frame, the domestic foreign, Chinese and English have, finally choose Yii ==> Yii2 from 11 contact Yii began, know now, with Yii do several projects, probably belong to the bat inside of small and medium startup project more. The most recent one is the application layer of an e-commerce project. As a whole, yii is really a good balance.
1. Automated CRUD allows you to complete the interface immediately after you have data modeling.
2.layout View layout mode allows you to easily block.
3. Flexible widget mechanism, the reuse of chunks is also very convenient, this time the e-commerce system on the page of the complex ads to achieve through this.
4. The provision of modules allows several teams to easily segment code within the same project. (Operational activities are another development team developed separately in several modules)
5.url Manager's rules, can transform a controller into any customer needs URL link format (first customer to xxx/product-111.html later to xxx/p/111.html last to xxx/111.html)
6. Cache, session and other packages, so you easily switch between Redis file cache, database, etc.
7. Powerful log system, different levels of logging, easy to trace problems
8. The verification section may be a matter of opinion, but for the early stage, good model+validate encapsulation, can reuse the front-end JS and back-end PHP layer validation, and form submission validation, is also the most complex part, relatively simplified
9. Theme function, through different themes, to achieve a phase two phase of rapid iterative development. The PC and mobile versions are also implemented
10. Performance, through Opcache, actually not slow, can imagine PHP7 support, performance can still improve a level. Tens of millions of PV to billion-level PV, but also can support, of course, if there is such a large amount, you can choose any technical architecture.

Temporarily so much, what is the problem, we can leave a message, really recommend startup with Yii, as long as the follow rules, write out the code quality is also relatively high. The other two frameworks, I don't use much, do not evaluate.

In foreign countries, SYMFONY2 has been the standard of the enterprise PHP Framework, E-commerce basic use of Symfony2, such as Magento,sylius, I have done a simple comparison, Laravel and symfony in the architecture and core functions, basically the same ~ ~ There is no one more powerful to say. But Laravel has two different, the first language is beautiful, the second out of box, it is user-centric, has done more packaging, with a lot of best practise convention, favor black box, compared to the style of Apple, like an Apple phone; Symfony2 to White box, The architecture is clear and flexible, but very complex and cumbersome ~ ~ You need to do a lot of wheels, the advantage is that the wheel can be easily debugged, a bit like Windows Enterprise Edition.

As far as the framework itself is concerned, the individual believes that Laravel 5.1 is the best in all current "All-stack" PHP frameworks. The keyword here is "full stack", Laravel 5.1 can almost take care of any Web application, and JS of some of the front-end framework is very compatible with the perfect. It also means that individual developers can independently develop a very cow B application around this framework, such as the popular SNS Community system, which is basically kind with laravel.

Team Development on the Laravel 5.1 is also an advantage, its good extensibility and advanced architecture, is the true meaning of the "modern Framework", the team can be based on the framework of the characteristics of the development of a very rich strategy. For example, Laravel has good support for CLI commands, which means that there is a lot of room for automation code to play.

Whether PHP novice or veteran, Laravel 5.1 is worth learning, it is like the php field of Photoshop, so don't hesitate.

If you haven't used any of these frameworks, it's highly recommended to start with Laravel

Personal recommendation Yii Learning a new framework can bring wage increases?

If the answer is no. Then the well-blown framework for you is None (RAN) (Bing) (Nuan). Don't worry about the people who preach. Every time I was a person walking elegant, efficient, personal accomplishment. I asked him directly if he could get a raise.

The price of your market is basically a description of everything. It's better to accompany you with your female ticket if you have time to learn that thing.

Apes usually think relatively simple. Easy to be cheated by people of all kinds of trails. Everybody be vigilant!

--------------------------------------------------------------I use CI. Simpler words without frames. It can be assembled with some composer packages. Lara relies on too many composer packages. Each component looks too long. Yii If you want to use built-in stuff. The naming of these frameworks and the various established constraints must be met.
However, the program itself is very free. Each language is just a few basic constraints to us. How to build a concrete house. Look at your hobbies.
Feel you once familiar with the frame. I'm going to get out of these things eventually.

Personal opinion: Most of the frames are Tuo xiang. Beginners because they can not understand the framework. So I think the frame is so powerful. Efficient and convenient. Of course. Learning Framework is very helpful for beginners to develop some norms and deepen their understanding of language. But 1000 people have 1000 hamlet in their hearts! The frame is no better than the frame author's understanding of some languages! Your understanding may not be the same. When you are familiar with the later, you will have your own unique understanding and knowledge. Laravel, Phalcon All inclusive of the current popular design ideas and programming awareness
Laravel, while complex, powerful, combined with composer, leverages a variety of third-party class library combinations to implement the framework, such as the Doctrine,symfony series components. Must be the future development trend, quite worth a use.

Phalcon is the extension of the implementation of the PHP framework of another development ideas, but also derived from the Zephir this alternative way of PHP expansion, if you want to do a deep customization of the framework, no C Foundation, is really a big problem, but this framework in the event of problems, it is easy to let the new confusion, And a bad location problem.

The individual has little affection for yii, too many slots. Strange directory structure, nondescript namespace rules (Early Learning Java style), there are too many rules to constrain the behavior of developers, component definitions are not good, the documentation is blunt.

The above framework, for beginners, the threshold is relatively high, if not the framework to do in-depth learning and understanding, it is difficult to easily navigate.
Recommended Symfony, powerful, beginner threshold low, design ideas avantgarde, suitable for large and medium-sized project development, easy to use. Recently the company to do ERP, no one tube, I chose a everyone said Laravel, with laravel written code is really elegant, there is also very attractive to me is his database migration function, team collaboration development is very convenient.
Talk about shortcomings, although the routing function is very strong, but some cumbersome, not very concise
Performance doesn't look good to the naked eye.
Read the source code, see the Kenerl route distribution and middleware to see the segment was a bunch of closures dizzy, so the internal implementation feeling is not very simple and elegant
ORM is not very useful
The translation of the document is not good, the original writing is not how much, the cost of learning is very high
  • 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.