Uncle Bob (Apparently Robert C. Martin?)  writes about Architecture as a secondary effect .

The article postulate that : <Quote>
  1. The main goal of architecture is flexibility, maintainability, and scalability.
  2. But we have learned that the kind of unit tests and acceptance tests produced by the discipline of Test Driven Development are much more important to flexibility, maintainability, and scalability.
  3. Therefore architecture is a second order effect and tests are the primary effect

 

I had not thought about this before this round table. Here we were, a bunch of architects and designers, strongly debating the role and procedure of architecture, and the conclusion we come up with is that all the effort and struggle we go through results in a secondary improvement in flexibility, maintainability, and scalability. Writing tests (writing them first) has the primary effect

 

</Quote>

I think Bob is missing/downplaying one very important aspect - and that is level of abstraction.

 

  • Many agree (me included) that code is the final design artifact.
  • Many agree (again me included) that TDD is a powerful design technique (you may want to check out TDD Misconceptions or Rocky Lhotka vs. the world as summed by Jeremy Miler)

 

However since code is (obviously) detailed design you just can't go straight to code (test code or otherwise). In order to cope with a large/complex problem you need to tackle the problem at higher levels of abstractions first. Even more so there may be a need to go through several abstractions levels before you start coding anything. Unfortunately there aren't any real options to test models*.

 

In my opinion you cannot escape designing architecture in other (non-code) models for any, but the most trivial, system.

 

The way I see it the correct approach is to

  1. Work iteratively
  2. Test early - i.e. make sure that the architecture designed really works as soon as possible (see, for example, my post on evaluating architecture in code )

 

So - Is Architecture a secondary effect?

No, sorry, but I really, really don't think so.



* There are some options to allow simulation and validation (i.e. tests ) of models in the embedded world (e.g. http://www.embeddedplus.com/EmbPlusSMST.php or http://www.ilogix.com/sublevel.aspx?id=286) - however I find that these approaches don't scale well to IT problems (which have a lot more variables and are usually much larger than embedded systems) or even to complex embedded system. You just have to specify too much before you get a usable simulation rendering the whole effort useless.



 
Comments are closed.