php CMS 和框架有什么区别?以及如何根据某些要求在它们之间进行选择?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11629334/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is the difference between a CMS and a Framework? and how to choose between them for certain requirements?
提问by Rupesh Patel
I am currently working with Zend Framework and I am extremely happy with it. What I want to know is at what kind of requirements it is better to use CMS's like Joomla or Drupal.
我目前正在使用 Zend Framework,对此我非常满意。我想知道在什么样的要求下使用 Joomla 或 Drupal 等 CMS 更好。
Considering my current project it is a portal application. It is completely made from scratch in Zend. Then some fellow comes and comment that it rather implemented in drupal you could get plugins for the stuff you built by hard efforts.
考虑到我当前的项目,它是一个门户应用程序。它完全是在 Zend 中从头开始制作的。然后一些人来评论说它是在 drupal 中实现的,你可以为你努力构建的东西获得插件。
So I need a guideline for how to choose between CMS and A Framework at the kickoff phase?
所以我需要一个指南来说明如何在启动阶段在 CMS 和 A Framework 之间进行选择?
回答by Aram Boyajyan
The question in your case is whether to use a ready made CMS or to create your own system using a framework. The right answer depends on the following:
您的问题是使用现成的 CMS 还是使用框架创建自己的系统。正确答案取决于以下几点:
- budget
- number of users you will have (long term performance concerns)
- further maintenance
- total number of details (bells and whistles) you want to provide on the site
- implementation with third party/custom APIs
- special/custom features that require high level of freedom (example: StackOverflow reward points and badgets)
- 预算
- 您将拥有的用户数量(长期性能问题)
- 进一步维护
- 您想在网站上提供的详细信息(花里胡哨)的总数
- 使用第三方/自定义 API 实现
- 需要高度自由的特殊/自定义功能(例如:StackOverflow 奖励积分和徽章)
As this is a question most of us face pretty often, here are cons and pros of a ready made CMS vs a framework:
由于这是我们大多数人经常面临的问题,以下是现成的 CMS 与框架的优缺点:
Ready made CMS
现成的 CMS
Pros
优点
- faster start and development time if your project generally fits in what the CMS provides
- available modules and themes
- backed up by community, meaning that new features, bugfixes, support, tutorials etc. will be provided to you free of charge
- unified set of standards - it's easier to continue working on an existing CMS site than to take someone else's custom application (this is relative, but the point is that in a site that uses an existing CMS most of the things/setup will be familiar to you while in a custom app the previous developer had more freedom)
- security is something you do not need to worry thatmuch as in a custom app
- 如果您的项目通常适合 CMS 提供的内容,则启动和开发时间会更快
- 可用的模块和主题
- 由社区支持,这意味着将免费向您提供新功能、错误修复、支持、教程等
- 统一的标准集 - 继续在现有 CMS 站点上工作比采用其他人的自定义应用程序更容易(这是相对的,但重点是在使用现有 CMS 的站点中,大多数事情/设置对您在自定义应用程序中,以前的开发人员有更多的自由)
- 安全是你不需要担心这就像在一个自定义应用程序
Cons
缺点
- if your requirements are very specific, you will need to override the default workflow of the system; in some cases this can be tricky and will make you spend more time than to write your own
- redundant code in modules/plugins
- performance - a ready made CMS will rarely be as fast as a custom made application
- not suitable for every large website (unless you fit in almost everything that the CMS provides)
- steep learning curve in some cases (Typo3, Drupal)
- 如果您的要求非常具体,则需要覆盖系统的默认工作流程;在某些情况下,这可能很棘手,并且会让您花费更多时间而不是自己编写
- 模块/插件中的冗余代码
- 性能 - 现成的 CMS 很少会像定制的应用程序一样快
- 不适合每个大型网站(除非您适合 CMS 提供的几乎所有内容)
- 在某些情况下陡峭的学习曲线(Typo3,Drupal)
Custom application
定制应用
Pros
优点
- it's up to you to define the structure and the logic of the application
- app design is made especially for the project you are working on - so there is no redundant code
- freedom to do anything you want
- 由您来定义应用程序的结构和逻辑
- 应用程序设计专为您正在处理的项目而设计 - 因此没有多余的代码
- 做任何你想做的事情的自由
Cons
缺点
- expensive - in most cases you/your client will need much more money for a custom app
- further maintenance will be harder
- changes and modifications of the structure can be very time consuming
- if you aren't using a CMF you will have to reinvent the wheel in some aspects
- 昂贵 - 在大多数情况下,您/您的客户需要更多的钱来购买定制的应用程序
- 进一步的维护将更加困难
- 结构的更改和修改可能非常耗时
- 如果您不使用 CMF,您将不得不在某些方面重新发明轮子
Bottom line
底线
Spend a couple of days and learn something about the CMSs out there, such as:
花几天时间了解有关 CMS 的一些信息,例如:
- Drupal- my first recommendation; good for medium to big websites; good community; medium/steep learning curve
- WordPress- my second recommendation; good for small to medium sites
- Typo3- enterprise level system; pretty complex, combined with a frameworkwhich can be used standalone in projects
- Joomla- I personally don't like it and do not recommend it because of amateur plugins, but it is popular
- SilverStripe
- MODX
- Concrete5
- Drupal- 我的第一个推荐;适用于大中型网站;良好的社区;中等/陡峭的学习曲线
- WordPress- 我的第二个推荐;适合中小型网站
- Typo3——企业级系统;相当复杂,结合一个可以在项目中独立使用的框架
- Joomla- 我个人不喜欢它,也不推荐它,因为它是业余插件,但它很受欢迎
- 银条
- MODX
- 混凝土5
I think that any bigger and serious project, which will have at least 1-2 programmers to take care of the system at all times, should be custom. Exceptions are only if it fits exactly in what an existing CMS offers already.
我认为任何更大、更严肃的项目,至少需要 1-2 名程序员随时照顾系统,都应该是定制的。只有当它完全符合现有 CMS 已经提供的内容时才会例外。
Hope this helps :)
希望这可以帮助 :)
回答by ndequeker
Take a look at Difference between a CMS and a web-development-frameworkon StackExchange.com.
在 StackExchange.com 上查看CMS 和 Web 开发框架之间的差异。
A CMS(Content Magagement System) is used to manage content on a website. It usually provides tools to make this task as easy as possible.
一个CMS(内容Magagement系统)来管理网站上的内容。它通常提供工具来使此任务尽可能简单。
Examples of CMSes: Drupal, Joomla, DotNetNuke etc.
CMS 示例:Drupal、Joomla、DotNetNuke 等。
A frameworkis like a set of libraries / classes to build a web application. Many frameworks provide libraries for database access, templating engines etc. This way, you don't have to reinvent the wheel.
一个框架就像是一组库/类来构建Web应用程序。许多框架提供了用于数据库访问、模板引擎等的库。这样,您就不必重新发明轮子。
A CMS is often build upon a Framework.
CMS 通常建立在框架之上。
Examples of frameworks: CodeIgniter, CakePHP, Kohana...
框架示例:CodeIgniter、CakePHP、Kohana...
回答by Hari K T
@Voles mentioned what CMS and Framework is
@Voles 提到了什么是 CMS 和 Framework
So your question is "guideline for how to choose between CMS and A Framework "
所以你的问题是“如何在 CMS 和框架之间进行选择的指南”
Want to build a Blog or a simple website ?
想建立一个博客或一个简单的网站?
Go for Wordpress , Drupal etc.
选择 Wordpress、Drupal 等。
Want to build next facebook or stackoverflow or app of your own which the current cms is hard for you to learn or is limited with the features?
想要构建您自己的下一个 facebook 或 stackoverflow 或应用程序,当前的 cms 对您来说很难学习或功能有限?
Then go for some frameworks or custom made ones. Be sure that you know how to build it in the right way.
然后去寻找一些框架或定制的。确保您知道如何以正确的方式构建它。
You can have a look into http://cmf.symfony.com/also.
您也可以查看http://cmf.symfony.com/。
Hope that makes clear.
希望这能说清楚。
回答by Viral Solani
Apart from all pros and cons of CMS and Framework , According to me you need to study your requirement at the time of kickoff. List out the modules you want in your application. Now check that how many modules are available in CMS you know about like drupal , joomla , wordpress etc. and also check out that how much customization you need in this available modules as well as custom modules you may need to develop as per your requirement . And if you found out that with minimum customization you can use any particular CMS and than go for it.
除了 CMS 和 Framework 的所有优缺点外,据我所知,您需要在启动时研究您的要求。列出您希望在应用程序中使用的模块。现在检查您知道的 CMS 中有多少模块可用,例如 drupal、joomla、wordpress 等,并检查您在这些可用模块中需要多少自定义以及根据您的要求可能需要开发的自定义模块。如果您发现只需最少的定制,您就可以使用任何特定的 CMS,然后继续使用。
But in case your application may very complex in nature than I suggest go for any MVC framework like Zend , Cakephp , codeigniter etc.
但是,如果您的应用程序本质上可能非常复杂,我建议您使用任何 MVC 框架,如 Zend 、 Cakephp 、 codeigniter 等。
Yes one other thing go with any CMS or Framework that you well versed with it.
是的,您熟悉的任何 CMS 或框架都有另一件事。
回答by Praveen kalal
Framework is like a library by using this library we can develop new thing. Whether CMS as name imply its an inbuilt source to manage the content. Like wordpress we don't need to develop anything.
框架就像一个库,通过使用这个库我们可以开发新的东西。CMS 作为名称是否意味着它是管理内容的内置源。像wordpress一样,我们不需要开发任何东西。
回答by ujwal dhakal
Framework are the creator of CMS , CMS is basically a Content Management System which focuses on content managing where everything is perfectly setup for you with few lines of code and logics ur website or small app can be developed
Framework 是 CMS 的创造者,CMS 基本上是一个内容管理系统,它专注于内容管理,只需几行代码和逻辑即可为您完美设置一切您的网站或小应用程序
Whereas in framework its deeper than CMS everything you have to write from scratch or use existing library which is generally used for making big app. Hope this would help
而在框架中,它比 CMS 更深,您必须从头开始编写或使用通常用于制作大型应用程序的现有库。希望这会有所帮助
回答by Rebeka
As far as I know, CMSs and MVCs are web application frameworks with coding libraries. CMS is way easier to use for beginners, as it has its pre-made functionalities available, so you will not need complex coding. I found useful information in Wiredelta's article, maybe this will help for you as well: https://blog.wiredelta.com/cms-mvc-framework-comparison/
据我所知,CMS 和 MVC 是带有编码库的 Web 应用程序框架。CMS 对于初学者来说更容易使用,因为它具有可用的预制功能,因此您不需要复杂的编码。我在 Wiredelta 的文章中找到了有用的信息,也许这对您也有帮助:https://blog.wiredelta.com/cms-mvc-framework-comparison/

