sexta-feira, 14 de agosto de 2009

Intro to OO Modeling and Design

Speaker: Brian Kotek

What is Good Design:
  • Elegant
  • Simple
  • Robust
  • Flexible
  • Appropriate
Design == Trade offs

Its all about Art and Science

Where To Start???
  • Requirements and Use Cases
  • Identify Nouns and Verbs: Nouns(Costumer) Verbs (LogIn)
Commonality and Variability
Wine, Restaurants, Regions

Design Principles
  • Single Responsibility Principle (Do one thing, but do it well)
  • Dry (Dont repeat your self)
  • Open / Closed (open for extension but closed for modification)
  • Tell, Dont Ask
  • Law of Demeter (employee.pay())
  • Design to Interfaces
  • Encapsulation (Do in cfc), data, type, reveal by need
Indicator of Design Quality
  • Loose Coupling / Connascence (Objects should not depends on a lot of other objects, keep dependencies small)
  • Interface Coupling (user.addUser() )
  • Inheritance Coupling (price = super.price * discount)
  • Cohesion
  • Class Reference Set (You have to know how many objects depends of that specific object)
  • Testability
Theory Meets Real Life
  • Is there Such a Thing? Very Difficult
Olhar os softwares de XML, OO e outros da Altova INC

www.briankotek.com/blog
www.alagad.com
Search for Calisthenics (Parece ser bom)

Nenhum comentário:

Postar um comentário