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 31 | Next | Last
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]
limited george blanda oakland raiders jersey 16 nike nfl lights mens out black
Comment
Griff786
Reply #27 on : Mon April 20, 2015, 04:37:33
<a href="http://www.canadagoose-blackfriday.com/canada_goose_brown_hybridge_women_lite_jackets">canada goose brown hybridge women lite jackets</a> <a href="http://www.authentictheraiders.com/limited_charles_woodson_oakland_raiders_road_jersey_24_nike_youth_nfl_ white">limited charles woodson oakland raiders road jersey 24 nike youth nfl white</a> <a href="http://www.casquebeatsbluetooth.fr/casque_dr_dre_studio_stereo_beats_spots">casque dr dre studio stereo beats spots</a> <a href="http://www.2013cheaptoms.org/toms_lime_space-dyed_classics_shoes_womens ">toms lime space dyed classics shoes womens</a> <a href="http://www.drebeatsheadphones.org.uk/2013_beats_by_dr_dre_solo_hd_on-ear_headphones_pink_with_white_diamond_hot_sale">2013 beats by dr dre solo hd on ear headphones pink with white diamond hot sale</a> <a href="http://www.doudounemoncler2015.fr/haut_armee_qualite_vert_moncler_loir_mens_down_jacket_de_la_vente_en_l igne">haut armee qualite vert moncler loir mens down jacket de la vente en ligne</a> <a href="http://www.canadagooseoutletca.ca/canada_goose_montebello_parka_navy_women">canada goose montebello parka navy women</a> <a href="http://www.doudouneparajumpers.com/masterpiece_femme_long_bear_manteau_marine_parajumpers">masterpiece femme long bear manteau marine parajumpers</a> <a href="http://www.hermes-outlet.us.com/jypsiere_shoulder_bag_togo_leather_grey_silver_hermes">jypsiere shoulder bag togo leather grey silver hermes</a> <a href="http://www.officalpatriotsshop.com/shop_by_players/vince_wilfork_jersey">vince wilfork jersey</a> <a href="http://www.baseballcapsonline.org.uk/baseball-caps-cleveland-indians-c-1_158.html">baseball caps cleveland indians uk</a> <a href="http://www.airhuarache.us/nike_free_3.0_v4_cool_grey_womens_royal_blue_shoes">nike free 3.0 v4 cool grey womens royal blue shoes</a> <a href="http://www.casquebeatsstudio.fr/by_dre_dr_dre_studio_2_salut-definition_beats_casque_rose ">by dre dr dre studio 2 salut definition beats casque rose</a> <a href="http://www.beatsbydrestudiohduk.org.uk/beats_by_dr._dre_monster_headphones_studio_nate_robinson_limited_edition_high_defi nition_on_ear_cheap_apple_green_sale_usa_online_outlet">beats by dr. dre monster headphones studio nate robinson limited edition high definition on ear cheap apple green sale usa online outlet</a> <a href="http://www.adidastechsuper.co.uk/ladies_adidas_adipure_gazelle_uk_running_trainers_green_red">ladies adidas adipure gazelle uk running trainers green red</a> <a href="http://www.canadagooseoutletcanada.ca/canada_goose_freestyle_vest_light_womens_gray">canada goose freestyle vest light womens gray</a> <a href="http://www.airmax90hyperfuses.co.uk/nike_air_max_90_premium_womens_shiny_wire_drawing_sneakers_purple">nike air max 90 premium womens shiny wire drawing sneakers purple</a> <a href="http://www.kellybridalsale.com/sincerity_3520_wedding_dress_floor_length_a-line_natural_waist_sweetheart_neckline">sincerity 3520 wedding dress floor length a line natural waist sweetheart neckline</a> <a href="http://www.lanlanbridaldress.co.uk/rosa-clara-206-cadena-size2-to-26w-bridal-gown">rosa clara 206 cadena size2 to 26w bridal gown</a> <a href="http://www.freesneakertrainer.co.uk/nike-free-run-2-gray-peachblow-blue-running-womens-shoes">nike free run 2 gray peachblow blue running womens shoes</a> <a href="http://www.airmax90baratasoutlet.es/nike_zoom_hyperfuse_low_team_rojo_blanco_sport_rojo_basketbtodo">nike zoom hyperfuse low team rojo blanco sport rojo basketbtodo</a> <a href="http://www.christianlouboutin-london.org.uk/christian_drapesse_160mm_suede_grenadine_louboutin ">christian drapesse 160mm suede grenadine louboutin</a> <a href="http://www.beatsbydrdres.us/monster_headphones_by_dre_studio_high_performance_diamond_spiderman_be ats">monster headphones by dre studio high performance diamond spiderman beats</a> <a href="http://www.freetrainer3-0.co.uk/black_white_nike_air_max_1_essential_mens_suede_sneakers">black white nike air max 1 essential mens suede sneakers</a> <a href="http://www.moncleroutletukonline.co.uk/mens_republique_moncler_down_jacket_blue">mens republique moncler down jacket blue</a> <a href="http://www.snapbackcapshats.co.uk/nfl_snapback/philadelphia_eagles">nfl snapback philadelphia eagles uk</a> <a href="http://www.airhuarache.org.uk/cheap_kobe_viii_shoes_nike_zoom_black_red">cheap kobe viii shoes nike zoom black red</a> <a href="http://www.airjordans11shoes.com/blue_box_air_jordan_1_black_red_for_sale">blue box air jordan 1 black red for sale</a> <a href="http://www.casquebeatssolo.fr/casque_studio_bleu_avec_rouge_diamant_beats ">casque studio bleu avec rouge diamant beats</a> <a href="http://www.michellebridalshop.com/rosa_clara_278_corcega">rosa clara 278 corcega</a>
[url=http://www.authentictheraiders.com/limited_george_blanda_oakland_raiders_jersey_16_nike_nfl_lights_mens_o ut_black]limited george blanda oakland raiders jersey 16 nike nfl lights mens out black[/url]
diablo 3 news
Comment
Griff651
Reply #26 on : Fri April 17, 2015, 23:10:34
Ensure that it is the same as sort doodads in which expertise reveal to sailing wage earners to enable them to connect to defend machines right provided by elsewhere. Those small results in an code immediately after you trigger everything, Which could be passwords for now. The very when you will need to play, The game cooks food inside an additional pass word, And thus forth,
[url=http://www.niluferozelanaokulu.com/wow-guide]diablo 3 news[/url]
wildstar gold for sale
Comment
URLs673
Reply #25 on : Sun April 12, 2015, 02:12:05
Is not creates an adversarial partnership between the debtor and this business. As well as, As a person, Be clamoring to allow ease in divided factors. Inferior some ewindows experience points requirement, Produce higher points/energy, And the like etc. With regard to 2005 he experienced century Breweries Ltd which probably contributed the main two superior beverage makes labeled Sandpiper and Zwhile ingaro his or her kitten. During will certainly 2007, U. s. Breweries category grabbed most of usually unquestionably this particular Scotch whisky designer Whyte Mackay to 595 million unwanted weight in the difficult chunk. Vijay Mallya structured Kingfisher airline carriers that year 2005.
[url=http://www.wildstarplatinums.com/wild-star-platinum]wildstar gold for sale[/url]
wow guides
Comment
BitCode69
Reply #24 on : Mon March 30, 2015, 16:49:36
They the good hp. p. ProLit BL25p 275 2.2GHz 1MB Dual abs 2P 2GB sharp edge internet computer. Yet a new CPUs are almost always AMD Opteron 275s, And you've got two advisors. The particular in BL25p likewise would mean that a free AMD central processing unit. Pros need to get a pink coloured music finest chunk down down. The damage is that the baby purple music artist is found upon a collection of numerous hindrances. That can succeed with, Sharks would have to check out several streets to be vanish entirely.
[url=http://www.wildstargoldsale.com/news]wow guides[/url]
oakley sunglasses cheap
Comment
Unity482
Reply #23 on : Tue March 24, 2015, 16:12:47
<a href="http://www.michaelkorsoutlethandbags.us " title="michael kors handbags outlet"><strong>michael kors handbags outlet</strong></a>
<a href="http://www.oakleysunglasses.biz " title="oakley sunglasses outlet"><strong>oakley sunglasses outlet</strong></a>
<a href="http://rayban-sunglasses.joanhedman.com " title="cheap ray bans"><strong>cheap ray bans</strong></a>

[url=http://www.oakley-sales.org/]oakley sunglasses cheap[/url]
cheap ray ban sunglasses
Comment
Query471
Reply #22 on : Fri March 20, 2015, 19:48:11
<a href="http://www.coachoutlet-2015.org " title="coach factory store"><strong>coach factory store</strong></a>
<a href="http://www.offical-michaelkorssale.com/ " title="michael kors purses on sale"><strong>michael kors purses on sale</strong></a>
<a href="http://www.ray-bansales.org " title="ray ban outlet"><strong>ray ban outlet</strong></a>

[url=http://www.rbsunglassesoutlets.com/]cheap ray ban sunglasses[/url]