My mission: Find technology for Early Adopters. Follow me: on Twitter @danwoodsearly on LinkedIn @ www.linkedin.com/in/danwoodsearly/ on myBlog @ http://www.CITOResearch.com. I am a CTO, writer, and consultant. For tech vendors, I help explain their technology. For users, I help find, select, and deploy new solutions that have explosive business value. I love to speak and share ideas.

In a variety of venues, the application of declarative programming practices and principles are starting to expand in ways that solve many long-standing frustrations with making technology work effectively.

In applications as diverse as system administration, creating Hadoop applications, or creating end-to-end applications for big data analysis or ecommerce, declarative programming is making a difference because it:

Increases the number of people who can participate in creating systems

Expands the scope of automation

Creates a healthy division of labor between those who use a system and those who created it

In my view, these lessons can lead to a new relationship between IT and the business that can be transformational. If you are looking for ways to improve the return you get on technology, you should be looking to expand the application of declarative programming.

Basics of Declarative Programming

The fundamental difference between declarative programming and the alternative, which is often called imperative programming, is this:

A declarative system asks the user to describe what they want. The system then takes that description and delivers the desired end result.

An imperative system controls a machine or mechanism that helps produce the desired result. Typically, users express their desires for the end result in a specification and a programmer then creates a system to produces (or attempts to produce) that result.

SQL, HTML, and Windows Presentation Framework are typical examples of declarative systems. In each, you describe what you want, and the system does the work of producing the result. The user must understand the language or mechanism used to describe the result, which can be quite complex. But users do not have to think for a second about how to produce the result.

Spreadsheets, scripting languages like JavaScript, and programming languages such as Java, Python, Ruby, and so forth, are imperative. In these systems, you have a set of mechanisms or objects such as a spreadsheet grid, variables, objects, and so forth, and a set of transformations that are expressed using the language. You can then write a program to use the mechanisms to create the result you want.

The idea seems straightforward enough. The key questions are:

Does the declarative approach work?

If so, why?

And finally, how can we expand use of this approach to get more value from technology?

Let’s look at the first of these two questions through some examples.

Puppet Labs: Declarative Programming for System Administration

Image via CrunchBase

Puppet Labs is the developer of Puppet, software that applies declarative programming to the task of system administration of compute, network, and storage infrastructure in traditional data centers or in the cloud. Most complex computing systems are controlled by various levels of configuration files. These files are the equivalent of the controls on an airplane dashboard. But while a typical cockpit may have a hundred or so switches, a single Linux server has hundreds of config files with thousands of controls. When you add networking equipment, firewalls, storage area networks, intrusion detection systems, and many other types of devices, the number of files to maintain skyrockets.

Now add virtualization and cloud computing, which means these devices can be created instantaneously in software. Now add the demands of the modern computing environment, which means that the computing environment must be changed rapidly in response to failure or changing requirements.

Puppet was created to handle this sort of complexity. A system administrator can declare what they want the application resources to look like, and then, depending on the kind of computer, the role the computer is playing, the applications being served, Puppet sets – and enforces – the configuration of the compute, network, and storage resources correctly.

Using this basic approach along with a variety of extensions, Puppet allows the components that comprise large computing infrastructures to be defined. Desired configurations can be enforced. Ideas for new ways of working can be simulated before deploying to production, and questions can be asked and answered through reporting.

Puppet does this work by providing system administrators a declarative language that allows a configuration file to be described and then filled in differently based on the role that the computer on which the configuration file exists is playing.

Puppet has followed the evolution of most declarative systems such as HTML or SQL. At first, basic needs could be expressed in the declarative language, but as the nature of the work being performed became better understood, the declarative language became more powerful and could describe more complex and sophisticated results.

Through declarative programming, Puppet allows the complexity inherent in the modern computing environments to be tamed and automated.

Cascalog: Declarative Programming for Hadoop

Apache Hadoop has become the center of a massive universe of development activity focused on managing, analyzing, and creating business value from big data.

Post Your Comment

Post Your Reply

Forbes writers have the ability to call out member comments they find particularly interesting. Called-out comments are highlighted across the Forbes network. You'll be notified if your comment is called out.