1. Working with a CMS
Electronic supplementary material
The online version of this chapter (doi: 10.1007/978-1-4842-1669-9_1 ) contains supplementary material, which is available to authorized users.
In this first chapter well be taking a high-level view of what a content management system (CMS) is and introducing django CMS: a modern content management system based on the Django Framework.
We will start with a very brief history of content management and how digital versions of old paper-based systems have evolved to handle the vast quantities of information that is disseminated across the world every minute of the day.
I will close the chapter with an outline of the contents of this book and a summary of the things you will learn as you go.
A Brief History
Back in the old days of the Internet (10 years ago), there was a strong move away from static HTML websites to more dynamic, interactive websites. This was great for users, but it presented a particular set of challenges to web designers. To meet the challenge, most professional websites were built in a particular way:
A designer would create the overall design of a website.
The designer would work with a developer to slice the design up into a site template that would be a mix of plain HTML and program code; with the program code providing the interactive functionality of the website.
The designer would then work with a content creator (usually the client) to incorporate the website content into the templateduplicating the template and creating the content for each and every page of the website.
On very small sites, these roles could be filled by a single person, but for larger sites whole teams of designers, developers, and content creators needed to be involved to produce a complex website.
This design approach has one major flawthe admixture of code, content, and design elements means that any change to one element has a very real chance of affecting the others. The consequences of this can range from simple formatting errors to major breakdowns of website functionality.
The solution to this problem was a Content Management System (CMS) a set of methodologies and processes that have been around since long before the Internet.
Content Management 101
Content management is the systematic management of information (content). A simple way to understand content management is to use an examplethis book:
The writer (me) will give my draft to an editor who will work with me to ensure the manuscript is ready to go to the publisher.
The publisher will approve the final manuscript for publication.
The publisher will then send the properly laid out manuscript to a printer who produces the book you are now holding in your hand.
Of course, the actual process in more complex and much more collaborative than this sequence would suggest, but the important thing to note is that each person in the process fulfils a role and can function independent of the others; a publisher does not have to know the writers craft, nor does the writer have to understand how to print a book.
Content Management Roles
A website CMS requires roles similar to those required to produce a book:
Authors create the articles and page content that is displayed on the website.
Editors take author-created content and edit it to fit the style and context of the website, as well as make any corrections to spelling and grammar. The editor usually fulfils the publisher role on a website CMS; marking content ready for displaying to the public via the CMS software running on the server.
The designer still has an important role in creating the overall visual presentation of the website, although there is an increasing move towards buying off-the-shelf templates that suit a website owners design goals, rather than employing a designer to create a custom look.
The site administrator looks after the back end of the websiteassigning roles to other users, maintaining the content, and applying backups and updates. In some cases, the site administrator is also the developerwriting code to improve the functionality of the websitealthough this is becoming less common, as you will see in the next section.
Anatomy of a Modern CMS
In almost all cases, a modern CMS is a computer application that can be desktop or cloud-based (or a combination of both). They allow for easy organization of content and provide tools for creating, editing and publishing content. They use database and file system storage to provide flexible and scalable storage of data; a modern CMS is capable of handling everything from a two-page website to massive content publishing platforms with millions of pages of content (like online news).
The vast majority of modern websites are running some form of CMS. WordPress, the oldest and most popular, runs roughly 1 in 5 websites on the Internet. CMS software has grown exponentially in popularity and functionality in recent years.
The current state of the art in CMS design combines all of the content management tools we have discussed with three design philosophies to create feature rich, scalable, and responsive websites:
Model/View/Controller (MVC) architecture . It is beyond the scope of this book to explain MVC, but it is a software design pattern that epitomizes the modular approach. In MVC the content, the design, and the code are separated physically in the website, not just conceptually.
Use of external applications to increase functionality . Rather than write new code, a modern CMS allows you to plug in additional programs written by other developers that provide new functions, rather than having to write the code yourself. These programs can range from simple plugins that change the formatting to full-blown applications. Using external applications not only increases the reliability of the CMS, but it also dramatically reduces the cost, as one developer can sell the same plugin or application to many different websites that need the functionality.
Mobile-friendliness . Use of smartphones and tablet computers exceeds desktop use in most countries around the world. It is predicted that the shift to mobile computing will continue to increase over the next few years. It is a given that a modern CMS must support mobile devices by providing what is called a responsive interface that automatically adjusts the content of the website to suit the device it is being viewed on.
django CMS has some key advantages over other CMSesmost notably providing a dramatic improvement in modularity and separation of functions over programs like WordPress, which still use the old model of mixing content and code on the page. Other advantages include these:
It is multilingual.
It supports multiple websites.
It uses Bootstrap out of the box to support mobile devices.
It can connect to multiple databases.
Its flexible page model and the availability of formatting plugins free you from rigid template layouts.
It offers content scheduling out of the box.
It provides clear separation of publishing and administration roles.