edytawrobel / makers

0 stars 0 forks source link

OOD Ruby inspired by Sandi Metz #6

Open edytawrobel opened 7 years ago

edytawrobel commented 7 years ago
  1. Design Principles
  2. Design Patterns
  3. Object-Oriented Programming
edytawrobel commented 7 years ago

Design Principles

SOLID - Michael Feathers, Robert Martin

  1. Single Responsibility
  2. Open-closed
  3. Liskov Substitution
  4. Interface Integration
  5. Dependency Inversion

DRY - Do Not Repeat Yourself, Hunt, Thomas

LoD - Law of Demeter

Arrange the code you have, so it is easy to change

edytawrobel commented 7 years ago

Design Patterns

Gang of Four (GoF)

simple and elegant solutions to specific problems in object-oriented software design. By using it, you make your own design more FLEXIBLE, MODULAR, REUSABLE, UNDERSTANDABLE"

edytawrobel commented 7 years ago

OOP

OOP applications are made up of objects and the messages that pass between them OO Languages, class based, combine data and behaviours into a single thing, object Objects have behaviour and may contain data to which they alone control access Objects invoke one another's behaviour by sending each other messages Every object decides for itself how much of its data to expose

Class-based OO languages allow to define a class that provides a blueprint for the construction of similar objects. A class defines methods (definitions of behaviour) and attributes (definitions of variables). Methods get invoked in response to messages.