Monday 1 June 2009

How to Reduce Complexity in Software

Problem:
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.

Solution1:
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.

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

Solution3:
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: