1, single duty principle
Requirements: The object of clear responsibility, an object only do one thing, must focus, the responsibility is too easy to cause changes in many reasons, the program is not stable enough.
2, open closure principle
Requirements: Changes in demand as little as possible to modify the design of the class, but by extension to complete. That is, closed modification, open extension.
3, dependency inversion principle
Requirements: Based on interface programming, high-level module call interface, the bottom module to implement interface, to prevent the underlying changes directly affect the upper layer.
The earliest mature applications of IOC,AOP and other technical frameworks are derived from Java Enterprise Development, now. NET domain development is also very rapid, the common framework is as follows:
autofac:http://code.google.com/p/autofac/
Castle Windsor:http://sourceforge.net/projects/castleproject/files/windsor/2.5/castle.windsor.2.5.3.zip/download
unity:http://entlib.codeplex.com/
spring.net:http://www.springframework.net/
structuremap:http://sourceforge.net/projects/structuremap/files/
Ninject:http://ninject.org/download
Using the existing broad application framework above, spring.net originates from Java's Spring, is more complete and powerful, AUTOFAC and Ninject are more clear and friendly, personal recommendation use autofac+ other framework combination.
4, interface Isolation principle
Requirements: Use a dedicated small interface as much as possible, rather than the total interface, to avoid complex interfaces.
5, the Richter replacement principle
Requirements: In the inheritance relationship the subclass can replace the parent class, and the virtual machine dynamically finds the specific subclass object based on the parent class variable, thus implementing polymorphism (that is, late binding in the previous C + + compiler Technology).
Note: The ruler is short, inch; various technologies, frameworks and design methods have their respective times and characteristics, the best is often not the Swiss army knife, to avoid falling into a certain way of thinking immersion and can not be changed.
Basic principles of software object-oriented architecture design