Tom Rogers

My personal and technology blog
Logo
 
 

Moving From Static Pages To Using A CMS

Posted on 28/08/11

in

397
Thanks!
An error occurred!

For quite a while, the web has been in a transitional period between sites comprised of static HTML files and sites that are generated on-the-fly by content management systems. This change has plenty of advantages but making it can be a large undertaking for website owners and developers. With that fact in mind, I thought I’d do a post addressing some simple things that I’ve learned during my time building dynamically generated web applications. As per the title, the focus of all my points have a focus toward the difference between the two concepts. Time to get this party started.

Separation Of Data, Output and Styling

If you imagine any modern, static, webpage, you probably have the HTML file (describing the type of content in any given place on the page) and a CSS file (applies visual styles to the markup). Contrasting this to the dynamic approach in which the content is stored in a database and outputted within the markup, what you have is an extra layer of abstraction which is never a bad thing. The benefit of that is the ability to easily alter front-end template files without worrying about the data on the site being lost. A bit of a side advantage to this thought process over the one previously noted is that it makes allowing users to select styles for a predefined list much easier.

Security Becomes More Important

Content management systems are software packages that run on servers and more than just some files and folders. Like other apps that run on your desktop OS, they too have updates released for them that need to be implemented. It could be argued that, because your website probably stores data on visitors, you have a much bigger duty to try and ensure that their data isn’t exploited. All this translates to the fact that you may have to dedicate a bit more time to ensuring that such a website remains secure than you would with a comparable static one.

Less Control Over Individual Pages

Due to the abstraction that I noted before, a CMS based site will by default give users less control over the styling of pages on an individual basis. Although to some it may seem so, this is no bad thing. The reason I say that is that, having completely different styling across pages of a single website makes the experience seem disjointed for users. Just to clarify, in no way am I saying that dynamically generated pages should stifle good design. A better explanation maybe is to say that, when theming for a system, the focus is no longer on the look of a piece of content but on preparing styles for the different types of content that a user may add to add to the system.

The Parsing Of Logic

As I’ve been drilling into your brain throughout the article, what makes a CMS different than static HTML is that it relies on running queries that return data from a database. This requires that you have access to server-side technologies (most commonly PHP and MySQL) in order for it to function. Quite clearly, that means the you need to verify that your server can run the scripting languages as required by whatever package you use before taking the time to install and set it up.

From the fact that logic is passed comes a very useful side effect. For example, most systems will allow you to check whether the currently viewing user is logged in or not and then served up different content or layout as a result.

Quick note: even though pages in CMSs are built on the fly, what ultamatly gets sent to the browser is just regular HTML.

So, I hope those tips were helpful to any website owners looking to make the jump away from static pages to a dynamic system.

Chime In and Give Your Thoughts

Comment Posting Guidance

For the benefit of every non-spambot visiting, following a recent site restructuring I have some rules with regard to etiquette for comment posters. As well as making a better experience for all, they help to distinguish real people for automatic evil machine spam. Due to this, any comment that fails to follow any one of them will be considered spam and removed as soon as possible.

With thanks, Tom

  • Coherent English must be used.
  • This form has multiple fields for a reason. Only enter a real name or nickname in the first box i.e. "Boats For Sale" wouldn't make it. Similarly, the "Website" input is a pre-determined place to post one link so there is no need to have them in the body area. This is a common technique used by spammers and marketers and, as such is not allowed.
  • Your comment must be directly related to the post to which it is a response. The idea of a post commenting system is to further the conversation that began in the given article. For instance "great post" is not a comment. My contact form can be used for suggestions or general communications.
  • Responses to other comments must be civilised.
  • No sexual reference or content is allowed.
  • Duplicate comments are a no-no.