A Better CMS: Part 2 - Flexibility

A Better CMS: Part 2 - Flexibility

Peter Burlingham
Peter Burlingham
8 June 2020

Flexibility in a system that allows the client, designer and developer to all get exactly what they want? Find out why anything is possible with ProcessWire.

Why ProcessWire?

In a previous article, we talked about why we use ProcessWire as a secure foundation for our websites and web applications instead of the "big players" - Wordpress, Joomla and Drupal.

Today's topic is flexibility, and why a system that makes no assumptions about what you're setting out to do can lead to an easier, more efficient workflow; keeping everyone happy throughout the project lifecycle.

Whereas Wordpress is designed to power blogs by default and can be adapted/wrangled to work for other content types*, ProcessWire starts with a minimal set of fields and templates to give us the freedom to take it in any direction with integrated tools. It can also be installed as a completely blank canvas or, more frequently for us, using in-house "profiles" - depending on what we're building - that have a lot of common building blocks in place. We find this saves time when starting on a new project.

*via a plethora of plugin modules often with disparate interfaces and varying code quality.

For our clients

Flexibility = effective, efficient solutions that you'll love

ProcessWire makes no assumptions up-front about what sort of website/web app you want us to build. It powers everything from single-page personal portfolios through to tour catalogues, online shops and complex, bespoke CRM systems with hundreds of thousands of pages.

Before we used ProcessWire, we had to consider very carefully whether a client's project concept aligned with the capabilities of various software packages. There would be occasions where we'd have to compromise with some parts of the brief or suggest workarounds to get close to the end-result the client wanted.

It's been so liberating for the past eight years when we're asked "Can we do this?", or "What about this?", to be able to quickly and easily envision a path from initial to the end-result confidently say "Yes - we can definitely do that!" knowing that we can do so without compromise, without installing a dozen plugins that may not play well together, and knowing that customers are getting the best results for every project.

For designers

Flexibility = creative freedom

Building a website is often a balance between what the designer has in mind after discussions with the client - usually an engaging design with an effective user interface that's easy for users to navigate - and what the underlying system will allow you to do.

This mismatch can lead to friction between the designer, developer and project manager as compromises have to be made based on what restrictions the system or a set of plugins might impose upon the design and development process.

ProcessWire removes all of these roadblocks, along with any potential friction between the designer and the developer. Harmony is achieved by offering the designer a blank canvas to work from and decoupling the frontend templates from the backend system. When it comes time for the developer to integrate the design with the CMS, this is achieved using simple code snippets, and the whole process means designer and developer can work more or less independently of one another while being confident of a smooth handover.

Essentially, this means that any design can be built, without compromise and the designer or developer stepping on each others' toes.

For developers

Flexibility = knowing the code you write now will still work years later

Delving into the technical side of things, the method by which developers output content to the frontend templates visitors will see that was entered into the ProcessWire admin is based loosely on a Javascript library called jQuery. jQuery was designed as a library that makes writing code more logical and human-readable while abstracting web developers' code from the actual underlying technology.

ProcessWire chose to adopt a similar syntax with its API, whereby we might output data to the frontend templates using code like this:

<?php 
echo $page->title; 
foreach ($page->products as $product) {     
    echo $product->title . " " . $product->price; 
}

That's pretty easy to follow, right, even if you're not a developer? We've not used any functions to get data from the database and only minimal code to echo the data to the page and perform a simple loop. All of this happens magically behind the scenes, and you're presented with all the variables and functions you might need out of the box.

The layer of abstraction on top of normal PHP functions is actually done for more reasons than code readability alone. PHP functions change over time; sometimes additional parameters are slipped in, and on major version upgrades some older functions are removed and newer ones added. If the code in the templates used "pure" PHP, we'd have to be sure to update all our websites when a new version of PHP is released and test each carefully adding more onto the maintenance cost for our clients. Using the abstract API methods, these are never removed/renamed but the code behind them is constantly reviewed and improved as new PHP functions/versions are released without anything breaking in our own code. This means all we have to do from time to time is click an upgrade button and automatically give our clients the benefit of newer functionality without having to check code we wrote 5 years ago, for example, making maintenance and upgrades a lot easier, and only if we think an upgrade is beneficial.

Contrast this to upgrades on other systems, where there might be half a dozen plugins you have to be sure are also up to date and you MUST update often due to poor security. It's a real game-changer - we can be confident everything will be fine and there's less time worrying about unnecessary upgrades, focusing only on what's important for our clients without tearing our hair out.

Example - Custom weather module

Created for the tour operator 'Tripsite', we developed a custom weather module following ProcessWire's module creation guide to display average temperature and rainfall data for each tour location. Tour specialists automatically pull in weather averages directly to the tour pages, creating a seamless customer experience.

The code is maintained by Nifty, so we know the module will survive system upgrades.

Example - Race Entry System

We've talked about ProcessWire being flexible for regular websites, but it's also really flexible as a foundation for bespoke web applications.

We're currently working on a system for managing running races, making everything as streamlined as possible for event organisers to edit each race as well each runner's entry information. Like any website we build, the user interface is linked to the ProcessWire API allowing us to rapidly prototype and build the various sections for this complex system.

We hope you've enjoyed learning a bit more about why we find ProcessWire so flexible.

Join us soon for part 3 of this series when we delve into usability. In the meantime, if you'd like to discuss what ProcessWire can do for your next project or want to talk about making the switch, then please get in touch.