cms应用程序的mvc方法

发布于 2024-09-06 11:02:09 字数 344 浏览 2 评论 0原文

你好,我的任务是用 php 创建一个相当复杂的 Web 应用程序,它是一个自定义 CMS,能够复制 WordPress、Joomla 或 Drupal 等知名内容管理系统提供的功能和特性。我将尝试将这些众所周知且强大的系统提供的尽可能多的功能集成到我的应用程序中。当然,我要遵守的另一个条件是从头开始构建一切。

我倾向于在构建主应用程序时采用 mvc 模式设计。不过我以前没有在这种规模的项目中使用过这种设计。

我的问题是针对那些在大型复杂应用程序中使用过mvc的人的。我想知道这实际上是否是正确的方法,以及在这种规模的项目中我可能会遇到哪些陷阱。我还想知道你们中是否有人使用不同的方法创建了相当复杂的 cms,以及您将如何构建这样的应用程序

Hello I have been tasked with creating a fairly complex web application in php, it is to be a custom CMS that would be able to replicate the functionality and features provided by well known content management systems like WordPress, Joomla or Drupal. I am to try and integrate as much of the functionality that these well known and powerful systems provide into my application. And off course one other condition i am to comply is to build everything from scratch.

I am inclined to go for the mvc pattern design in building the main app. Tho i haven't used this design on projects of this scale before.

My question therefor is destined to those of you who have used mvc in large-scale complex applications. And i would like to know if this is in fact the right approach and what are the pitfalls that i might come across in a project of this scale. I would also like tho know if any of you that have created a fairly complex cms using a different approach and how would you structure such an application

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

(り薆情海 2024-09-13 11:02:09

就我个人而言,我会保证模型-视图-控制器类型的 CMS 比其他任何东西都重要(特别是如果您是开发 CMS 和基于它的项目的人),但是实际的业务分离可能不会影响您的整体应用程序设计。

例如...

  • 您是否计划使用 RDBMS 或任何其他类型的持久性? ORM 的使用是理想的/必要的/过于复杂的吗?
  • 您会使用某种框架或第三方库/工具来帮助开发此 CMS(从头开始 是一个相当模糊的词)
  • 它是否需要某种管理界面、模块或插件?
  • 纯 php 模板/视图/布局是否足以满足您的日常工作,或者您是否需要复杂的模板引擎(Smarty、Dwoo 等)?
  • 该 CMS 是否会覆盖高流量站点,是否需要不同类型的后端/前端缓存?
  • 您会处理安全数据吗?
  • 潜在的功能是否涉及操作图像或其他媒体?
  • 您会自己托管此 CMS 还是将其托管在(但不限于)中等信任托管上?

总而言之,MVC 架构只是一个基线,用于说明在创建新功能(编写代码)时如何区分不同的关注点和业务价值 - 创建新表单、列表、工作流程、导航结构、聚合等。但是,应用程序 (CMS) 的实际架构取决于如何以及使用它,次要因素是您的开发团队的规模经验

Personally, I'd vouch for a Model-View-Controller-type CMS above anything else (especially if you're the one developing both the CMS and projects based on it), but the complexity of the actual business separation might have no impact on your overall application design.

For instance...

  • Are you planning to use a RDBMS or any other kind of persistence? Is the usage of an ORM desired/necessary/over-complicated?
  • Will you use some kind of framework or third-party libraries/tools to help developing this CMS (from scratch is a fairly ambiguous word)
  • Does it need some kind of admin interface, modules or plugins perhaps?
  • Would pure-php templates/views/layouts suffice for your daily work or do you require a complex templating engine (Smarty, Dwoo, etc.)?
  • Would this CMS cover high-traffic sites, are different kinds of back-/front-end caches required?
  • Will you be handling secure data?
  • Would a potential feature involve manipulating images or other media?
  • Will you host this CMS yourself or will it sit on, but not limited to, Medium-Trust hosting?

To summarize, a MVC architecture is merely a baseline as to how you separate different concerns when creating new features (writing code) with Business Value - creating new forms, lists, workflows, navigational structures, aggregates, etc. However, the actual architecture of your Application (CMS) depends on how and who will be using it, secondary to the factor of your development team's size and experience.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文