NOTE: Content would be subject to change based on new information or grammatical blunders :) hey no one is perfect

Brief History

During my time developing websites, building websites actually meant static pages, it involved me changing HTML contents, and updating codes, and if a client made a change request , it meant pulling down the codes and updating the HTML. Am sure alot of old school developer like myself would simply remember those days, where Dreamweaver was the defacto tool for such feat.

As time moved on and business change request became rampant, the need to manage content was born, which led to a rise of CMS (Content Management Systems) Platforms. Back then there were numerous options ranging from Drupal,Joomla,MODX and also the famous WordPress, with these platforms managing websites became easy and also gave birth to a new role "Online Content Manager". Because back then developers were indirectly online content managers, nothing makes life more depressing than updating contents as a developer, It's highly repititive and boring.

This led to developers creating content management tools such as Administrative Dashboard, HTML Editors and lots more. The following features were common amongst popular CMS(es):

  • Repository in FileSystem or Database
  • Separation of content from presentation
  • WYSIWYG (What you see is What you get) editing
  • CheckIn / CheckOut
  • VersionControl and Versioning, with Scheduling
  • LinkManagement
  • Multichannel Delivery (Print, PDF, PDAs, Cell phones, etc.)
  • Personalization
  • Multilingual Localization

Source: CMSWiki.com "History of Content Management Systems"

CMS Today

As we speak , there are tons of CMSes today ready to fulfill different uses, some CMSs good for blogging , some terrible for Web Applications, and also each CMS has a target market. A good way of keeping track is to check the site CMSCritic ( A site responsible for giving resources on any CMS available both Free/Paid version). Despite the numerous list of CMSs today, there's one thing in common when it comes to user request or application request:

"I want a WordPress website"

Why is WordPress so Popular ?

wordpress-logo-stacked-rgb.png

This is a question I keep asking myself, "Why is WordPress so much popular" , no doubt I have built a lot of WordPress Plugins, themes and even recently integrated an eCommerce platform (WooCommerce) with a local payment platform. And if it's one thing I can say WordPress is one platform I don't enjoy developing for as a developer. My original website was initially a WordPress application, and I tell you it was actually cool when it came to blogging and writing articles. Infact WordPress is superb out of the box................... till the customization phase kicks in.

It then dawned on me WordPress is superb for users but terrible for Developers, developers want a platform that guarantees a lot of things such as Seperation of Concern, easy templating , Clean and consistent API and also a modular architecture where by Module can have dependency on Modules, yes WordPress does have Plugin dependency but my biggest gripe is the lack of an API to load a module and call the method with ease.

So the question is do CMF Platforms appeal more to Developers than CMS ?

Resources

CMF ?

According to Wikipedia

CMF List and Content Management Frameworks. A content management framework (CMF) is a system that facilitates the use of reusable components or customized software for managing web content. It shares aspects of a web application framework and a content management system (CMS).

My take on this is that, a CMS is one that allows a user manage and publish resources whereas a CMF is one that equips a developer the tools and reuasble components to build a CMS. by this definition you can say that technically WordPress, Joomla, Drupal are not CMSs per se but CMF, but this get confusing as those platfroms are highly known as popular CMSs. Despite WordPress fitting the description of a CMF alot of developers don't agree with this , my stance is that WordPress is bad as a framework for building applications but good for building blogs which still falls under content management. This gets more confusing because by the definition of CMF one can say Yii and Zend Framework 2 are CMF rather than Application Frameworks, but the distinction clearly comes from the fact that Joomla,ProcessWire and WordPress were built with the development of a CMF, so technically CMF are also application frameworks but geared towards building a CMS where frameworks like Yii are built for any application.

Application Framework -> Content Management Framework -> Content Management System

So an application framework can be used to build a CMF which would be built with the mind of building a CMS.

My Personal Gripe with WordPress as Content Management Framework

Templating

Templating in Wordpress is freaking difficult half of the time, you can't even say which page is being rendered, WP has an hierarchy of which template to be rendered when one is missing. Most of the time you'd think a certain page is rendered only to discover it could be the archive pages being rendered or something. So the only trick i used to knowing where i was, was using the function body_class , it puts the name of the template on the class of the body. Imagine the number of wasted hours just to ascertain this trick. Where as Processwire only requires you to select the template to be used as the backend, and the Page data is injected into the template through the variable $page

Layout like in MVC


Hell no there's nothing like that the closest you can get is get_template_part and worse part is that you can't send variables to it. why do you need this, you need to render a list of menu you don't want to have that in your template as too many logic besides it's a partials meaning you can reuse it in other templates just like Yii,Processwire and in Grails but nope not in Wordpress.

Here is an example of such in ProcessWire

$content=wireRenderFile("ui/projects.php",array(
"title"=>$title,
"CategoryData"=>$pages->find("/categories/,include=hidden"),
"PageData"=>$page
));

Here the template is rendered and the variables are also sent to the template which can be referenced using the $PageData or $this->PageData, and best part is that the template would never read the variable $content meaning no clash of variables in the template

Ajax

Obviously i need to perform an action call in Wordpress mehn this is another serious headache, you need to a add_action 'wp_ajax" but wait that would work for registered users so for non registered users you also need another hook 'wp_ajax_nopriv" what the hell. then also you have to exit at the end of function (though there's no issue as some systems do this). Ajax in Wordpress is pretty not straight forward and sometimes it creates a new session during my Ajax Request so it assumes another user and re-creates a session for it. I built a custom backend in ProcessWire and it dawned on me i had no idea how to call Ajax in it, I was bit terrified because of WP experience but in PW it as easy as just pointing an Ajax Call to a page and that's that

if($config->ajax){

//Run Code
exit();
}else{

Normal HTTP Request

Community of Hardcoderz

Compared to platforms like Craft, Joomla and all, Wordpress's barrier to entry for beginners is so low, that someone starting in PHP can easily use PHP and adopt so many bad practices and apply them in WordPress easily, however i would like to admit that this is not a problem of WordPress but a community problem. Symfony CMF , Processwire CMF , Drupal CMS have heavy use of Design patterns and all, so the quality of codes there are always top notch. Wordpress contributes to the reason why PHP is being ridiculed. Buy a wordpress template and set it up it's never gonna be the same as the picture advertised. Also try turning on WP_DEBUG and see the vast amounts of errors in a plugin. Plugins gave me hell during development time infact had to patch some plugins myself extra unpaid job. However it should be noted that this also applies in any CMS community except that on WordPress part, it's quite large.

Processwire Clean API

Processwire really makes it easy to do alot of stuff, the power comes from the fact that Processwire API are highly decoupled from the CMS, infact ProcessWire interface is an application built around the API. This means you practically do things in command line with ease, infact a great advantage is that Processwire can be used inside another application easily. The concept of the field is very straightforward and simple to use. How so ?

Let's assume i have a field called Author Image which is an Image Field, referencing this in the template is as simple as:

$page->authorimage

Getting the url of the image as simple as

$page->authorimage->url

While resizing an image on the fly would be as simple as:

$page->authorimage->size(400,400);

or better convert an image with a width and making the height proportional to the height

$page->authorimage->width(400);

Subsequent call of this method checks for similar image and if found uses a cache version.

Well i'm sure getting an image from WordPress isn't as straight forward as this so let's see:

$thumb_ID = get_post_thumbnail_id( $post->ID );

if ( $images = get_posts(array(
		'post_parent' => $post->ID,
		'post_type' => 'attachment',
		'numberposts' => -1,
		'orderby'        => 'title',
		'order'           => 'ASC',
		'post_mime_type' => 'image',
		'exclude' => $thumb_ID,
		)))
	{
		foreach( $images as $image ) {

Custom Fields

This was one of the major reasons I abadoned WordPress for Processwire, you see in ProcessWire you create a field, a field determine what type of content to capture from the user in the administrator section, so an Image Field would require the user to upload images, a text field would require user to input text content, now the beauty of this mean Developers like us, can easily extend the Field API and simply create a field to accept a specific type of input. Now I built a website using ProcessWire and gave to a client which happens to be my aunt, now my aunt knows nothing about content management and WordPress was actually hard for her to navigate. With Processwire it was easy to know what each field required.

CONCLUSION

So i asked myself if ProcessWire is this good, why are people still clinging to WordPress, i spent a lot of time reading this article , and it occured to me, frankly WordPress earns me more money than any platform, why ? because WordPress is flawed when using as framework to build applications, I would be honest the security issues makes it possible for developers to cash out from providing support for security which should be provided from the box, if you doubt me think about it when installing a WordPress, you find yourself needing to install about 10 plugins or more just to get what you need. Now it's only natural for sites like WPTavern and Tom MCfarlin to protect their interest because let's face it, if WordPress development contributed about 50% of my source of income, it would be in my best interest to hype the WordPress development regardless of whether it sucked or not. WordPress is awesome for blogging and writing articles, but the moment you advance and decide to a complex application, you start to see the limitations of the platform.

In my next article I would write an indepth guide of how I migrated a WordPress application to ProcessWire with ease.

At the end of the day, I am a Developer and not a user, it's my job to recommend platforms that are suitable for specific purposes and it hurts me to say that WordPress is not a platform I would be using to build any website other than a blog, however I need a PlayStation 4 and I know that a WordPress task (Plugin Development) is going to one way or the other end up on my table.

But as for now I am purely into ProcessWire and ImpressPages and also waiting for a Yii 2 Framework CMS to surface till then ciao, would be writing some ProcessWire tips and how WordPress Developers can easily migrate to ProcessWire.