More Than A CMS: Drupal As An Application Framework


I have seen many people either asking if Drupal is an application framework, or arguing that it is or isn't. There are varying opinions, with some arguing frameworks cant come with UI's or that they can't function out of the box without coding. For me the question is does it provide tools need to develop complex and robust applications, and make it easy to do so. I find myself leaning more and more choosing Drupal as the base for my web applications.

When I first started working with drupal I thought of it just as a CMS but as I used it more I realized how robust the API's were as well as the strength of the community. Realizing quickly that Drupal could be used to build almost any application. Drupal provides several tools to help support your applications.

Users – Drupal provides an authentication system for users and already provides an interface for managing them, and the drupal community provides numerous modules for managing roles, permissions, content access, group management, profile management, and even modules for friends and buddies for managing social network type sites. Drupal does not have a lot in terms of third party or SSO options but the login system is designed so that you can easily hook onto other services.

Data Models and Display Views – Drupal provides CCK (the content construction kit) and views for managing and displaying data. CCK can be used for just content management. Although drupal was designed as a CMS / Blogging engine the content creation kit can be used to easily construct database schemas and create relationships between them. Views provides the ability to display data in almost any way necessary and when you need to expand you can use hooks to modify queries and theming functions to take full control over the displayed data.

Business Logic – Handling business logic in drupal can be handled in a few ways. First is through Rules, a robust trigger based system that allows predefined or custom coded actions to be executed. Rules is extensible by other modules so many community projects add even more triggers and actions. Drupal's API also provides the ability to hook into its processes or other modules functions to change the flow of the application or add in complex behind the scenes functionality.

Web Services – Service modules are available to drupal to ease integration between web applications, with community modules support is provided for the most common web service protocols. If full blown custom web services are not required Drupal also provides feed handling for creating feeds of information that can be used by other applications or importing feeds from other locations.

API and Community support – The Drupal architecture and API was designed for the system to be extended by developers and the community, but beyond that it was designed for a layers of extendability. Hooks provide user the ability to modify portions of other modules while maintaining the ability to update the module separately. Using community modules saves time and in most cases provides a very high quality product as the community has expanded on the module to make it as feature rich as possible

As an experiment in how capable Drupal is as a development framework I chose a simple application that I had heard was used in a framework coding competition. The challenge was to build a time tracking system. I started from scratch and gave myself 2 hours, and did not use any modules that existed to do time tracking for drupal, but only modules that would assist me in creating it. Within the time I had two user roles one for users to log in an track their time and one for administrators to view time and generate reports. Users had the ability to add new entries, select the projects, billing category, type of work, date, time spent, and descriptions. They could view and filter their old entries by any category, any date range, project, or any combination. The entries were shown in a table with hours totals at the bottom, and the table provided the ability to edit the entries in-line using AJAX thanks to the editable fields module. A calendar view was also provided that drilled down to a listing of time entries for that day. Administrators had the ability to view entries filtered by user, project, billing type, or type of work, for any date ranges. Administrators could export CSV reports of the data. I added rules to inform administrators when new time entries were added, as well as email reminders for the end of the week to all users to complete their time, as well as notifying them how many hours they had recorded that week. So within my 2 hour constraints I had managed to build a functional time tracking application. With a little more time the application could really shine with additions like quick books integrations, charts and graphs for management, and team management options.

The goal of my experiment was to test Drupal as a rapid application development framework, and I hope I convinced the “nay sayers” that Drupal is a terrific option for rapid application development.

 

About the Author

Mark Moylan began working with Unleashed Technologies since 2010.  He graduated from the University of Maryland Baltimore Couny in 2007 with a BS in Computer Science.  He specializes in customizing Drupal for professional and non profit...

 
blog rss banner
 

View All

Testimonials

"Unleashed Technologies has done a phenomenal job with two different major and ongoing projects.

Director of Marketing, Recruiting Firm

"Unleashed Technologies came in under budget and blew us away with the quality of their work. It was refreshing! Especially when most others in this field over-promise and under-deliver!"

Lawson Owen
Proactive Dealer Solutions