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
nitrocellulose
Comment
Better823
Reply #37 on : Fri August 21, 2015, 23:41:22
Nitrocellulose from Hebei Jinwei Chemical Co., Limited With the combination of durability, compatibility and unsurpassed drying speed.
[url=http://www.nitrocellulosejw.com/]nitrocellulose[/url]
nitrocellulose cotton
Comment
Veri877
Reply #36 on : Sun August 09, 2015, 01:13:13
Nitrocellulose from Hebei Jinwei Chemical Co., Limited With the combination of durability, compatibility and unsurpassed drying speed.
[url=http://www.nitrocellulosejw.com/Nitrocellulose/product_2.html]nitrocellulose cotton[/url]
nitrocellulose cotton
Comment
Snippet557
Reply #35 on : Wed August 05, 2015, 04:11:30
Nitrocellulose from Hebei Jinwei Chemical Co., Limited With the combination of durability, compatibility and unsurpassed drying speed.
[url=http://www.nitrocellulosejw.com/Nitrocellulose/product_2.html]nitrocellulose cotton[/url]
nitrocellulose solution
Comment
BitCode773
Reply #34 on : Sat August 01, 2015, 18:25:13
Nitrocellulose from Hebei Jinwei Chemical Co., Limited With the combination of durability, compatibility and unsurpassed drying speed.
[url=http://www.nitrocellulosejw.com/NitrocelluloseSolution/product_3.html]nitrocellulose solution[/url]
cheap ray ban sunglasses
Comment
Zebra674
Reply #33 on : Fri July 31, 2015, 16:04:10
<a href="http://www.offical-michaelkorssale.com/" title="michael kors purses outlet"><strong>michael kors purses outlet</strong></a>
<a href="http://www.2015raybansunglasses.net/" title="ray ban sunglasses outlet"><strong>ray ban sunglasses outlet</strong></a>
<a href="http://www.oakley-sunglasses.xyz/" title="oakley sunglasses cheap"><strong>oakley sunglasses cheap</strong></a>
<a href="http://raybanoutlet.kenyanproducts.com" title="ray ban aviator"><strong>ray ban aviator</strong></a>

[url=http://raybanoutlet.vintagelicio.us]cheap ray ban sunglasses[/url]
coach outlet online
Comment
Excell877
Reply #32 on : Thu July 30, 2015, 04:11:00
<a href="http://www.cheapmichaelkorsbags.org" title="michael kors outlet store"><strong>michael kors outlet store</strong></a>
<a href="http://www.coachusaoutlet.net/" title="coach outlet store"><strong>coach outlet store</strong></a>
<a href="http://www.oakley-sales.org/" title="oakley sunglasses cheap"><strong>oakley sunglasses cheap</strong></a>
<a href="http://raybanoutlet.vintagelicio.us" title="ray ban sunglasses"><strong>ray ban sunglasses</strong></a>

[url=http://www.coachusaoutlet.net/]coach outlet online[/url]
Dioctyl Phthalate
Comment
Ordinance836
Reply #31 on : Sat June 06, 2015, 22:17:33
The company main business is further process the petrochemical production, with 8 production lines of ten-thousand-ton capacity for C9 and C10 separators, thermal & cold polymerization petroleum resin, petroleum naphthalene, tar and thousand-ton capacit
[url=http://www.hbjwhr.com/]Dioctyl Phthalate[/url]
Hydroleum Resin
Comment
Query900
Reply #30 on : Mon June 01, 2015, 19:06:13
The company main business is further process the petrochemical production, with 8 production lines of ten-thousand-ton capacity for C9 and C10 separators, thermal & cold polymerization petroleum resin, petroleum naphthalene, tar and thousand-ton capacit
[url=http://www.hbjwhr.com/]Hydroleum Resin[/url]
xrumer???
Comment
Unity287
Reply #29 on : Mon May 04, 2015, 16:48:41
??????????????????(???????????????????????????-profile??),???????????,??????????????,????????????????????????????????,???????????????Xrume?????wiki??guestbook?????,?????????????????"mod",?????,???????????????????
[url=http://xrumer.thefanbase.net/]xrumer???[/url]
reynold mens detachable cap brown moncler jacket
Comment
Griff532
Reply #28 on : Mon May 04, 2015, 12:37:49
<a href="http://www.groveantiaging.com/jp250345_a_buon_mercato_air_jordan_4_bianco_scarpe_grigio_nero_basketb all_vendita_allingrosso_uomo_retro">jp250345 a buon mercato air jordan 4 bianco scarpe grigio nero basketball vendita allingrosso uomo retro</a> <a href="http://www.raybansunglassesale.co.uk/oakley_holbrook_orange_frame_yellow_lens_sunglasses">oakley holbrook orange frame yellow lens sunglasses</a> <a href="http://www.airhuarache.org.uk/hot_sale_2014_online_nike_air_max_bw_mens_shoes_fur_grey_white">hot sale 2014 online nike air max bw mens shoes fur grey white</a> <a href="http://www.airjordans11shoes.com/jordan_3_4_limited">jordan 3 4 limited</a> <a href="http://www.nikerosheruntrainers.co.uk/nike_trainers_air_rejuven8_mule_black_sandals">nike trainers air rejuven8 mule black sandals</a> <a href="http://www.michellebridalshop.com/maggie_sottero_camden">maggie sottero camden</a> <a href="http://www.niketrainershoes.co.uk/grey_white_nike_sb_stefan_janoski_womens_max">grey white nike sb stefan janoski womens max uk</a> <a href="http://www.hermesoutletonline.co.uk/hermes_constance_cowskin_leather_bag_h017_dark_coffee_golden">hermes constance cowskin leather bag h017 dark coffee golden</a> <a href="http://www.masonbridalsale.com/mori-lee-5109-beaded-venice-lace-appliques-on-chantilly-lace">mori lee 5109 beaded venice lace appliques on chantilly lace</a> <a href="http://www.authentictheraiders.com/elite_jack_tatum_oakland_raiders_jersey_32_nike_nfl_grey_mens_shadow">elite jack tatum oakland raiders jersey 32 nike nfl grey mens shadow</a> <a href="http://www.drebeatsspeakers.org.uk/2014-new-monster-ii-beats-mixr-orange-headphones-on-sale-p-18.html">2014 new monster ii beats mixr orange headphones on sale</a> <a href="http://www.doudounemoncler2015.fr/acheter_en_femmes_gros_angers_vestes_en_duvet_avec_moncler_capuche_en_ chocolat_vente_pas_cher">acheter en femmes gros angers vestes en duvet avec moncler capuche en chocolat vente pas cher</a> <a href="http://www.hermes-outlet.us.com/belts_394_hermes">belts 394 hermes</a> <a href="http://www.airhuarache.us/nike_air_max_90_em_mens_blue_green_trainers">nike air max 90 em mens blue green trainers</a> <a href="http://www.jennabridalsale.com/demetrios_gr207_sweetheart_neckline_satin_mermaid_wedding_gown_with_ch apel_train">demetrios gr207 sweetheart neckline satin mermaid wedding gown with chapel train</a> <a href="http://www.nikefreetrainer5-0.co.uk/designer_nike_air_max_90_mens_vt_running_shoes_black_white">designer nike air max 90 mens vt running shoes black white</a> <a href="http://www.airmax90hyperfuses.co.uk/nike_air_max_90_sneakerboot_ns_uk_suede_sneakers_black_orange_mens">nike air max 90 sneakerboot ns uk suede sneakers black orange mens</a> <a href="http://www.kellybridalsale.com/maggie_sottero_presca_lace_and_satin_wedding_gown">maggie sottero presca lace and satin wedding gown</a> <a href="http://www.lanlanbridaldress.co.uk/mori-lee-1961-crystal-beading-embroidery-size2-to-size26w-dress">mori lee 1961 crystal beading embroidery size2 to size26w dress</a> <a href="http://www.airmax90baratasoutlet.es/nike_hypervenom_phantom_fg_cleats_2013_blanco_negro_naranja">nike hypervenom phantom fg cleats 2013 blanco negro naranja</a> <a href="http://www.christianlouboutin-london.org.uk/men_christian_louboutin_rantus_orlato_tartan_red ">men christian louboutin rantus orlato tartan red</a> <a href="http://www.groveantiaging.com/jv670163_ufficiale_retro_air_jordan_scarpe_1_blu_bianco_basketball_on-line_uomo">jv670163 ufficiale retro air jordan scarpe 1 blu bianco basketball on line uomo</a> <a href="http://www.raybansunglassesale.co.uk/oakley_jawbone_polished_black_frame_grey_lens_sunglasses">oakley jawbone polished black frame grey lens sunglasses</a> <a href="http://www.airhuarache.org.uk/nike_air_max_darwin_360_mens_shoes_grey_cheap_wholesale">nike air max darwin 360 mens shoes grey cheap wholesale</a> <a href="http://www.airjordans11shoes.com/2015_new_jordan_shoes">2015 new jordan shoes</a> <a href="http://www.nikerosheruntrainers.co.uk/nike_air_max_90_prm_mens_tape_knitting_trainers_darkblue_white">nike air max 90 prm mens tape knitting trainers darkblue white</a> <a href="http://www.michellebridalshop.com/maggie_sottero_brielle">maggie sottero brielle</a> <a href="http://www.niketrainershoes.co.uk/nike_air_max_2015_rainbow_triple_black_apple_green_lemon_mens_yellow_u niversity_red">nike air max 2015 rainbow triple black apple green lemon mens yellow university red uk</a> <a href="http://www.hermesoutletonline.co.uk/hermes_constance_cowskin_leather_bag_h017_pink_golden">hermes constance cowskin leather bag h017 pink golden</a> <a href="http://www.masonbridalsale.com/mori-lee-5163-beaded-appliques-and-lace-on-tulle">mori lee 5163 beaded appliques and lace on tulle</a>
[url=http://www.moncleroutletukonline.co.uk/reynold_mens_detachable_cap_brown_moncler_jacket]reynold mens detachable cap brown moncler jacket[/url]