The World’s Leading Microsoft .NET Magazine
   
 
timstall

Donate Today!

Search Box

 

Calendar

««May 2008»»
SMTWTFS
     123
45678910
11
12
13
14
15
1617
18192021222324
25262728293031

My Top Tags

                                       

Mailing List

My RSS Feeds








Architecture: Keeping it non-exponential

posted Friday, 14 December 2007

Systems have a tendency to get more disordered. Architecturally, it's easy to always take shortcuts such that your application code becomes one big mess of tightly coupled objects and duplicated code. It starts innocent enough -you have only a few initial components, and each one has a dependency on the others. So that's still only a few dependencies.

But then, a few emergencies later (and what isn't an emergency?), your code has ballooned, and the dependencies have exponentially exploded into a mess. The project has accrued so much technical debt that the schedule is hopeless, and it's no longer fun. Every object is intertwined with every other object:

A much more sustainable model is to demand cleaner code at each step of the way, and end up with something maintainable, which the number of dependencies increases linearly with the number of new components. This lets you add, remove, and modify the code much more easily:

I see this as one of the basic issues of architecture: keeping the ever-growing code base in a maintainable state. In application development, this often boils down to conscious decisions where everyone "knows" the right way, but instead write sloppy code for <insert excuse here> ("we don't have time", "we'll fix it later", "this one won't hurt", "it works", "the maintenance team will fix it", etc...). Often, it seems like the team just needs a strong and credible voice to encourage everyone to do the right thing. Especially for long-term, enterprise projects, this seems like the optimal way to go. It sure beats having 12 months of garbled code.

tags:  

links: digg this    technorati    




1. Steve Campbell left...
Monday, 17 December 2007 3:19 pm :: http://blog.perfectapi.com

Coupling. We know we should minimize it, but how? It is not enough to just strongly encourage not doing it. We need to make the architecture of the system encourage ways of working that resist coupling.

My own best answer? Plugins - partition a system into modules (that perform functions for users) and services (that perform functions for the modules).