Share the ideas and thoughts, become united ...

Sunday, May 1, 2011

Desiging your way to Implementation

Many young developer has a liking to solve a problem brute forcibly rather than solving it elegantly. From SDLC we know that Designing a system takes much time rather than implementing the system. Yet many developer just jumped into implementing the solution without designing the whole system in first place. Many developer design and develop at the same time without knowing the upcoming risks they may incur. A bad designed solution will not stay in the long run.




The brute force approach has a benefit. If a problem is small and does not required to be maintained in future then brute force approach save time. But whenever it is a long term project then the fruit of a good design starts to come. Good designed solutions always have a room for future improvement. The maintainability is one of the major benefits.

Though I am a very new developer but I have worked with some excellent senior people in my company. And I learned from them & also by participating in design phase of some solutions. Today I am gonna share my experience & thought on design with you -

1. Decoupled modules: While designing a solution always try to decouple the modules. decoupled modules can work independently. Which enables the developer to modify the specific module without worrying about the whole system. If someone to change an implementation within a module, he/she doesn't have to concern about the interactions with other modules.

2. Minimize the expose of Class implementation: Try to minimize the details of the class implementation. Because if you use too much implementation details of a class then changing the class will seriously increase development time. Say In one class A, we are using B's x property which is a integer type. Now for some requirement we need to change the property type from integer to char. In this scenario, if we previously used that statement 1000 times then we have to change the code manually in 1000 places.

3. Revise & Revise: Over and over revise your design to check if there is room for improvement and try to clear out the design flaws. The sooner you can cancel out the bugs the better and extensible solution you will make.

4. Do not think about implementation details when design, think about the requirement and solution: Well I think this is a common mistake we made while designing. Implementation depends on design. But while designing you should never think about implementation details. You should think about the requirement & solution while designing because you are trying to make the solution a better one not the implementation of a certain solution better.

5. Trade & Decisions: Design is somewhat making trades and decision. Choosing the better decision is a matter of requirement & situation. But never rule out a decision as bad because what is a bad decision in one context will be the best in another context. Choosing wisely the trade-offs will surely prove to be useful later.

I think that's about it. I am not in a position to defend that my concept about the design is totally right. But it is what I have learned from my seniors. If you think some of them are wrong, please feel free to comment. Because through decision may be I can improve my concept of designing.

Happy designing.

No comments:

Post a Comment