WordPress may at its core be a blogging platform. I know that Matt Mullenweg, creator of WordPress, wants to keep all development of WordPress focused on blogging. I also know that WordPress is and will always be primarily used for blogging. However, as I work more and more with WordPress, I’ve come to see WordPress in a different light.
There are those that want to use WordPress as a full web publishing platform and not just a blogging platform. With the right kind of theme and plugins, using WordPress in this way can produce great results. Again, I see WordPress in an even more abstract view than as just a web publishing platform.
How do I see WordPress then? Frankly, I see it as an incredibly-flexible web application framework that can be used to develop seemingly unlimited types of applications.
This is a big concept, so let me explain briefly what I mean. Over the past few months, I have become involved in projects that don’t directly involve WordPress. While talking with the client or people involved in the project, I’ve come to the same conclusion time and time again: “Why don’t I use WordPress?” I first ask myself this question, and then ask the question to the client/project staff. After explaining the benefits, the feedback has been extremely positive.
These projects are all currently in active development, so I can’t give great detail about them, but I hope to be able to share enough information so that you can understand how I use WordPress and can gain an appreciation for seeing WordPress as more than just a blogging platform.
What is a Web Application Framework?
In order to establish what this Web Application Framework thing is that I’m talking about, I’ll define it. According to Wikipedia, a Web Application Framework is:
A web application framework is a software framework that is designed to support the development of dynamic websites, Web applications and Web services. The framework aims to alleviate the overhead associated with common activities used in Web development. For example, many frameworks provide libraries for database access, templating frameworks and session management, and often promote code reuse.
Wiki further goes on to list some key features that may be found in Web Application Frameworks:
- Security – Providing user logins and access levels
- Database access and mapping – Easy access methods that abstract out database access to higher level functions
- URL mapping – Allows replacing complex URLs with query strings with cleaner looking URLs that are parsed in the framework
- Web template system – Allows for different data sets to reuse templates
- Caching – Can speed up generation or loading times by caching frequently requested data
- AJAX – Frameworks to make working with AJAX easier can be packaged as part of the Web Application Framework
- Automatic configuration – Can store/retrieve data objects to/from the database
- Web services – Offers an externally-usable API for machine to machine communication
Is WordPress a Web Application Framework?
I’m sure that this can be endlessly debated, but I simply say, “yes it is.” I think that it is clear that not only can WordPress be considered a Web Application Framework, but that it performs this role very well. How can I claim this? Let’s look at that list from the definition of a Web Application Framework and see how WordPress does.
- WordPress offers user logins
- By default, these logins can belong to one of five different access levels
- WordPress also has internal logic that allows for testing whether or not a user has access to 31 different capabilities
- Database access and mapping
- URL mapping
- Web template system – WordPress’ template system with themes is highly capable and flexible
- WP_Cache is WordPress’ built-in object caching system that offers execution speed improvements by caching frequently-needed objects
- Via the plugin functionality, WP Cache and WP Super Cache can offer a large variety of caching options that can increase site performance by an order of magnitude or more.
- AJAX – While not offered directly, jQuery which has some AJAX functionality is included and easily used by WordPress and plugins
- Automatic configuration – The Options storage mechanism provides a very easy to use method for quickly storing and retrieving PHP variables
- Web services – WordPress supports publishing via Atom, XML-RPC, and email as well as automatic pinging and producing and parsing RSS feeds
Almost all of the features I’ve talked about are included by default with WordPress (with the exception of WP Cache and WP Super Cache). When you consider that every one of these categories can be supplemented with either publicly available or custom written plugins, the options are truly endless.
This brings me to the most important point.
Why use WordPress as a Web Application Framework?
The entire reason to use a Web Application Framework is because it can make the project quicker to complete and can make maintenance easier long term. It is exactly these reasons that I’ve been recommending and have been using WordPress as a solution for new web application development.
Since I’m already working with WordPress all the time, I might as well keep working in what I know. In addition, using WordPress means that I don’t have to write and maintain code to handle user authentication, templating, or third-party extensions. By no means am I a designer, so giving the client the ability to use any theme that they can find, purchase, or have custom built for them while not requiring that the theme developer know anything about the project itself makes the final product much more flexible and puts much less pressure on me. This lets me forget about all the issues that need to be solved for every project and focus on what is actually new and needs to be created from scratch.
Another nice bonus is that I can use code that I’ve already written for WordPress and any time I update that code, all these other projects can instantly benefit.
How have I used WordPress as a Framework?
I’m glad that you’ve asked. I currently have three apps in active development that use WordPress as a framework.
The first time I thought of using WordPress as a framework was when I started on a project for a new web app where visitors run through quizes and provide feedback after analyzing their responses. At first, I was going to build this from a CMS that I had a lot of experience with, but then I realized that it had many limitations and could only be updated by myself. The idea of using WordPress hit me, I presented the idea, and we’ve been rolling with it ever since. Using WordPress for this has been a boon. It means that I don’t have to worry about the design of the site or providing expanded functionality that could easily be handled by readily available plugins.
A few months back, I needed to get Subversion working in the office. Two of us needed commit access to Subversion and everyone needed read access. I knew that using Subversion was not important for anyone other than the committers and teaching it to everyone else would be a waste of time long term and would wind up with weekly questions of “how do I …?” My solution was to create a plugin that I put in a new WordPress install which listed details about each repository (name, latest version, last change timestamp, last committer name, etc). It also provides access to a zip file to easily download either the latest trunk build or the most current tagged release, allows committers to create new repositories, and allows for packaging together the files from multiple repositories into a single zip file. This application has been extremely useful and took a fraction of the time it would otherwise take since I used WordPress as a framework.
The latest use of WordPress as a framework has been in creating a replacement back-end for a billing system. There are great billing systems out there, but after trying many of them out, they all fell into two camps: too complicated or too simple. So, I decided to code up the perfect interface that only provided the options that are needed in order to simplify administration. By this point in time, I naturally selected WordPress as the foundation of this new development. The development is still early, but it is already showing huge promise and I don’t see any reason why it won’t be a big success.
If you are looking at developing a custom web application and have experience with creating WordPress plugins and/or themes, I highly recommend thinking about using WordPress as a framework. It might not be exactly what you are looking for, but that’s the beauty; you can strip out what you don’t want and leave what you do want.
Since WordPress is in active development and surely will be for years to come, code updates will come out frequently that tighten down security, introduce new functionality, and improve the overall performance. This means that you get the added benefit of improving the foundation of your web apps without having to actually code all of it.
I’m sure that there are those of you out there that are thinking, “yeah, but WordPress has had some known security exploits in the past; I wouldn’t trust my apps security to WordPress.” To those of you that think that, I would like to point out that security exploits, and even possible security exploits, that are found are quickly patched. This is why it will be important to keep your apps current with the new WordPress code releases. That said, I doubt most developers could code tighter security than already exists in WordPress. If you can, join the WordPress team, help tighten it up, and let your projects benefit from using WordPress as a framework.
There is much more on this topic that I’d like to cover. If you’d like to see me expand into this topic with more detail, please leave a comment and let me know what you’d like to see more of.