Sunday, April 4, 2010

Gateway Model Gt5026e Ethernet Controller Driver

OOD principles - in a nutshell

busy for some time, I am with the principles of object-oriented design (in short, OOD), but so far mainly through books, articles and blogs. Since I'm currently at work designing new software and must realize of course that is the best time to the learned theory into practice implement.

The various principles, I still know by heart, so I list them to me with a brief statement of 1-2 sentences on

  • The Single Responsibility Principle (SRP)
    There should be only one give reason to change a class.

  • The Open-Closed Principle (OCP)
    a software entities (classes, modules, methods, etc.) should be open for extension but closed for modification.

  • The Liskov Substitution Principle (LSP)
    On the location of an object of a class in a program can easily connect and always an object of a class derived from this class as long as only expanded.

  • The Dependency Inversion Principle
  • (DIP)
    abstract entities should not depend on details, but details of the abstraction.

  • The Interface Segregation Principle
  • (ISP)
    classes duress should not depend on methods that are not needed. Interfaces must be tailored to their clients and not in a hierarchy.

  • The Release Reuse Equivalency Principle (REP)
    The granularity of reuse is the granularity of the decoupling.

  • The Common Closure Principle
  • (CCP)
    classes in a component should be closed as a unit against changes of the same type. A change to one component affects only the classes in this component and not other.

  • The Common Reuse Principle
  • (CRP)
    classes in a component can be used together again. If a class is reused in the component that relates to everyone.

  • The Acyclic Dependencies Principle (ADP)
    Within the dependencies of components must be no cycles.

  • The Stable Dependencies Principle
  • (SDP)
    dependencies should follow the direction of the changeability. Components that will change hardly appear at the beginning of the dependencies.

  • The Stable Abstractions Principle (SAP)
    components that are not changed, should be as abstract as possible. Components that will change much over time should, however, be as specific as possible.

This list serves me now as a kind of checklist for the design of software, for implementation or for code review and refactoring.

0 comments:

Post a Comment