Requirements by Pattern

An industry obsessed with the "end game" needs a new descriptive tool designed to speed the specification process. These are a subset of the most prevalent and well-defined requirement patterns.


November 29, 2006
URL:http://www.drdobbs.com/architecture-and-design/requirements-by-pattern/196600223

New engineers in the software industry argue the profound impact of good requirements engineering on a project. Even fewer engineers can claim that they spend any tangible effort on requirements engineering. Most sheepishly smile and claim, ironically, that their management fears that requirement analysis might negatively impact the delivery of the final product. This, of course, hints to a devil in the details.

In general, the software industry is obsessed with the "end game," or shipping the "final" product. As evidence of this obsession, witness the tools most prevalent throughout our industry:

Academic institutions groom us as solution-space engineers from the moment we express an interest in building software. We learn algorithms, language theory, computational theory, discrete mathematics, and calculus. Each of these lessons is meant to help us solve problems. But we never learn about the problem space.

How do we identify the problem? How do we extract information about the problem? How do we organize our findings? Ultimately, we never learned how to restrict ambiguity in the problem space. The disease manifests symptoms such as ill-defined requirements, unmet requirements, unknown requirements, and design-dependent requirements (one of the greater sins).

Many requirement specifications introduce design dependencies meant to restrict the creativity of the designers and developers. This is the exact opposite of what a specification should do. For a legion of engineers groomed with incredible technologies at their disposal, a specification must restrict ambiguity in the problem space while simultaneously introducing latitude into the solution space. Injecting latitude into the solution space enables our legion of engineers to bring the force of their creativity to bear by providing them with the gamut of possible solutions to what the specification must identify as the user's need. This strategy acknowledges that technologies change by the hour, while problems change by the day.

But why stop at the creativity of engineers? The power we demand from our solution-space tools has spawned stories of clients building portions of the final deliverable. The blurry line between developer and client suggests that we shouldn't concern ourselves as much with the solutions space. It follows, too, that the antiquated coursework offered by our academic institutions requires updating.

Of course, academic institutions are slow to respond and we need help now. Distressingly, the ocean of tools available to solution-space engineers rarely helps problem-space engineers. Some argue that CASE tools help capture data requirements. Unfortunately, the notations that CASE tools offer are often those used to capture design-level details, leading to bias and confusion. While many CASE tools enable problem space engineers to capture use cases and their exemplary dynamic behavior, they do not aid in succinctly explaining those diagrams in words. It is here we face the devil face-to-face -- and smell the Jolt and coffee on his breath.

Wang Bi, a third-century Chinese scholar, has this to say in "General Remarks on the Changes of the Zhou":

Images are the means to express ideas. Words are the means to explain the images. To yield up ideas completely, there is nothing better than images, and to yield up the meaning of images, there is nothing better than words.

In other words, he suggests that to capture ideas from the problem space, we need both imaging tools and descriptive tools. Tools for imaging ideas, such as UML, BON and the like (flawed as they are for modeling requirements) will suffice until some bright engineer provides a better solution. One possible descriptive tool is requirement patterns.

Indescribable Qualities

The inclusion of the word "pattern" in the phrase is a purposeful reference to Design Patterns: Elements of Reusable Object-Oriented Software (Addison-Wesley, 1995) by Erich Gamma et al., the ible of the design patterns movement in software development. The purpose of design patterns is to capture software design know-how and make it reusable. Design patterns provide a powerful way to describe useful architectural configurations, building on the collective experience of skilled designers and software engineers. Patterns capture these solutions in an approachable form that describes problems, contexts and examples to which they apply. Although there are stylistic variations, the most popular pattern format (practically canonized by use in the Design Patterns book) describes the structure of a pattern in terms of its intent, synonymous names ("also known as"), motivation, applicability, consequences and example implementations.

Design patterns are rooted in architect Christopher Alexander's work, especially his book, A Timeless Way of Building, (Oxford University Press, 1979.) A Timeless Way of Building eloquently reveals that, in architecture, timeless structures exist that have fundamentally indescribable qualities. These qualities work to draw people in for reasons they can't explain. As these qualities are indescribable, the best we can do is extract formational patterns found in these structures and describe them in some meaningful way in the hope that we can reproduce the qualities.

The requirement patterns presented here are derived from this spirit. The quality, in this instance, is not necessarily the ability to draw people in (though that would be a nice side effect). Rather, it's the ability to restrict ambiguity in the problem space while simultaneously introducing latitude into the solution.

The following subset of requirement patterns represents the most prevalent and well-defined requirement patterns. I have successfully used each of the patterns on at least four separate requirement specifications. Each of the specifications addressed different problem domains, yet the requirement patterns helped to speed the specification process in all four instances.

Capturing the Spirit

I have successfully used each of these patterns on at least four separate requirement specifications. Each specification addressed different problem domains, yet the requirement patterns helped to speed the specification process in all four instances. After I delivered each specification, I interviewed each of the consumers of my specification. Usually, these interviews are painful for requirement engineers. More often than not, the consumers of a specification miss the intent of a passage, misunderstand a passage or, worst of all, never read a passage. In this case, the consumers were the first to comment that the requirement patterns eased their consumption of my specifications. Furthermore, the subsequent design documents generated from my specifications captured the spirit of the user's need without my intervention. In other words, my specification made me obsolete.

Specify Intent

The intent of the Specify pattern is to describe how an actor can identify an object in the application. Specify enables authors to independently focus on methods to identify information and perform operations on that information.

