Skip to main content

Posts

Showing posts from 2011

Common Design Principles

There are number of common design principles that, like design patterns, best practice over the years to build maintainable software. I'm up to describe some widely used design principles though out the post. Following common principle are extracted by the same book that I mentioned before ( Professional ASP.Net Design Patterns - Scott Millet ). Principles are as follows: Keep It Simple Stupid (KISS) One common issue in software programming is over-complicating a solution. So main concern of this principle is keep the code simple but not simplistic. Eventually this will avoid unnecessary complexities. Don't Repeat yourself (DRY) Main concern of this principle is to avoid the repetition. In other words this is all about abstracting out the common functionalities into a single place. Ex: If there is a price calculation method in a system. It should lay in a single place there. Tell Don't Ask The Tell, Don’t Ask principle is closely aligned with encapsulation and the assignin

S.O.L.I.D Design Principles

Hold on!!! Before this please read the common design principle post. After a long time thought of writing a post. Actually these days I'm reading a book which is written by Scott Millet and the name of the book is "Professional ASP.Net Design Patterns". I can guarantee that this book give you a great knowledge on design stuffs. Most of us are bit lazy to read things, so I thought of posting the things that I got form it. This is like the cream of what I got. I'll start it with the S.O.L.I.D design principles: The term S.O.L.I.D. comes from the initial letter of each of the five principles that were collected in the book Agile Principles, Patterns, and Practices in C# by Robert C. Martin, or Uncle Bob to his friends. Simply this is a collection of best practices for object-oriented design. Following will explain all the principles: Single Responsibility Principle (SRP) This principle is closely aligned with a common design principle called Separation of Concerns. It