Concept: Elevate Level of Abstraction
This principle describes how to reduce complexity by raising the level of abstraction.
Main Description

Introduction

Complexity is a central issue in software development. Elevating the level of abstraction helps reduce complexity as well the amount of documentation required by the project. This can be achieved through reuse, the use of high-level modeling tools, and stabilizing the architecture early.

          
Benefits
  • Productivity
  • Reduced complexity.
Pattern
  1. Reuse existing assets
  2. Use higher-level tools and languages to reduce the amount of documentation produced
  3. Focus on architecture first
  4. Architect for resilience, quality, understandability, complexity control.
Anti-Patterns
  • To go directly from vague, high-level requirements to custom-crafted code:
    • Since few abstractions are used, a lot of the discussions are made at the code level versus a more conceptual level, which misses many opportunities for reuse, among other things.
    • Informally captured requirements and other information require decisions and specifications to be revisited repeatedly
    • Limited emphasis on architecture causes major rework late in the project.

Discussion 

One of the main problems we face in software development is complexity. We know that reducing complexity has a major impact on productivity. Working at a higher level of abstraction reduces complexity and facilitates communication.

One effective approach to reducing complexity is reusing existing assets, such as reusable components, legacy systems, existing business processes, patterns, or open source software. Two great examples of reuse that have had a major impact on the software industry over the last decade are:

  • The reuse of middleware, such as databases, web servers and portals, and, more recently,
  • Open source software that provides many smaller and larger components that can be leveraged.

Moving forward, Web services will likely have a major impact on reuse, since they provide simple ways of reusing major chunks of functionality across disparate platforms and with loose coupling between the consumer and provider of a service. This means that we can more easily leverage different combinations of services to address business needs. Reuse is also facilitated by open standards, such as RAS, UDDI, SOAP, WSDL, XML, and UML.

Diagram illustrating reuse existing assets through service-oriented architectures
Reuse existing assets through service-oriented architectures.
One of the problems with reuse is that two components need to know about each others existence at development time. Service-oriented architectures alleviate that problem by providing what is called loose coupling: A consumer of a service can dynamically find a provider of a service. We can therefore wrap existing components or legacy systems into services, allowing other components or applications to dynamically get access to their capabilities through a standards-based interface, independent of platform and implementation technology.

Another approach to reducing complexity and improving communication consists of leveraging higher-level tools, frameworks, and languages:

  • Standard languages such as Unified Modeling Language (UML) and rapid application languages such as EGL provide the ability to express high-level constructs, such as business processes and service components, which facilitates collaboration around high-level constructs while hiding unnecessary details.
  • Design and construction tools can automate moving from high-level constructs to working code:
    • They provide wizards that automate design, construction, and test tasks by generating code and enabling usage of code snippets,
    • They convert integration and testing into seamless development tasks through integrated development, build, and test environments.
  • Portfolio management tools, which enables managing  financial and other aspects of multiple projects as one entity versus as a set of separate entities.

In short, high level tools capture key modeling information graphically, which is a powerful and attractive way to summarize and present this information. The benefits of visual modeling are explored in more details in Supporting Material: Visual Modeling.

A third approach to managing complexity is to focus on architecture, either to define a business, or develop a system or application. In software development, we aim at getting the architecture designed, implemented, and tested early in the project. This means that, early in the project, we focus on the following goals:

  • Defining the high-level building blocks and the most important components, their responsibilities, and their interfaces.
  • Designing and implement the architectural mechanisms, that is, ready-made solutions to common problems, such as how to deal with persistency or garbage collection.

By getting the architecture right early-on, we provide a skeleton structure for our system, making it easier to manage complexity as we add more people, components, capabilities, and code to the project. We also identify what reusable assets we can leverage, and what aspects of the system needs to be custom built.