Sebazzz
Sebazzz

Reputation: 1373

Architectural issue: CMS page revision history

For my personal website, I am currently developing a CMS module. One of the features of the CMS module is page revision history. The website data access layer is being developed in Entity Framework Code First.

The problem I have is: How will I assign an 'active' revision to a page?

I see currently two options:

What is the best way to implement this?

Upvotes: 0

Views: 113

Answers (1)

Ladislav Mrnka
Ladislav Mrnka

Reputation: 364319

I didn't try it but I would try use the first approach. The con is not so big as it looks like because two database modifications command are not such a big problem (page publication is not operation you would do 100x per second) and in most scenarios you will need it anyway if your CMS will provide page editor because you will first save draft multiple times (no current online version) and only after that you will publish the page (you will have current online version).

You will still need to use the second approach if you would like to provide access to the last revision because the last revision doesn't have to be the published one.

Upvotes: 1

Related Questions