Analysis and Design vs. Description and Translation
2012-10-01
Summary: 'Analysis' and 'Design' are intuitively appealing but loaded with confusion. 'Description' and 'Translation' are more useful terms.
Introduction
When the hype around OO modelling was at its peak in the 90s, much discussion was given to the difference between “analysis” and “design”. The populist view was espoused by Booch, Rumbaugh, Jacobsen and others. “Analysis” was about understanding the problem independent of the solution. “Design” was about finding a technology solution to the problem. It’s an intuitively appealing distinction. In practice however there were countless discussions, based on real problems, centred on where different concerns lay. Consider a railway management system. A key requirement is an algorithm that ensures only 1 train can ever be on a given section of track at one time. Now: is specifying that algorithm “analysis” or “design”? It’s certainly a concern of the problem space - so it’s analysis then. Ahh - but 'analysis' doesn't produce algorithms - surely that’s a design activity?
Many similar discussions took place. They were interesting but ultimately unfruitful: no-one managed to come up with a good, workable distinction.
The question of “detail” arose from those discussions. One of the distinctions posited was that Analysis didn’t concern itself with ‘detail’; that was a Design activity. In fact, it was the essence of the elaborationst approach: elaborate your analysis models by adding 'detail' to produce design models. Again however trying to define what constituted ‘detail’ proved elusive.
Around 1996 I was introduced to Shlaer-Mellor. In the method wars, Sally and Steve had ploughed a lonely furrow. Popular opinion ran with the elaboration viewpoint as promoted by Booch, Rumbaugh, Jacobsen et. al. Sally and Steve promoted an alternative - the translation approach, known as Recursive Design.
It was fundamentally different. It bent my mind. Instead of adding successive detail to analysis models by hand, RD proposed a completely different approach. Create precise models during analysis that could be executed and translated automatically into working code.
It took me a while to re-orientate my brain to this new way of thinking. But once I got there it was a revelation. Suddenly, there was a clear distinction between “analysis” and “design”. Analysis meant modelling a problem space - producing a precise, executable model that accurately and unambiguously described the domain and its desired behaviour[1]. “Design” meant translating that model into an appropriate execution environment (e.g. embedded C for a micro-controller application, Java EE + Relational DB for a business application, etc.).
But... (there had to be one)
Well, yes. The only issue is the terminology. ‘Analysis’ and ‘Design’ are loaded with such heavy baggage that even uttering the words sparks controversy and debate. I prefer to use Description and Translation. They are true to the OOA/RD philosophy. When we model a domain, we are describing it. In order to be able to translate the model into a software architecture, the description needs to be precise - to have well defined and unambiguous semantics. Translation is then the act of morphing the model from one ‘language’ - the modelling language - into another - the architecture. It is directly analogous to translating a passage of text from English into French. The meaning remains consistent but the representation (vocabulary) and mechanics of the language (grammar) are different.
Treating modelling as a process of description also removes some of the traditional debate on analysis vs. design. Returning to the railway management example: defining the track access algorithm clearly belongs in the model. It’s a description of how the model should work. It also encourages creativity: description is a creative endeavour (not convinced? Ask a poet if their work is creative...).
I've used Description and Translation for 10 years now and find it as appealing, useful and accurate now as it was then. Much more workable - and with considerably less baggage - than Analysis and Design.
Furthermore, it transcends Object Orientation. It's equally applicable when using functional or procedural languages.