0
votes

I need to develop simple CMS functionality, it supports multiple pages with static HTML ( with WYSIWYG editor)

To keep it simple, I can save the content in DB and give an ID to the page and permalink. For every request, take the permalink ( from URL) and serve the content read from the DB.

While this is not efficient, I can think of following approach, In the start-up and while editing, load the content and push it to the CDN server with permalink path. But, it increases the development efforts.

I have following questions based on above

1) Is it good practice to save the HTML content in DB, if not what are the alternatives ?

2) How does the Wordpress does this, So I can take design clues ?

3) Is there any very simple CMS product that I can customize, I cannot use wordpress because it has too many features, It would be better to develop the CMS rather than maintain the wordpress huge code base ?

2

2 Answers

1
votes

Saving HTML in DB is perfectly fine and AFAIK WordPress does it that way.

If you would do it by yourself you can provide some cache in files (e.g. for content visible on main page).

Anyway I would prefer WordPress, since it has e.g. anti-spam filters, sitemap generations and so on. And you have all updates for free, what is really important.

1
votes

As seen, saving HTML in the DB works. But definitely not the neatest approach for saving an entire page/template.

You should check out CouchCMS. The developers made use of @stacker's approach. They introduced custom tags which can be used to declare variables within templates and then the content of the variables are automatically detected and can be saved in the database using the CMS.