TechNet
Products
IT Resources
Downloads
Training
Support
Products
Windows
Windows Server
System Center
Microsoft Edge
Office
Office 365
Exchange Server
SQL Server
SharePoint Products
Skype for Business
See all products »
Resources
Channel 9 Video
Evaluation Center
Learning Resources
Microsoft Tech Companion App
Microsoft Technical Communities
Microsoft Virtual Academy
Script Center
Server and Tools Blogs
TechNet Blogs
TechNet Flash Newsletter
TechNet Gallery
TechNet Library
TechNet Magazine
TechNet Wiki
Windows Sysinternals
Virtual Labs
Solutions
Networking
Cloud and Datacenter
Security
Virtualization
Updates
Service Packs
Security Bulletins
Windows Update
Trials
Windows Server 2016
System Center 2016
Windows 10 Enterprise
SQL Server 2016
See all trials »
Related Sites
Microsoft Download Center
Microsoft Evaluation Center
Drivers
Windows Sysinternals
TechNet Gallery
Training
Expert-led, virtual classes
Training Catalog
Class Locator
Microsoft Virtual Academy
Free Windows Server 2012 courses
Free Windows 8 courses
SQL Server training
Microsoft Official Courses On-Demand
Certifications
Certification overview
Special offers
MCSE Cloud Platform and Infrastructure
MCSE: Mobility
MCSE: Data Management and Analytics
MCSE Productivity
Other resources
Microsoft Events
Exam Replay
Born To Learn blog
Find technical communities in your area
Azure training
Official Practice Tests
Support options
For business
For developers
For IT professionals
For technical support
Support offerings
More support
Microsoft Premier Online
TechNet Forums
MSDN Forums
Security Bulletins & Advisories
Not an IT pro?
Microsoft Customer Support
Microsoft Community Forums
Sign in
Home
Library
Wiki
Learn
Gallery
Downloads
Support
Forums
Blogs
Resources For IT Professionals
United States (English)
Россия (Pусский)
中国(简体中文)
Brasil (Português)
Skip to locale bar
Post an article
Translate this page
Powered by
Microsoft® Translator
Wikis - Page Details
First published by
Abhishek.Sur
When:
22 Jun 2013 3:43 AM
Last revision by
Benoit Jester [MVP]
(MVP, Microsoft Community Contributor)
When:
11 Nov 2013 1:56 AM
Revisions:
11
Comments:
2
Options
Subscribe to Article (RSS)
Share this
Engage!
Wiki Ninjas Blog
(
Announcements
)
Wiki Ninjas on Twitter
TechNet Wiki Discussion Forum
Can You Improve This Article?
Positively!
Click Sign In to add the tip, solution, correction or comment that will help other users.
Report inappropriate content using
these instructions
.
Wiki
>
TechNet Articles
>
Software Design Principles
Software Design Principles
Article
History
Software Design Principles
Table of Contents
Introduction
Some characteristics of bad design
SOLID Principles
Some other Principles
Miscellaneous principles which are worth mentioning
See Also
Introduction
Software design principles are a set of guidelines that helps us to avoid the bad design of a solution. The software designs helps to make a software well designed, well read and best maintainable.
The design principles are associated to Robert Martin who gathered all the design principles in his book "
Agile Software Development: Principles, patterns and practices
".
Some characteristics of bad design
1.
Rigidity
- It implies that it is very hard to change anything in the code as every change affects too many other parts of the system. In the beginning of the simple change, it might seem that it might take a small time to change the logic, but with a rigid software model, the cascading changes on dependent modules takes engineers a hell lot of time that grows subsequently giving lot of grief to the developers. This is the type of development where manager fears to make any changes to the project.
2.
Fragility
- It implies, making a change is too risky. When some changes are made, it makes other part of the system break. Often the breakage occurs in areas where there is no conceptual relationship with the area that has been changed. As fragility becomes worse over time, managers decide not to make any changes to the project and declare the project as unmaintainable.
3.
Immobility
- It makes an application hard to mobile. That means, when building another application, it is very hard to reuse the same code in another application because it cannot be disentangled from the current application that easy. There could be also an element of risk involved while separating the desirable part of the software.
4.
Viscosity
: Viscosity in an application comes in two ways. One is viscosity in design and viscosity in environment. Viscosity in design comes when a developer finds more than one way to make changes to the application and the way to face the change is harder to preserve the design. In other words, say a developer need a certain change in the application and he finds the hack to the application which can fix the problem is much easier than that of the one which preserve the design of the application in which it is build in, is said to viscous. Viscosity in environment is when the environment is not suitable in preserving the existing design of the application. For instance, say certain changes in files makes it pretty long time to compile etc.
These four symptoms are signs of poor architecture. To avoid such symptoms in an application, it is recommended to employ certain design principles.
SOLID Principles
SOLID principles are set of rules first introduced by Michael Feathers for the "First five principles" which later identified by Robert C Martin in early 2000s. These stands out as the acronym for the five basic principles of Object oriented programming and design. The principles ensures that when it is correctly maintained over time, the programmer have to face lesser amount of problems while maintaining the application and the program itself will remain capable of extension. The Solid principles intend to remove code smells causing the programmer to refactor their code and make it well maintainable and extendable. The SOLID principles are mostly applied in Test Driven development and the overall strategy is adaptive programming.
The Acronym SOLID is taken from the first letter of these five principles.
1.
Single Responsibility Principle
2.
Open Close Principle
3.
Liskov's Substitution Principle
4.
Interface Segregation Principle
5.
Dependency Inversion Principle
These 5 principles are sometimes combined and regarded as SOLID Principle in object oriented design taking the initials of each of the principles. These makes a mark in Robert Martins categorization on Class Design Principles.
Some other Principles
1.
Package Cohesion Principles
2.
Package Coupling Principles
Software design principles are pretty much a vast topic and any developer starting developing a real world app should consider them before start of the project.
Miscellaneous principles which are worth mentioning
Program to Interface Not Implementation.
Don't Repeat Yourself.
Encapsulate What Varies.
Depend on Abstractions, Not Concrete classes.
Least Knowledge Principle.
Favor Composition over Inheritance.
Hollywood Principle.
Apply Design Pattern wherever possible.
Strive for Loosely Coupled System.
Keep it Simple and Sweet / Stupid.
The principles are self explanatory.
See Also
Software Patterns and Practices
Design Patterns