小型 CMS 系统的数据模型

发布于 2024-08-18 12:13:23 字数 595 浏览 9 评论 0原文

我一直想制作一个小型易用的CMS系统,仅供个人使用和培训。

我要做的第一件事是创建数据模型。那么我需要什么才能开始呢?

我想动态创建页面,那么我需要一个页表。我知道许多 CMS 系统将它们称为节点,因此我将其称为节点

我还想将节点附加到一个或多个菜单,因此我创建了一个 Menus 表。 为了使这两者协同工作,我需要一个 MenuNodes 表来处理这两者之间的关系,并确保一个节点可以存在于一个或多个菜单中。

有一些数据模型,其中一个例子是 Joomla 的制作方式:
Joomla 数据模型

这个相当先进,但是我如何使用其中的一些同样的原则可以制作一个小型且易于使用的CMS系统。

从一开始就获得正确的数据模型至关重要,因此在正确之前我不想进行任何编码。我有信心我可以制作一个足够好的数据模型,但我想使用最佳实践。

有谁对好的 CMS 数据模型有任何想法或参考可以帮助我入门吗?

I have always wanted to make a small easy to use CMS system just for personal use and training.

First thing im going to do is create the data model. So what do I need to get started?

I would like to dynamically create pages, then I need a Page table. I know many CMS systems reffer to them as nodes, so I'll call it Nodes.

I would also like to attach the nodes to one or more menus, so I create a Menus table.
To make those two work togheter I then need a MenuNodes table to handle the relationship between those two, and to make sure that one node can exist in one or more menus.

There are a few data models out there, one example is of how Joomla is made:
Joomla Data Model

This one is rather advanced, but how can I use some of the same principles to make a small and easy to use CMS system.

To get the data model correct from the start is essential, so I dont want to do any coding before I get this right. Im confident I can make a good enough data model, but I want to use the best practices.

Does anyone have any ideas or references to good CMS data models that can help me get started?

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

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

发布评论

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

评论(1

何以畏孤独 2024-08-25 12:13:23

如果是为了个人使用和训练,就编一些东西然后用吧。根据您的需求和想要做什么自行设计。从头到尾查看设计而不试图利用别人对您的应用程序的看法是很有价值的。

对于我所做的 CMS,我只有页面、页面模板、故事和属性(故事/页面的有效组件)。但导航在我的系统中并不是什么大问题,更重要的是更新静态页面。

我把赌注押在了导航上,因为这些网站有非常静态的导航需求,根本不值得抽象。

但是,无论如何,只需做您认为适合您的情况的事情,然后看看效果如何。如果效果好的话,那就太好了!如果没有,下次你就会知道得更多,所以一切都很好。

If it's for personal use and training, just make something up and go with it. Design it yourself based on your needs and what you want to do. There's a lot of value in seeing the design through start to finish without trying to leverage someone elses view on your application.

For a CMS I did, I simply had pages, page templates, stories, and properties (effectively components of a story/page). But navigation wasn't a big deal in my system, rather updating static pages was more important.

I punted on the navigation because the sites had very static navigation demands that were simply not worth abstracting.

But, anyway, simply do what YOU think is right for your case, then see how it works out. If it works good, great! If not, you know better for next time, so it's all good.

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