开发者

Data model for a small CMS system

开发者 https://www.devze.com 2022-12-17 07:21 出处:网络
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 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 do开发者_如何学JAVAnt 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号