Spiria logo

On choosing ProcessWire for Spiria.com

Spiria recently changed content management system for its Web site and blog. They converted from Drupal to ProcessWire. Guy Verville, Director of Web Strategy, goes over the technical aspects of this transition.

After making several sites for clients with ProcessWire, Spiria decided it was time to do away with its cumbersome Drupal site. To be honest, ProcessWire is still difficult to sell to clients, because this CMS/CMF is not as well-known as the most popular ones.

The migration to ProcessWire therefore served several purposes:

  1. Eliminate the frustrations experienced with Drupal (especially with image management and some structural problems).
  2. Allow integrators to learn the CMS during quiet periods, when they are not needed on other projects.
  3. Promote the CMS by adopting it.

The challenges were many, but by no means insurmountable, thanks to the great versatility of this programming framework. Indeed, while ProcessWire can be considered as a CMS in its own right, it also offers all the advantages of a CMF (Content Management Framework). Unlike other solutions, the programmer is not obliged to follow the proposed model and can integrate their way of doing things.

The Blog

Since the site includes a very active blog where visuals abound, it was essential to cache the various dynamic components. For example, all sections of the blog display a list of recent articles, a list of “short technical news”, another list from the same author, and a classification by category. In short, these lists evolve independently. ProcessWire’s cache system, including its ability to classify by namespace, has significantly improved loading speed. Cache file management has been placed in a “saved” hook in the useful “ready.php” file.

blog
A typical blog page. On the right are two lists that are independently cached.
cache
An example of caching with “namespace”. This code is inside a hook launched after a blog page is saved.

Data Migration

Importing the blog data was complex because when the programmers designed the site in Drupal, they didn’t use the easily translatable “entities”, meaning that each article resided in two different “nodes” (pages). We would have liked to use the core ProcessWire import module, but it does not take multilingual fields into account yet. However, we were able to use the code as a basis for building our own import module. Indeed, one of ProcessWire’s great qualities as a CMF is that it is easy to use existing code to design your own solutions.

Layout

The current layout of the site has been reproduced exactly, as it serves the company’s needs very well. ProcessWire has simplified the work in many ways. Apart from the blog, which is very structured, the other sections of the site are more free, especially the case study section (“Our Work”). The use of page reference fields has especially helped developers. As everything is a page in ProcessWire, you can create a pseudo-relational database within the site itself. The administrator becomes more aware of the data hierarchy and has better control over the data.

realisation
« Our Work » page.

Programming Architecture

The separation between controllers and Twig visualization files facilitates the management of the multiple components of the site. We haven’t really explored the “regions” of ProcessWire, because we prefer not to mix these aspects of programming. This greatly eases the arrival in our department of programmers used to an MVC structure, because it gives them a better understanding of what does what.

Searches

Once again, we were able to simplify what had been done in Drupal. There are two types of searches on the site: the blog search and the more general search on the 404 page. The Drupal site search was driven by an Apache Solr server. We decided to bank on the ease of ProcessWire and the Typeahead library (for the blog), because we didn’t need the power of Solr (or Elasticsearch) anyway. Work to improve performance still needs to be done in this area. We would have liked to have had the excellent search tool offered on the administrative side, also available on the frontend. We have not yet had time to explore the possibility of harnessing this code from the core of ProcessWire. Our hope here is that the CMS designer, Ryan Cramer, sees this as an opportunity to offer an exciting new feature for his CMS!

search
The blog search powered by ProcessWire and the Typeahead JavaScript library.

Powerful Modules

We have the excellent modules ProCache (static caching), ProFields (fields that greatly improve the functionality of existing fields) and ListerPro (data search and processing tool). As the site is installed on a nginx server, we have ruled out ProCache for the moment and are satisfied with the use of the cache() function alone. The ProFields fields are a godsend, just like ListerPro. This last module is very useful to correct import errors, for example (we had more than 800 blog articles, some of which date back to 2013).

We used a functional field to gather translations of terms that would normally have remained hard-coded and difficult to access in the translation interface (an aspect to be improved in ProcessWire, in our opinion). By grouping translations in a single page, site administrators can easily change or correct terms.

lister pro
ListerPro allows you to create search lists on which you can act.

Language Management

What remains a very small irritant for us is the management of languages, which is otherwise fantastic. The fact that there is a default language is both a blessing and a curse. For example, in 2013, blog articles were not systematically translated. We experienced the same situation with a customer’s site. If an article is only in English, no problem, we just don’t check French as an active language. However, if the article is only in French, we are still required to create the page in English and perform tricks with the code, for example by using a checkbox such as “Not present in English” to reproduce the behaviour naturally present for English (or any default language). Perhaps there is a more elegant solution here that we have not yet discovered. It’s not a big deal, but some clients don’t see why there are two ways of doing it here.

In Conclusion

In any case, ProcessWire’s great qualities continue to appeal to programmers, integrators, graphic designers. The robustness of the CMS/CMF, its functionalities all translated into objects/variables ($pages, $page, $config, $sanitizer, $input… the list is long) allows us to systematize our workflow, easily recover code and reduce production costs.

Although it is dangerous to offer just one CMS solution to our customers (the proverbial hammer that sees just nails), it is tempting to consider ProcessWire as the Swiss Army knife par excellence of Web programming. As mentioned above, the CMF is suitable for all situations, offers very good security tools, and its designer has successfully improved PHP methods to make programming very pleasant and intuitive.

For us, migrating the company’s website to this platform was the best tribute we could pay to its creator and maintainer, Ryan Cramer.

This entry was posted in Website creation
by Guy Verville.
Share this article