Ruoyu111 / WeatherStation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Weather Station

Head First Design Patterns - Chapter 2 - The Observer Pattern

The Observer Pattern defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.

OO Principles

  • Identify the aspects of your application that vary and separate them from what stays the same
    • Encapsulate what varies
  • Favor composition over inheritence (HAS-A can be better than IS-A)
  • Program to interfaces, not implementations
  • Strive for loosely coupled designs between objects that intract

About


Languages

Language:Java 100.0%