Also Known As

Specified, Locate

Motivation

In applications, the author often wants to describe a method to identify a piece of data. Take the example of a car insurance company's customer-care application. When a customer calls with questions, the first activity the customer-care representative handles is collecting data from the customer to identify him in the system. For instance, the first question is often, "What is your name?" The customer-care representative enters the response into the application. In turn, the application provides a list of hits or, in the case of an exact hit, the information pertaining to the customer.

The problem arises when trying to talk about this activity without disclosing any implementation details. To remedy this, it is sufficient to require that the application enable users to "specify" some piece of information. For the customer-care application described previously, the solution is as follows:

Specify Customer

Specify Customer with Last Name

The Customer Care application will enable the Userto specify a Customer with the Customer's last name.

Later in the document, the author may refer to this feature as follows:

Change Customer Information

Change Customer Name

The Customer Care application will enable the user to change the name of a User-specified customer.

Applicability

Use Specify when: The intent of the Specify pattern is to describe the means an application provides to a user to identify an object. Specify enables authors to independently focus on methods to identify information and performing operations on that information.

Consequences

Specify has the following benefits and liabilities:

Convenient reference. Most specifications include discussions of locating or identifying a piece of information and then performing some operation on it. The pattern reduces the coupling between the operation and the specification, enabling the author to focus on the two aspects of data management independently.

Example Implementations

Examples of ways to implement Specify include:

  • The File window used prevalently throughout Microsoft's Windows applications. In this case, the specification method may consist of highlighting a presented file name or typing one in.

  • Many of the internet search engines provide rich methods for specifying information. These methods include wildcard keys and Boolean expressions. Once the user enters the search criteria, most search engines then provide a list and the user is guided to specify the information they want to view by pointing and clicking with their mouse.

The Presentation Requirement Pattern

Presentation Intent

The intent of the Presentation pattern is to describe data the application must exhibit. Presentation enables authors to require an application to exhibit data without specifying the exact implementation for how the information is specified.

Also Known As

Present, Display

Motivation

One of the primary interface mechanisms utilized by today's applications is through human vision. The steps that comprise this interface are:

  1. The application displays some information.
  2. The user sees this information.
  3. The user acts on this information.

Examples abound of this type of interface. A specific example is an e-mail utility. When I wish to know if I have new mail, I start this application which, in turn, presents a list of my new mail messages.

Unfortunately, this visual interface often sneaks into specification documents, jading and restricting possible implementations. As a result, other possible implementations are overlooked. To remedy this situation, it is sufficient that the document simply requires that the application "Present" a list of data items. For the e-mail system described above, the solution is as follows:

Present New E-mail Messages

Include Unread E-mail Messages

The E-mail Application will include as part of the "Present New E-mail Messages" presentation any e-mail received by the application not yet read using the "Read E-mail" feature.

Include E-mail Subject

The E-mail Application will include as part of "Present New E-mail Messages" presentation the "Subject" data item included as part of the e-mail data item described in the data requirement section.

Applicability

Use Presentation when:

  • the application must interface with a human user via one or more human senses; or
  • the application must interface with a software or hardware component that will select information from a list of options.

Consequences

Presentation has the following benefits and liabilities:

Focuses on data items. Presentation enables the author to focus on the information that must be displayed and not the method for how that information is exhibited.

Example Implementations

Examples of implementing Presentation include:

  • a pager that uses different vibration patterns to indicate the priority of a page
  • a dashboard that displays the operational condition of a vehicle
  • a projector clock that displays time on the ceiling.

Prioritize Intent

The intent of the Prioritize pattern is to communicate the urgency of one application aspect over another. Prioritize enables authors to require an application to communicate urgency without specifying the exact implementation for how the priority is communicated.

Also Known As

Priority, Prioritize, Sort

Motivation

Prioritization is a common activity in most applications. For example, most e-mail applications enable users to sort their mail messages in various ways. For instance, users can sort their e-mail by date in either ascending order or descending order. Ultimately, the goal of the sorting is to place the important e-mail messages toward the top of the list, in the position of highest priority.

There is more than one way to communicate priority, however. While sorting may be the most appropriate solution, restricting or jading creative developers does everyone a disservice. For instance, color-coding may be an innovative or fresh solution to communicating priority.

To remedy this situation, it is sufficient for the application to require that the application "Prioritize" application objects.

For the spreadsheet example above, the solution is as follows:

Prioritize E-mail Message Presentation

Prioritize E-mail Messages by Date

The E-mail application will enable the user to prioritize e-mail messages in the "E-mail Message Presentation" by the date included as part of the E-mail data item, as described in the data requirements.

Prioritize E-mail Messages by Subject

The E-mail application will enable the user to prioritize e-mail messages in the "E-mail Message Presentation" by the subject included as part of the E-mail data item, as described in the data requirements.

Applicability

Use Prioritize when:

  • the application displays lists of information that contain items with greater importance than others
  • the application utilizes windows or dialog boxes with control items with more importance than others.

Consequences

Presentation has the following benefits and liabilities:

Focuses on data items by which to prioritize. Prioritize enables the author to focus on the information that the application is to prioritize by as opposed to the method used to prioritize.

Example Implementations

Examples of ways to implement Prioritize include:

  • ascending and descending sorted lists, and
  • color coding items in a dialog box.

Terms of Service | Privacy Statement | Copyright © 2024 UBM Tech, All rights reserved.