• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Software Design Principles
 

Software Design Principles

on

  • 1,649 views

 

Statistics

Views

Total Views
1,649
Views on SlideShare
1,649
Embed Views
0

Actions

Likes
2
Downloads
39
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Opening customized for each location

Software Design Principles Software Design Principles Presentation Transcript

  • Software Design Principles Navigator Internal Workshop
  • Old Story Clean Simple Elegant Rigid Fragile Immobile Change with Requirement Out-of-Control Dependencies
  • Solution Software Development = Complexity Management Change with Requirement and Follow Principles OCP LSP DIP ISP Clean Simple Elegant Huge but still Clean Simple Elegant
  • Open Close Principle (OCP) A module should be Open for Extension but Close for Modification Solution: Polymorphism
  • Liskov Substitution Principle (LSP) Subclasses should be Substitutable for their Base Classes
  • Liskov Substitution Principle (LSP) Root Cause: Is-A Fails
    • Solution: Design by Contract
    • Method pre-condition in subclass shouldn’t be stronger than in base class
    • Method post-condition in subclass shouldn’t be weaker than in base class
  • Dependency Inversion Principle (DIP) Depend upon Abstractions. Don't depend upon Concretions. The Last Mile: Where to instantiate the concrete class?
  • Interface Segregation Principle (ISP) Many client specific interfaces are better than one general purpose interface
  • Summary
    • Less
      • Responsibilities in a Interface/Class
      • Dependencies on Outside Classes
    • More
      • Abstraction to act as Dependency Firewall
      • Small Single-Responsibility Class to Encapsulate Change
    Manage Complexity = Manage Dependencies Clean Simple Elegant Clean Simple Elegant Clean Simple Elegant Clean Simple Elegant Clean Simple Elegant
  • More Principles
    • Package Cohesion Principles
      • REP: Release Reuse Equivalency Principle
      • CCP: Common Closure Principle
      • CRP: Common Reuse Principle
    • Package Coupling Principles
      • ACP: Acyclic Dependencies Principle
      • SDP: Stable Dependencies Principle
      • SAP: Stable Abstractions Principle
  • Thank you