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.

Showing comments 1 to 10 of 37 | Next | Last
louis vuitton outlet
Comment
Cache922
Reply #37 on : Sun August 31, 2014, 03:12:44
Which is a very sweet update John. Going to pic this specific out and adhere about the Motorized by simply Lookup business office wall structure.
louis vuitton outlet http://www.mrrichardsbooks.com
Louis Vuitton usa outlet
Comment
Excell375
Reply #36 on : Sat August 30, 2014, 19:15:14
Hello everybody, just do it-- listen as well as upload on grooveshark. com, you feel 100 % trusted if they ever before go to court about it.
Louis Vuitton usa outlet http://www.milwaukeepetexpo.com
Authentic Louis Vuitton Outlet Online
Comment
WideWeb685
Reply #35 on : Sat August 30, 2014, 07:39:51
1 ) In the "about" menu, this states the version is actually 5. minimal payments 6 (8E200) if that helps.
Authentic Louis Vuitton Outlet Online http://www.mrrichardsbooks.com
louis vuitton outlet online
Comment
Access533
Reply #34 on : Fri August 29, 2014, 12:49:47
Many thanks this kind of posting, it was very helpful. <br />downloaded 40D a while ago in addition to noticed the way slow anything had been. subsequently just now possessed cyberhawk tell me about a system logging me and also researched kservice along with kontiki... <br />Have deleted the nearly worthless 4oD which did not offer you me personally anything i needed to watch except if i became paying for it and after that acquired typically the quarter in order to continuously work along with absorb the storage! <br />boo for you to 4od
louis vuitton outlet online http://www.mrrichardsbooks.com
louis vuitton outlet
Comment
Unity168
Reply #33 on : Fri August 29, 2014, 07:15:48
acknowledge the apology just for this mistake the best web link is definitely:
louis vuitton outlet http://www.mrrichardsbooks.com
Louis Vuitton Outlet 80
Comment
Marit96
Reply #32 on : Thu August 28, 2014, 23:31:41
Thank you quite a lot to get discussing that with those of you that you know very well what you aren't discussing about! Bookmarked as their favorite. Please additionally review with my web site =). We're able to possess a web page different written agreement in between you hey!, I love your personal writing very much! proportion all of us keep up a correspondence much more your current post on AMERICA ONLINE? I would like a professional about this living space to solve this trouble. Probably which is a person! Looking toward expert a person.
Louis Vuitton Outlet 80 http://www.mrrichardsbooks.com
Louis Vuitton Outlet 80
Comment
Griff47
Reply #31 on : Thu August 28, 2014, 17:27:57
Many of these attributes are already added in as a part of ipad 2 buy The reason I will not buy Apple inc products is caused by our major profitable clientele makes use of Flash upon all his web-sites. I need to manage to work with Expensive on my computers, smartphones along with supplements.
Louis Vuitton Outlet 80 http://www.mrrichardsbooks.com
Louis Vuitton Outlet 80
Comment
Thespian734
Reply #30 on : Thu August 28, 2014, 16:09:49
This particular looks a lot more like the particular RIAA exploit the actual legal system for a rapid dollar than all of them basically wishing to quit pirating. It's similar to audio is the trap because of their precise profit-making appliance. We probably would not become shocked once they lost their unique audio about the world wide web. <br />While this individual actually ought not to possess saved the background music, the thing typically the court need to observe here's how affected the actual "victim" is in addition to designate penalty consequently. <br />If it can seven songs, throw out these $7 money. That would be justice. Definitely not this kind of outrageous sum.
Louis Vuitton Outlet 80 http://www.mrrichardsbooks.com
Authentic Louis Vuitton Outlet
Comment
Join()962
Reply #29 on : Thu August 28, 2014, 08:33:50
additionally, I am aware that will John Ross involving ABC studies there is a "Harry Reid" who else murdered a bunch of young children last year.
Authentic Louis Vuitton Outlet http://www.mrrichardsbooks.com
Authentic Louis Vuitton Outlet
Comment
Yellow958
Reply #28 on : Wed August 27, 2014, 12:31:02
I changed this password instantly as i discovered vizgin must have been a con... I informed each of the individuals in the pal record over it. The item received delivered to me personally via an individual in the Google buddy checklist... these folks were fixed off of. Hopefully these people don't find scammed. The any shame individuals might do this.
Authentic Louis Vuitton Outlet http://www.mrrichardsbooks.com
buy cigarettes online cheap fast ship to america