CMS is the abbreviation of "Content Management System", which means "content management system". Content management system is the new favorite in enterprise information construction and e-government, and it is also a relatively new market. For content management, the industry does not yet have a unified definition, and different organizations have different understandings. Many people have studied PHP for a long time, but their understanding of PHP framework and CMS is relatively vague.
This is actually very important and should be understood comprehensively and clearly. Now the editor will go and understand it with everyone.
1: Respective representatives
Framework representatives: ThinkPHP (referred to as TP, and its latest version TP5), Laravel, YII, CI,...
CMS: Content Management System: Content management system; representatives include: PHPCMS, dedecms, phpMyWind, Empire CMS, Ecshop, ECMall, Discuz, PHPWind
2: Knowledge difficulty
The framework requires a relatively high level of knowledge. It requires a deep understanding of object-oriented programming ideas, as well as a deep understanding of MVC principles, single entry principles, and tag parsing engine principles. Only then can the framework be used flexibly for development; so it I am a person who is adaptable to a relatively comprehensive foundation of PHP;
CMS does not require such advanced knowledge. If you know a little bit of PHP syntax and basic things, you can use CMS to develop a simple project. And it’s relatively fast (but it’s a headache to maintain).
CMS is the favorite for entry-level PHP users.
3: Application Scope
CMS has limited application scope, so you must choose the right one, otherwise there will be endless troubles. For example: a certain type of CMS is only suitable for developing one type of project. If you choose the wrong one, you may have to develop it again. For example, PHPCMS is suitable for developing article-type management systems, Ecshop is suitable for developing city-type projects, and Discuz is suitable for developing forum-type projects; but if you want to use Ecshop to develop forums, there are too many things that need to be changed, and there will be a lot of trouble. Detour....
And the framework, because it is a lower-level thing, can be used to develop any type of project.
In addition, the framework can also develop CMS, but conversely, CMS cannot be used to develop the framework (which will cause the performance to be too low).
4: Development features
In the framework, you may not see a specific controller subclass file, so for framework-based development, you must first do it yourself When writing controller files, you also need to arrange where to write them. These have the framework's own rules. Although you can flexibly modify the location of the folder, you have to find out why.
In open source systems such as CMS, these files are written for you, and the locations are arranged for you. You can basically modify the ready-made files. You'll have a lot less to do.
5: Comparison of flexibility
Use a framework to develop, you can modify your project module structure at will, and add the functions you want at will, such as: you You can also add a tourism module to the article system; for example: the "PHP Sunflower Collection" project (www.phpkhbd.com) is developed using a framework, and you can easily add any desired functions.
But if you want to achieve this intersection of interleaving functions in CMS, it will be more troublesome.
6: Speed comparison
Using a framework to develop, the development speed is slow, but subsequent modifications are flexible, and the speed will be very fast. If you encounter problems, you can immediately know where you are. , it can be said to be "one step to the point, hit the nail on the head."
Use CMS to develop: It is fast during development, but subsequent modifications, especially when adding functional modules, are not flexible enough, which will cause the speed to be very slow and even impossible to implement.
For example: a project you develop using a framework may take 2 months to develop, but when you subsequently upgrade the project, it may only take 1 week to add some functionality. If you use CMS to develop, it may only take 3 weeks for the development project to go online. However, if you upgrade functions and add new functional modules, it may take 3 weeks or more. It may not be implemented, or if it is imposed, it will affect the performance of the module. Even the performance of the entire system is greatly reduced. And this happens every time I upgrade.
So, you should be clear about how to choose: If you want to make a long-term updated project, then using a framework to develop is the best choice.
Finally, let’s use a metaphor to summarize: building a house
Using a framework to develop a project is equivalent to knowing how to build a house;
But what you have to do starts here Do: You need to lay the foundation for the house first (you need to calculate how many meters you need to dig for the footing), how many pillars the house has to support it, and how many rooms it can support. You also need to calculate how many rooms are built on each floor. It’s up to you to decide how to lay out the room. All these are done, and then you install the windows, paint the walls, and paste the wallpaper...
Using CMS to develop projects is equivalent to you only decorating the house;
As for the house You can't control how deep the foundation is, how many floors the house is on, the layout of rooms on each floor, or the installation of glass windows. But what you have to do is also very trouble-free: all you have to do is install what brand of glass where glass can be installed (but you cannot modify whether the window opens to the east or west, because this is the person who built the house. (decided), paint the walls white or red, and paste wallpaper with any content (beauty type or forest type, it’s up to you)...
Which of these two results is better and who is not? It depends on your interests and hobbies. If you are a person with personality, you may admire the ability to build a house. If you are a lazy person, you may admire those houses that only need to be renovated for you to move in and live in.
Special note: If there is a problem with the creation of the house, for example, if you want to change the creation of 4 rooms on one floor to 5 rooms, then only someone with the ability to create a house can remodel the house. , simple decoration workers have no rights. Framework development means having the right to renovate a house...
And if you are still doing simpler work in decorating a house, such as only writing templates and only applying templates, then you are equivalent to having a boss even at your computer desk. Be prepared, you just need to place your computer, mouse, and keyboard on the computer desk. That kind of "fully furnished, check-in hotel" is the best representative...
Summary: We have almost introduced PHP and cms. From this we know that the combination of PHP framework will make cms development easier and shorten the time. I hope this article can help everyone.
Related recommendations:
What are the most recommended open source PHP CMS systems?
20 of the most well-known open source PHP CMS
The above is the detailed content of The relationship between PHP framework and CMS. For more information, please follow other related articles on the PHP Chinese website!