Menu:

Developing a content management system Part 1

Introduction

This site is currently implemented using MODX, and not very well on my end as I wanted something fast. It is also residing on a basic Linode running Debian Linux. I was always intending on creating a new site, but was most likely going to use an existing CMS, like Drupal.

I'm not a fan of PHP and have starting wanting to redevelop this site using Ada, Linode lets me rexecute binaries directly as it is a virtual system. I could use the Common Gateway Interface, but this is old technology and every invocation of an URL would mean that an application will have to be spawned from the web server, this is rather slow. Enhancements to CGI are Simple Common Gateway Interface (SCGI) and FastCGI; the former is simple to implement (hence the name), the other is actually quite difficult. I had previously implemented code to handle the SCGI protocol for Jesse Lang's Solid framework, so I'll use this.

I'll also require a Unicode library, so I'll utilise the League library in Vadim Godunko's Matreshka framework. This does have a FastCGI implementation, but I won't be using that.

Also required is template parsing, so that the document style can be replaced easily. There is a template parser library in the AWS project I can use for this.

Key concepts

The design of this CMS is fulfill the following requirements.

High level design

First we need to think about how this CMS is going to be structured at a high-level, the following diagram shows this using the client-server model.

High level structure of the CMS

The CMS runs as a daemon process in the background on the operating system, the HTTPD (the web server) will be configured to send certain requests over sockets to the CMS server, the CMS will then send a response which in turn gets passed back to the client that requested it.

You'll notice in the diagram that there is an External box. This basically means that there could be other servers that the CMS daemon needs to access.

System structure

The next diagram shows how the CMS fits in with the operating system. The CMS communicates with the web server via SCGI, it also interfaces to a database server and the filesystem. Very few OS specifics will be required:

  1. running the CMS as a daemon, and
  2. modules architecture.
System structure of the CMS and the OS

I have chosen PostgreSQL as the Database for storage of the various content within the CMS. I have heard very good things about the quality of this software from other Ada developers. There exists a number of bindings to libpq, I shall try the one in Matreshka as it also provides a common abstraction over other databases.

Abstractions

The following diagram shows the general abstractions that will be included in the CMS.

Abstractions required for the CMS

Documents

Documents are what the CMS is managing. Documents can be extended to create new types of documents, for example a site could have a blog document, an article document, a product document.

Each document has a number of fields that the user can complete when entering the content:

But the administrator can add new fields to the document type to give it more structure. For example, a site for a newspaper could add a photo field to a story document which could be shown at the top of the page and have it float to the right so the text flows around it.

As stated in the key concepts from the beginning of this article, each document has revision information. The database will essentially store a new version as new revision of the document, unless explicitly set by the user. It should be possible to roll back to a previous revision, thus deleting any subsequent revisions.

Fields

As mentioned in the previous section, Fields provide a mechanism for adding fields to the input forms on the documents. These fields can be anything and will provide extra features that an administrator wants to add to a site.

API's

API's are added to the system and can be used by other modules to build extra features or content. These API's can provide admin interfaces if one is required.

Users

These are the human's who use the site built with the CMS. Usernames and passwords, profile information can be built up separately.

Roles

Roles are given to specific users, such as Administrator, Editor, Writer, etc.

Permissions

Permissions define what a user's role can do within the CMS, e.g. deleting content.

Modules

Modules provide a mechanism to extend the CMS with new Documents, Fields or API's to enhance the CMS. An example could be an online shopping system.

Cache

The cache is where pages are stored after they've been taken from the database, parsed, tuck together with the other template fragments and sent back to the client.

N.B: I have just had a thought about this, say you have advertising on a page, this could end up getting stuck with the same ad on every page request.

Database

The database is where the content is stored.

Skip to Part 2 of this project.

If you have any comments or any ideas that I've missed out, please use the form below.

