Professional Documents
Culture Documents
• Patterns
• Practices
Core Principles
• Don’t Repeat Yourself
• Single Responsibility Principle
• Open / Closed Principle
• Liskov Substitution Principle
• Interface Segregation Principle
• Dependency Inversion Principle
Don’t Don’t Repeat Repeat
• Duplication in logic calls for abstraction.
Closed to Modification
Changes to source or binary code are not required
Dr. Bertrand Meyer originated the OCP term in his 1988 book,
Object Oriented Software Construction
Liskov Substitution Principle
The Liskov Substitution Principle states that
Subtypes must be substitutable for their base
types.
Agile Principles, Patterns, and Practices in C#
Corollary:
Prefer small, cohesive interfaces to “fat” interfaces
Dependency Inversion Principle
• Depend on Abstractions
– Interfaces, not concrete types
State State
State
DEMO
Summary
• Download Slides http://SteveSmithBlog.com
• In Depth Training:
– PluralSight On Demand, Principles of Object Oriented Design
http://www.pluralsight-training.net/microsoft/olt/subscriptions.aspx
– NimblePros
Software Development, Mentoring, Application Development
http://NimblePros.com/
• Recommended Reading
– Clean Code by Robert C. Martin http://amzn.to/Clean-Code
– Agile Principles, Patterns, and Practices by Robert C. Martin and Micah Martin
http://amzn.to/agilepppcsharp/
• Image Credits
http://www.lostechies.com/blogs/derickbailey/archive/2009/02/11/solid-development-pr
inciples-in-motivational-pictures.aspx
Register for DevReach 2010
• 18-19 Oct, Sofia, Bulgaria
– 5 tracks
– about 60 unique sessions
– more than 30 rockstar speakers
• 20% Early Bird until 15 Sept (XBOX 360 raffle)
• Special discounts for User Group members
• Twitter: #devreach
• Facebook: www.facebook.com/DevReach