Monday, 1 June 2009

How to Reduce Complexity in Software

Complexity is number one enemy in developing a maintainable and extendable system and it's the main concern of architects.

The more complex a system is, the more costly it will be to be maintained or extended.

One of the ways to reduce complexity is to seperate the concerns or partitioning the concerns. You may want to partition your source code into different layers. For instance, typically you partition your application to have database, data access, business logic and UI  layers.

In WCF for example, you partition your service layer to service contracts, message contracts, data contracts, service implementation and transformation layers.

Another way to reduce complexity is to use refactoring techniques such as making methods to do simple and structured activities.

Another approach is to lower the coupling and dependencies between your classes for instance developing to an interface rather than an implementation (concrete class).

No comments: