CMS versioning strategies for content

随声附和 提交于 2019-12-03 02:51:43

问题


I'm looking at building basic CMS functionality into our web product and am researching tips and design ideas for versioning content. I'm specifically looking for database schemas in use today.

What are you using for content versioning? What patterns apply if you have different types of content that need versions stored? How is question versioning handled on Stack Overflow?

Thanks


回答1:


Literature uses a 5 dimensional model for this:

  • version (wanting to change)
  • status (life cycle: creating, testing, deploy, retire)
  • view (html, pdf, file system, derivability)
  • hierarchy (page, section, paragraph)
  • variant (largely similar, describing the differences, product families)

Most systems only handle a few of these dimensions. To handle all five, you have to describe (fix) your development process.

The reference:

Managing design data: the five dimensions of CAD frameworks, configuration management, and product data management.
van den Hamer, P. Lepoeter, K.
Philips Res., Eindhoven;

This paper appears in: Proceedings of the IEEE
Publication Date: Jan 1996
Volume: 84, Issue: 1
On page(s): 42-56
ISSN: 0018-9219
References Cited: 26
CODEN: IEEPAD
INSPEC Accession Number: 5175049
Digital Object Identifier: 10.1109/5.476025
Current Version Published: 2002-08-06




回答2:


just as a reference, drupal uses the following:

node         node_revision
----         -------------
nid*         vid*
vid          nid
...          body
             ...

(node is essentially the main content type). so each revision gets recorded, and to get the latest you pick up the current vid from node. if you're interested in diffs that may be something to add to your version of node_revision as well.




回答3:


My gut instinct is that the best thing for this is (in order of bestitude):

  1. A ready version control system. A nice list here.
  2. Storing diffs. What is a diff here.
  3. I guess the obvious database solution of having a "ContentVersion" table, where you have multiple "Versions" per unique "Content".


来源:https://stackoverflow.com/questions/270658/cms-versioning-strategies-for-content

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!