WordPress webapp framework. More than a blogging engine. More than a CMS.
Posted by Leonid Mamchenkov on June 18, 2007
I’ll try to keep this post as non-technical as possible for the benefit of the general public. The main goal of the article is to show why and how WordPress is more than just a blogging engine or a content management system (CMS). WordPress is a web application framework.
First, let’s see Wikipedia definition of “Software framework”:
A software framework is a reusable design for a software system (or subsystem). This is expressed as a set of abstract classes and the way their instances collaborate for a specific type of software (Johnson and Foote 1988; Deutsch 1989). Software frameworks can be object-oriented designs. Although designs don’t have to be implemented in an object-oriented language, they usually are. A software framework may include support programs, code libraries, a scripting language, or other software to help develop and glue together the different components of a software project. Various parts of the framework may be exposed through an application programming interface (API).
Reusable design, blah blah blah, code libraries, scripting language, blah blah blah, glue together, blah blah blah, API. Not bad. I’d say it nails it.
The truth of the matter is that WordPress has a lot to offer to web application developers (web developers and webdevs for short). Let’s see exactly what.
- Database abstraction layer. WordPress provides functionality for database connectivity, querying, variable escaping, caching, and troubleshooting. Altogether this means faster development for database dependent web applications.
- User management. WordPress has a whole lot of functionality around users. Most web applications these days use some sort of user management. Many require access control management. WordPress offers this out of the box.
- Content and object management. WordPress provides functionality for object management (posts, pages, attachments, drafts, categories, etc). These objects have some minimal attributes (title, author, publication date, etc), but can be easily extended with custom fields (price, size, relationship, status, and anything a webapp might need).
- XML-based interfaces. WordPress knows a lot about XML. It can import and export data in a number of XML-based formats (such as RSS and Atom, for example). And it also provides a powerful way to interact with data (both read and write) – an XML-RPC interface.
- API. WordPress is one of those system that really behave like a skeleton. It allows for all sorts of customizations, both visual and functional (plugins, themes, widgets). It lets web developers control many internal processes and outputs (hooks). It makes packaging and redistribution of features and appearences trivial with packages and themes.
On top of that, WordPress features some excellent documentation, large and active user community, search engine friendlyness, and more.
And why is that so cool? Because. Because almost all modern web applications can benefit from these. How many web applications do you know that don’t use some sort of database? How about web applications that don’t manage users? Are there any web applications at all that don’t need content management? Are there any good web applications that weren’t integrated with other web applications or extended by user community in some way?
And don’t forget that WordPress is a free and open source software. That means that anybody, anybody at all can improve it. Nobody, nobody ever is going to lock it down and have full control over the future direction. And nobody will ever force you to pay huge amounts of money for support, upgrades, or maintenance. That’s pretty important considering the cornerstone roles frameworks play in application development.
Can we have a practical example without going into too much of technical details? Yes, of course.
Consider WordPress posts. They have already been assigned different types – post, page, draft, attachment, etc. But these don’t vary a lot to demonstrate the power. What’s truly amazing is that WordPress posts can easily (with custom fields) represent any other data. WordPress post can represent a real estate object, for example. Or a car. Or a person. Or a product. Or a service.
WordPress’ own categories can be reimplemented as posts. And, in fact, that was somewhat done with pages. Remember, a page can be a parent of another page? Just use post title as category name and post content as category description, and here you go – your own category subsystem within WordPress, without any work at all.
Why do we need WordPress categories then? Well, they come handy sometimes too. Let’s say you have you’ve built a product catalog using WordPressj (each product is a WordPress post). And let’s say your products can have a number of features or properties. And let’s say these features can be easily expressed as true/false or yes/no value. For example: featured product – yes, can be shipped globally – no, available in gift wrapping – yes, needs age confirmation – no, and so on. Well, these all features can be implemented as categories. Then you just assign appropriate categories to your post (product), and you don’t need to do any programming at all. More so, you have a whole lot of functionality given to you by WordPress itself (editing, searching, aggregating, counting, etc).
WordPress provides some really useful functionality for application development. But it’s been hyped as a blogging engine and a CMS for far too long now. Getting rid of stereotypes and expanding horizons will take some time. But I have a tip for you that might be handy along the way.
For the next day or two, every time you stumble upon a web site – be that three static pages or the newest Web 2.0 service, ask yourself a question – “Can this be implemented with WordPress?”. I promise, you’ll be amazed by the number of times you’ll say “yes” (note: if you come up with “I don’t know”, use some help resources to figure out a “yes or no” answer). And after those couple of days come back and we’ll work on the “How do I do this with WordPress?” question.