Hitchhiker's Guide to Software Architecture and Everything Else - by Michael Stal

Monday, December 17, 2007


Recently, I have been involved in consulting some friends about a software development project. At some point in time we started intensively discussing requirements. Soon I recognized there were some funny misunderstandings related to what requirements are. Sentences such as "Oh, all these use cases are our requirements" emerged from the void of the universe and gave me some hints there could be a problem. When I asked them for their use-cases, the only thing they could show me was a UML use case diagram. Not really what you expect as an architect. So, my first activity was explaining the theory of requirements, at least my small, probably incomplete perspective on the world of requirements.

Functional requirements define the what of the system in terms of the problem space. Thus, they should be expressed in the language of the target domain. All functional requirements span a full range of possible solutions.

Non-functional requirements come in two flavors, operational requirements and developmental requirements. They impose constraints on the full range of solutions and thus represent beasts of the solution domain.

Operational requirements are directly related to the operation of the software system. They define qualities such as security, performance, fault-tolerance and can be measured or tested.

Developmental requirements are directly related to the architecture of the software system. They define qualities such as maintainability, usability, or flexibility.  While some metrics exist for developmental requirements, they are normally not measurable.

It is interesting that most projects don't fail because of functional requirements but because of failing to meet the non-functional ones. Thus, it is often recommendable to assign sub teams or at least experts to the most important non-functional qualities in the project. They should then prepare checklists, strategies and tactics for ensuring the quality they are responsible for.

I often use the invasiveness as an additional property. A concrete instantiation of a requirement is invasive if it has an impact on the functional subsystems or relationships. Cross-cutting concerns such as security are mostly invasive.

To express functional requirements use-cases represent an excellent means. Note: Use cases are textual descriptions with sections such as actors, goals, exceptions, preconditions. A use case diagram is merely a graphical summary of use cases. For all other, i.e. non-functional requirements I recommend using utility trees such as introduced by Bass, Clements, Kazman. For example, a requirement such as flexibility could imply a lot of different things, maybe changeability, extensibility, or removability.

In the activity of architecture design, all decisions are based on requirements. Unfortunately, requirements can contradict each other. For instance, mind the availability/consistency paradox or flexibility versus performance. This means that all requirements must get a unique priority to let architects decide which path to choose at all decision points. NEVER accept requirements to have the same priority. If they have, assign priorities yourself. This also means: all architectural decisions must be solely based on requirements. Don't create design pearls, create the simplest possible architectures that work (i.e., that meet their requirements)!

Features are also requirements. So are commonalities and variants. However, they are at a very high level of abstraction and need to be mapped to finer levels first.

Requirements are the most important entities in a software development project. They help asking the right questions and making the right decisions. Requirements are a tool to constrain the problem and solution domain in such a way that an implementation can be developed effectively and efficiently. If you don't value requirements, you are doomed to fail, because you don't know what you are expected to build. Requirements are your friends, treat them as such!


  • most projects fail because of non-functional requirements..i never thought about that, but it seems very true..great post..

    By Anonymous Anonymous, at 8:19 AM  

  • I do totally agree. I especially support your view on non-functionally requirements and the separation in development/operation. From my point of view, taking care of the non-functional requirements is one of the main responsibilities of software architects. This is hard work. Non-functional requirements are much harder to specify, trace and to test in the end. This topic is worth to be discussed in more detail.

    By Blogger Maik G. Seewald, at 9:23 AM  

  • And I got another comment. Security requirements are special (and currently my field of expertice btw) because they are both: functional and non functional. An important success criterion is that these requirements must be identified early in the software engineering process because they interact and put constraints on other requirements. Not easy to identify, to communicate and to trace.

    By Blogger Maik G. Seewald, at 9:42 AM  

  • very well written,

    A suggestion: I would appreciate if you could provide wiki links for terms, eg, utility tree etc.

    By Anonymous Anonymous, at 3:49 PM  

  • By Wiki-links you are referring to wikipedia, right?

    -- Michael

    By Blogger Michael, at 4:10 PM  

Post a Comment

<< Home