tn requin pas cher
Comment
Light70
Reply #9 on : Thu October 23, 2014, 14:01:14
looked at indicate all of hidden documents under web server nonetheless absolutely no htaccess data file. my spouse and i do not have it. this can be ridiculous, significantly aid needed below. all of i wish to tn requin pas cher http://www.lesartsdutao.com/cache/tnnike/ perform is manage to tn requin pas cher http://www.lesartsdutao.com/cache/tnnike/ add plug ins on wordpress hey james<br />i modern coming from starhub cable television broadband internet 60 mbps to tn requin pas cher http://www.lesartsdutao.com/cache/tnnike/ be able to tn requin pas cher http://www.lesartsdutao.com/cache/tnnike/ nutritional fibre braodband a hundred mbps and i also discover that food fibre is usually more slowly when compared with cable tv and becos of the nonsense offered over nutritional fibre produced typically the swap and found that will newly pvp bot router also are not able to tn requin pas cher http://www.lesartsdutao.com/cache/tnnike/ use definitely not compatible<br />better in order to tn requin pas cher http://www.lesartsdutao.com/cache/tnnike/ remain focussed on cable television broadband<br />best rgds<br />hozefa
Buy FIFA 15 Coins
Comment
Niche317
Reply #8 on : Wed October 22, 2014, 02:15:21
I do not know what you are saying
Buy FIFA 15 Coins http://inskoolz.com/profiles/blogs/buy-fifa-15-coins-from-fifa15-coins-com-with-enjoy-best-service
FiFa 15 coins
Comment
Maaike620
Reply #7 on : Tue October 21, 2014, 10:56:37
What if I had the guts to quit my job.
FiFa 15 coins http://wildstarplat.deviantart.com/journal/FIFA-15-coins-collecting-guide-470814301
fifa 15 coins
Comment
Desc179
Reply #6 on : Tue October 21, 2014, 09:22:17
Do you have a good sense of humor .
fifa 15 coins http://2p.com/9322985_1/Must-read-FIFA-15-Currency-Complete-Guide-or-Wiki-by-DavidForsyth.htm
Metalarte Lewit Pendant Lamp
Comment
Unity696
Reply #5 on : Thu October 16, 2014, 11:43:38
It's a shame you don't have a donate button! I'd certainly donate to this superb blog! I suppose for now i'll settle for bookmarking and adding your RSS feed to my Google account. I look forward to fresh updates and will share this site with my Facebook group. Chat soon!|
Metalarte Lewit Pendant Lamp http://www.damtodam.com/pdf/?p=article-Metalarte-Lewit-Pendant-Lamp.html
Soscik 72 Chandelier
Comment
Light967
Reply #4 on : Thu October 16, 2014, 11:43:36
I was recommended this website by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my difficulty. You are incredible! Thanks!|
Soscik 72 Chandelier http://www.jwhtech.net/images/psd/tiles/?p=article-171.html
monclet coats
Comment
Better299
Reply #3 on : Thu October 16, 2014, 11:16:01
I use this feather with vector formatting you can ask if you requires You think you can what is file spreading internet site to see what is happening? We treasured all those down so much. Thanks a lot.
monclet coats http://www.littledresskits.co.uk/wp-content/uploads/cache/
chaussures nike air max 1
Comment
Niche40
Reply #2 on : Tue October 14, 2014, 18:26:24
Yeaha! I actually completely love Hypem. The very best with the ton Outlined on our site point out.
chaussures nike air max 1 http://www.lamdyne.com/cache/
canada goose pas cher
Comment
Likeness867
Reply #1 on : Sat October 04, 2014, 04:16:26
This does not have few function and so i phone did.. continue to it has the hotselling device.. I can wait to have my very own on the job ipad tablet... <br />. -= Tough Agrawal's final website... two Totally free apple ipad Programs with regard to Bloggers =-.
canada goose pas cher http://www.conceptor.fr/canada-goose-pas-cher/
buy cigarettes online cheap fast ship to america