Using Drupal to Build
a Custom Application

This CMS can be used for more than a traditional website

October 21, 2014
Development, Drupal

Drupal is More Than a CMS

When you hear "Drupal" you probably think content management system (CMS). This is true. Drupal is an excellent content management system for creating and managing large, content-driven websites. However, Drupal is far more than a CMS.  At NMC we use a variety of systems for traditional web project, often serving as a Drupal web design and development firm for clients with experience on the system.  

In addition to using the system to build standalone websites, we also use it as a tool to curate and expose data via JSON APIs.

Many of our clients already have a website (developed by us or another agency). Often they'll ask us to build a searchable database of stuff for their website. For example, North Carolina Community Foundation recently commissioned a searchable database for scholarships and grants. We are currently building a searchable database of biomedical markers for BioAgilityx. In both cases, we are adding new functionality to an existing website that may not be ready to house and search massive amounts of structured information.

We need a user interface designed specifically for collecting and curating information and a way to expose this information through an easy-to-use HTTP API. In our early years, we often built custom applications from the ground up with PHP or Ruby. These applications recycled the same user authentication logic and boilerplate CRUD (create, update, and delete) screens. We were re-creating similar applications to curate and search large data sets, time and time again.

Today, we use the Drupal Content Management Framework for these applications. It provides excellent content import, creation, and curation tools for free out of the box. It has powerful user authentication, roles, permissions, and the ability for users to reset forgotten passwords. With a few additional modules, we can expose curated data in a searchable JSON API.

Modules

We use these essential Drupal modules to import, curate, and publish information:

views
This is an essential module that lets us expose information in various formats.
views_bulk_operations
This module lets us apply bulk actions to large numbers of content items at once.
views_datasource
This module lets us expose content in various formats (e.g. JSON or XML).
feeds
This module lets us easily import CSV and XML data.
feeds_jsonpath_parser
This module lets us import JSON data.
feeds_xpathparser
This module lets us import XML data.

Content structure

We define content types and fields just like any other Drupal website. It lets us define custom content types (e.g. an article) with any number of custom fields (e.g. title, body, summary, source, image, author, publish date, and related articles).

Drupal content type definition

Content import

After we define our content types and fields, we import existing data from a wide variety of formats into our Drupal website. We use the Feeds module to do this. The Feeds module (with the JSONPath and XPath parser modules) facilitates the migration of data form one format (e.g. a CSV file from our client) into our content structure. We can prompt the Feeds module to import data on-demand or on a recurring schedule.

Drupal feed importer

Content curation

Our clients can use Drupal's user interface to quickly and easily curate information. We'll often use the CKEditor module to provide a client-friendly interface for editing fields with large amounts of formatted text. Clients can quickly categorize or otherwise manipulate large numbers of content items with the Views Bulk Operations module.

Drupal content curation

Content API

Finally, we expose curated information as JSON with the Views and Views Datasource modules. We use exposed fields to let remote HTTP clients search on a given content field with HTTP request query parameters. This is easy to setup with the view user interface, and it leverages Drupal's powerful full-text search functionality.

Drupal view configuration

Now we can search and embed curated information on remote websites using our Drupal-powered content API.

Drupal is a platform

Drupal is more than a content management system. Drupal is a platform. It is an incredibly powerful data curation tool that can manage and syndicate searchable content – just as well as it can power a standalone website.

Comments

Alex Periera's avatar
Alex Periera
Hi Josh,

Many thanks for sharing amazing information about curating and organizing web content through Drupal. This reminds me of my initial forays into Drupal, where I had a hard time converting an HTML static website into Drupal. I could do it some how, as persistence and luck played a very important role. But still an exact method or science behind such a conversion is still eluding me. Most of the tutorials I found, regarding this, converted simple static web pages, while my website was full of features and complicated. Can you please put up an how to about converting a complex web page into Drupal?

Leave a comment