Why are most open source projects not developed with the MVC framework?

Source: Internet
Author: User
Tags php language
Mainstream PHP open source applications such as: Discuz,wordpress, various CMS, etc.
There is basically no use of open source framework development.

In addition to historical reasons:
1, if the use of framework development is not more secure mature stable?
2. What are the factors that lead to these open source projects not adopting an open source MVC framework
3. What are the drawbacks of using the open source MVC framework?

Reply content:

Hello friend, thank you for inviting me. I hope my understanding is more than misleading for your help. Then talk about my opinion.

Through the topic to see the main question to PHP very feel oh. Personally, although I am not a professional phper, I did learn and really practiced. The sense that PHP is really a powerful tool to attack, low cost development, and performance is also good. Well, we are not talking about language today, we should turn to open source, framework, MVC and other topics.

First of all talk about the landlord's topic, I do not know how you understand the MVC. MVC is a design idea and a design pattern. This should be true, but the selling point of any framework is not because he was developed in accordance with the MVC pattern. It is because it real deal to provide a quick solution to some kind of problem. You use it because you have the need for it to bring you convenience. Whenever an introduction to an MVC framework is basically the case, XX is an MVC framework for solving the XX problem, and you should see that the focus is on what to solve, not the MVC framework that comes with it. Framework is like a product for programmers, a product if not for a specific type of problem, then the meaning of this product is not good to say. If you just think of MVC as a product, it's like you can do anything with your product, but you don't have to do anything, and no one needs that kind of product.

I think I just detour, actually, I want to say that our choice of a framework often depends on the development purpose of the framework, not the development model.

Speaking of the framework, I immediately remembered the Java SSH framework. It seems to be part of Java itself. People who have learned Java now generally go on to learn about the SSH framework. And SSH usage is also very high. I think of the time when I was reading the book in the library while eating Java big books. Alas, the past is unbearable. Okay, let's get to the chase.

Next, let's talk about the problems that can arise from introducing a framework:
    • Performance Loss . Any framework can result in a performance penalty, which is also a performance-demanding project that often does not use frames and optimizes for its own scenarios. Of course, this performance in today's probably can be ignored.
    • increased complexity . Learning costs and deployment costs that's the problem you have to face.
    • adaptability . Once the framework is introduced, your overall structure is fixed to death, you need to follow a fixed pattern to use, this place to add some of their own specific code, and another place to add a little, these are the framework to help you set the good. This thing may actually be good, in terms of your follow-up maintenance or something, but you have to adapt.
    • friction . This is not a good thing to say, some of the framework may be very much in line with your needs, and some places are not what you want, or even reverse. At this point you either go to hack or change the source code of the framework. You won't be particularly happy to use it anyway.
Said the framework to say the PHP language itself. As an easy to learn to use, a lot of functions built into such a language. You find that many of your operations don't need to be packaged, and the built-in is powerful enough. In the past under the influence of MVC, I use PHP to write things like this, first set up a Module,view,server3 directory, and then follow this idea to populate the corresponding code. Is this a simple implementation of MVC? So the personal feel that PHP built-in power can lead to fewer usage frameworks. A framework cannot be too abstract or too flexible. This is difficult for PHP to grasp. Sometimes you should think about what you need is some PHP code snippet or a framework.

Why don't you use an open source framework for these things like discuz,wordpress? I also want to try to answer. But it's just speculation.
These things tend to be single-purpose, target-specific, and with PHP development, the amount of code is not necessarily very much. The use of frames makes it difficult to flexibly adapt to the needs of the scene, which brings a higher degree of complexity. For this type of mass product, most users need a quick installation, and a few programmers want to modify the customization. So, whatever the need, complexity is not a good thing. It is also possible that the author does not see someone else's code. How to write yourself how cool. Open source code tends to pursue freedom, while business projects tend to be efficient. So business projects tend to use frameworks more often.

Speak ill of such a frame, for this is the focus of our problems. In fact, a good framework can save you a lot of work, saving you a lot of time. So the framework is a good thing, and often the downside is that it encounters a programmer who doesn't understand it.

I think any one of us or the group should be sure to identify their needs and understand the framework you will use when choosing an open source framework. After you have made the necessary tradeoffs, you can determine whether to use the framework. The frame is not you want to use, want to use all can use, otherwise you finally know the truth of your tears can only fall down.

If you can specify what you mean by the PHP Open source MVC Framework, perhaps I can answer more punchy. The above is for personal humble opinion only. The open source project you're talking about is a little broader, and you don't know what open source projects you're looking at. The purpose of different open source projects and the application of the scene is different, as far as I have seen, can be broadly divided into the following major categories:
    1. The Base Tool Library, which helps you take care of something very dirty or tricky, lets you focus on business logic, such as jquery in the front-end, encapsulates many issues with browser compatibility, and provides a very unified interface for front-end engineers;
    2. Workflow frameworks that help you sort out typical workflows for certain jobs, such as Web sites that process user requests and respond to data layers, logical layers, view layers, and so on, mostly using more mature design patterns, typically MVC, and, of course, to make these frameworks easier to extend, There will be other models to be used, such as Factory mode, proxy mode, this framework is too many, each language has a lot, countless, such as Java spring,php cake,zend,think,javascript backbone, Nodejs's Express,python Django and so on.
In general, each open source project is the author of the accumulation and skill of his work to be released for others to use, hoping to get the contribution of others, crowds, the current many projects on GitHub is so, with these projects, the later work can be said to stand on the shoulders of giants. I estimate that the 2 in the development of the time, MVC ideas have not been popular to PHP bar.
Now that PHP is popular with MVC, they already have their own set of framework systems.
Before there was a little look at their source code, feeling is written by a madman. Let me not be able to maintain, I do not know what their team is thinking. It could be a process-oriented agile development. or to consider performance or other.
But look at the current out of the open source program, basically is to follow the MVC, like Phpwind,shopex, so, MVC is the inevitable direction of it. I am also thinking about using the framework .... Feel like you are developing redundant code is not a lot ... Individuals feel that the framework is dependent on others, they are fully capable of building their own framework, rather than spend their energy to study a framework, rather than write a framework. (large projects are very frequent with extended modifications to the framework.) Wecenter an open-source social question and answer program in China is the MVC framework, you can try it I think MVC is very good, development efficiency is very high. Read the source of Dedecms, write a bit bad
  • 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.