When you zoom in or zoom out of a software system, what do you call the different levels of the software? Design levels are a key issue for architecture because they define the problems and forces that the architecture needs to solve. In Software Architect Bootcamp (2nd Edition), Ralphael Malveau and Thomas J. Mowbray, Ph.D. write about different models for software design levels.
Machine, Code and Architecture
Shaw and Garlan [Shaw 1996] proposed a three-level model for software design levels:
Malveau and Mowbray write the following:
The machine level comprises unmodifiable binary software, including the operating system and linkable modules. The code level is a modifiable source code. The architectural level is a higher level of abstraction. In their model, architecture comprises software partitioning, software interfaces, and interconnections.
Malveau and Mowbray suggest adding another level to the three-level model:
The three-level model establishes a useful frontier for academic research on software architecture. However, it does not have enough levels to provide a sufficient separation of design forces. In addition, the model cannot explain key object-technology benefits, such as interoperability and reuse. Interoperability and reuse require at least one more level in the model — enterprise, an architecture of system architectures.
The Fractal Model of Software
Malveau and Mowbray write about the fractal model, originally proposed by Richard Helm::
Another way to view software levels is in terms of scale. Objects and classes are the finest grain level. This is the level defined by programming languages (C++, Java) and infrastructure (e.g. CORBA, J2EE). The next level comprises microarchitectures, which are simple configurations of objects. This is the level addressed by most design patterns. Configuration of microarchitectures form frameworks. Groups of frameworks form applications (or subsystems), and groups of applications form systems.
Micro-Design and Macro-Design Levels
Malveau and Mowbray write about the Software Design-Level Model (SDLM), which has two categories, Micro-Design and Macro-Design:
The Software Design-Level Model (SDLM) builds upon the fractal model. This model has two major categories of scales — Micro-Design and Macro-Design. The Micro-Design levels include the more finely grained design issues from application (subsystem) level down to the design of objects and classes. The Macro-Design levels include system-level architecture, enterprise architecture, and global systems (denoting multiple enterprises and the Internet).
The Micro-Design levels are those most familiar to developers. At Micro-Design levels, the key concerns are the provision of functionality and the optimization of performance. At the Macro-Design levels, the chief concerns lean more toward management of complexity and change. These design forces are present at finer grains, but are not nearly of the same importance as they are at the Macro-Design levels.