Thursday, July 12, 2007

Attribute Driven Architecture

I think it's an Architect's primary responsibility to come up with the most bizzare and ambiguous terms to define very simple constructs - We somehow have to show that we exist for a reason :). I was recently asked to take a session on Arch. 101 to share the things that we consider before creating architecture. Thus sprung the idea of discussing all the "abilities" and how they act as a conduit to come up with the complete technology roadmap. Here is my perspective on all the design principles that can be followed to promote one ability over another --

Thou shalt not make architecture without having an ability in mind

What are these so-called abilities and how do they come in play while crafting the blueprint of an application?

  • Maintainability
  • Performability(is that even a word?) a.k.a Performance
  • Scalability
  • Reliability
  • Flexibility

By the way, there are plethora of abilities but I will cover the important ones which come in play often enough.

Maintainability -- It is defined as an ability of a system to undergo repair and evolution. Following principles can help one achieve this ability – 

  • Modularization

  • Single Responsibility Principle – One should design classes in such a way that there is only a single focus for change.

  • Open-Closed Principle – One should design frameworks which are open for extension but closed for modification

  • Liskov Substitution Principle – One should design sub-types which are substitutable for their base types.

  • Guidelines for Writing Good and Readable Code -- I'm cognizant that this is really not a design principle but helps tremendously in creating maintainable applications.

Performance – It is defined as the responsiveness of the system. Keeping the following principles in mind can help build a high performance application -- 

  • Caching – One can follow the W3 principle of Caching – What to cache, When to Cache and Where to Cache.

  • Asynchronous Behavior

  • Coarse Grained Interfaces – Chunky interfaces always perform better than the Chatty ones.

  • Data Partitioning

  • Efficient Resource Management

Scalability – It is defined as the ability to maintain performance while system demand increases. Following design principles can help build a scalable application -- 

  • Layering

  • Loose Coupling

  • Data Partitioning

Reliability – It is defined as the ability of the system to keep operating over a period of time. Designing the system while keeping the following things in mind promote reliability –

  • Robustness

  • Clustering

Flexibility – It is defined as the ease with which a system can be modified for use in applications or environments other than those for which it were specifically designed. Following principles promote flexibility of a system -- 

  • Layering

  • Loose Coupling

  • Single Responsibility Principle

  • Open-Closed Principle

  • Code To Interface

  • Interface Segregation Principle

Of course, there are always trade-offs one need to consider when thinking of one ability over another. For example, if one is designing for flexibility that one should be ready to let go of some performance constraints.

ReferencesImplemeting System Quality Attributes by Gabriel Morgan

No comments: