Home > Why Spip?

Why Spip?

What is Spip?

Spip is a open source Content Management System (CMS) running in PHP/MSQL. Spip is free software licensed under the GNU/GPL. Spip was originally made for a magazine, where an important criteria is that authors can start publishing and editing content without any training nor risk to the system.

Spip user experience?

Spip allows authors to be created to connect to the site and manage their own content, add and edit pages and upload images, files and video. Each author can be given publishing rights (admin) to one or a selection of folders. For folders outside an authors admin space, they can submit articles but only an admin can publish it on the public side.

The “back-office†interface of Spip is designed to be as simple as possible and require the minimum of actions of the authors to publish their content. The steps are navigating to their section (organized same as folders on their computer), click “write an article†, clicking “save†and then “publish online†. When logged in, authors can also stay on the public site and simply double click on any of their existing content to change it on-location.

Under this basic interaction, articles appear in the navigation automatically where they are supposed to and images are rescaled to what they are supposed to automatically. To augment their text, the author can select something and click on bold/italic/heading/link etc. Lists can be made by simply starting each new line of the list with a dash. Advanced users can create HTML code offline and simply insert as text, for more sophisticated presentations.

Comparison

Though all open source CMS’s are fundamentally the same in the sense that, as they are open source, their code can be changed to do anything possible (there is nothing one CMS can do that another CMS can’t be rewritten to do), they are not the same in terms of the effort required to solve any given problem. Clearly, the closer a CMS already is to the final objective, the easier the task will be.

In Spip there is absolutely no pre-defined design framework. This is important, since professional and unique web sites are designed from scratch, for the same reasons unique books are written from scratch and by modifying existing ones.

Most other CMS’s are created to allow amateurs to build websites without any coding knowledge and configure with simple multiple choice. Though advanced users can tweak the “cooky-cutter†, the farther ones departs from the standard template framework the harder it is to code and the more confusing it becomes for the users to interact with.

Design
Spip does not provide a design framework, but is better thought as providing six major services.

1. Content management
2. Templates
3. Markup Language
4. Language Management
5. Caching and compression
6. Plugins

1. Content management

The first service is allowing users to interact with the database in a secure and logical way. Content is organized into “sections†and “articles†exactly similar to folders and files on their computer. They can upload images, files, documents etc. decide if they want comments to be allowed for the article, choose a logo, associate key words, etc. (or not if they don’t have the permissions to do so).

2. Templates

The second service is template management. The three main templates of a Spip site are for the “home page†, the “default section page†and “default article pages†. These templates are not required to have anything in common at all and can be completely dissimilar if need be.

However, when a common object is needed in multiple templates a “sub-template†can be made and inserted where required in the main templates; thus, repetition is reduced to zero.

For further differentiation of site design, other templates can be written for specific sections or/or all subsections of a section, or individual articles. A vast complex hierarchy of templates can be created if need be.

For all sections of the site, the design can be adapted to the content and not the content to the design.

3. Markup Language

The third service is providing the Spip LOOP (Boucle) language tailored to the common needs of the web developer. This language simplifies interaction with the database to solve common problems.

A basic example of a Loop is returning all the the articles in a section, ordering them under a given criteria, then extracting the Title and Text, and then padding these objects with code written by the webmaster (HTML/CSS, Javascrip, Flash, PHP, etc.). This task is very easy to accomplish in Spip because each section has a number, so only this number is required for the loop to return all the articles, there’s quick code for all the usual ordering criteria, and the padding code is simply as it would normally be.

The LOOP language also easily allows taking only a part of the list (say the first or the last five entries), alternating the code padding (so the first entry is blue, the second grey, the third maroon, then repeating these for the next entries), entries can be excluded on an individual basis or by some criteria, as well as applying various filters to the objects. For instance, only the first 200 characters may be desired to make a list of introductions.

Images filtering is also very powerful. Images inserted into the text can be scaled, cropped, rotated, colorized etc. all automatically.

Also, the syntax easily support “backup LOOPS†if no entries are returned by the primary loop. So it’s easy to automate the “what if what we would normally expect isn’t there†that often arise in web development. An example of this is that a primary loop can return all the articles in a section but if no such articles exist a secondary loop returns all the articles in the subsections of that section or something else entirely. All lists can be easily paginated as desired (if a list is too long for one page it is broken up into several pages).

For advanced uses, the LOOP language is designed to smoothly include standard PHP to solve uncommon problems not envisioned by the Spip developers. For instance, if a highly specific ordering or inclusion/exclusion criteria is needed that no one has ever needed before, PHP and or Regular expression can be coded directly into the LOOP. So there’s never a need for completely independent PHP code to be superimposed on the system, which often creates “reinventing the wheel†type situations.

4. Language Management

Language management is one of the main reasons Spip became so popular in Europe, as multilingualism is the rule not the exception. Spip accomplishes this by associating as having a language to each page as defined by the site administrators. In the templates, the webmaster can insert things like Hello which will return “Hello†if the page using the template is English and “Bonjour†if the page needing the template is French and Hola for Spanish. The “multi†tag is the easy way but isn’t a perfect solution for when a phrase needs to appear in many different locations.

To solve this latter problem phrase references can be inserted into the code appearing as <:home:> and language files created that will replace these references with the corresponding phrase for that reference. So, if a new language is added to the site, all that it is needed is to translate a centralized language reference page for all pages requested in that language to return the correct phrases. So, repetition can be reduced to zero and the webmaster doesn’t even need to touch the templates for someone to translate the entire navigation.

Likewise, LOOPs entries can exclude/included by language, so a single loop can serve completely different content depending on what language requests use of the loop. So, it’s easy to code multilingual templates.

5. Caching and compression

When a page is calculated via the content-template interaction, the result is a HTML/CSS, Javascript and/or Flach page served to the user. This page and all associated content (i.e. re-sized images, external RSS feeds) is then cached for a time decided by the webmaster or until it’s recalculated manually when a user changes the main content associated with the page (a page with a long caching time can become outdated if content exterior to the page is changed, e.i. Blogrolls; for a super dynamic page the caching time can simply be set to zero, but this is generally not required).

When pages are recalculated, the load on the server is minimal since Spip is a very light engine providing only the bare essentials.

This caching system has been tested in Apache to not be measurably slower than serving individual files.

Spip can also be set to automatically compress HTML, CSS, Javascript pages to reduce transfer size (a service often paid for).

6. Plugins

There are less plugins for Spip than other CMS’s, but this is because Spip is not intended to be built via a multiple choice of plugins. Rather plugins are designed to augment the engine to allow new classes of problems to be easily solved, for instance augment the Loop syntax for less common problems. This approach is meant to keep the core engine as simple as and as fast as possible, by allowing the webmaster to only include added functionality on a needs basis. The plugins are generally designed to be easily deactivated without causing any problems.

 


copyright 2006 - 2020 Eerik Wissenz