Architectural Quality

I have been thinking a lot about architectural quality and more specifically how to measure it. Code quality can though of as code maintainability as in a maintainability index measuring things like cyclomatic complexity. These seem to be specific instances of Directed Acyclic Graphs (DAG’s) which is a well known area of analysis.

Isolation can be measured by an information flow measure such as Henry and Kafura use which is different from cyclomatic’s.

There are a number of programs which use these techniques for code quality such as CCCC and together controlcenter.

I think some of these techniques can be applied to Platt’s first law (my measure of architectural quality) which will give an interesting metric for architectural quality.

Comments (22)

  1. Anonymous says:

    Following Michael Platt’s great post <a href="">"Architectural Quality"</a> and the thread of comments, I just had to add my 2 cents. For those of you that already know me, you know my 2 cents quickly gathers interest =) Make sure you read his post before mine – for context.
    Architecture should not be composed of objects. Objects are too fine-grained of an abstraction for expressing architecture. This is why the layered architecture became so prevalent. There was a need to split the architecture along planes that were larger than objects. But I’m sure that you know all this =)
    Therefore, I think that most of the OO metrics are less useful at the architectural level. I guess that the reason I like SOA so much is that the service is a more useful abstraction than a layer for the simple reason that it is a business abstraction and not a technological one. That way, it’s possible to tie metrics ( ie. risk in the system ) to specific business areas.
    IMHO, a business driver would be much more interested in getting a risk analysis directly tied to business capabilities than to technical ones. Yes, its possible to calculated the business side from various technical risks, but it’s much more difficult, and less acuruate. I mean, lets say the cyclomatic complexity of the DAL is high relative to all other layers in the system, how are you going to translate that into business risk ?
    Anyway, glad to see that the architectural quality issue is beginning to get some attention. Up until now, people were saying "let’s just use an N-tier architecture" without any thought of how well it fit. Nobody measured to see if it fit, for the simple reason that there were no metrics. I’d really like to see some metrics come out at the architectural level.
    What are your thoughts ? What is "architectural quality" ? Is there even such a thing ? How would you measure it ?

  2. Anonymous says:

    Recently there have been a number of posts in the MS blogs about Architects and how to improve the quality of code being created. Michael Platt has had a number of posts on this as have others. I’ve been thinking…

  3. .. says:

    What about object bloatyness.

    Are heavyweight objects really desirable?

  4. Michael Platt says:

    Kieran Mockford points out that much of this came about in discussions with him.. in fact he claims credit for it!!

  5. Michael Platt says:

    I dont think size matters (!), its more about complexity eg max path length rather than overall size

  6. .. says:

    Easier to maintain, more decoupled, more autonomous.

    Those are all issue of complexity.

  7. .. says:

    But Size does matter, its adding to complexity.

    Lightweight objects are better IMO.

  8. Kieran Mockford says:

    Mike will probably delete these comments.

    In fact.. Mike has it wrong, what the facts really are

    << Contents Deleted by Michael Platt 2/17/2004 5:16 AM >>

  9. Michael Platt says:

    Agreed, size does increase complexity but it’s a second order effect. The information flow measure is all about autonomy and decoupling.

  10. .. says:

    One thing that we dont have today is autonmous (my spelling sucks before 12:00) computing.

    Objects should be self checking and have less dependancy on trust of other objects.

  11. Michael Platt says:

    Thats true which is why I like message passing, it forces autonomy.

    Autonomous computing is different.. more like the semantic web (which I have problems with)

  12. .. says:

    Sure it only adds complexity to an actual object rather than the links, those links would remain the same, well maybe not but usually they would, right?

  13. Michael Platt says:

    Normally they would. Switching is a whole new ballgame

  14. .. says:

    What if the problem domain is very linked in a complex manner.

    Does the object model map onto the problem domain naturally is a better indicator but how do you measure this.

  15. Michael Platt says:

    Thats where the information flow measure comes in. There are a whole load of OO measurements already but I think they are different

  16. .. says:

    And how do you automate that.

    I assume the end game for such analysis would be an automated button you press and up pops a number or percentage for complexity.

  17. Michael Platt says:

    Yes, I’m working on that!

  18. .. says:

    Yeah but the hard part is deciding on a color for that button.

  19. Michael Platt says:


  20. RichB says:

    CSharp Refactory from xtreme simplicity features Cyclomatic Complexity analysis for C# sourcecode.

  21. Michael Platt says:

    Yes, thanks for pointing that out. I am more interested in the information flow measure which is more useful for architectural analysis. Does anyone know of a c~ version. CCCC is yacc driven so I was looking at doing a c# version?

  22. .. says:

    Or get a C++ version and wrap it?