#09 Emergent design

Software economics book resources

Sorry for the mess! This version is just a first draft ;-)

Términos a googlear

abstraction, composition, polymorphism, bounded contexts, level of abstraction, indirection without abstraction, leaky abstraction, the four rules of simple design



Topics related to dependency management:

  • context Boundaries
  • declarative style
  • Law of Demeter
  • local retention / Encapsulation
  • anemic model
  • vertical & horizontal mental model
  • test harness and test doubles
  • mikado method
  • inversion of Control
  • dependency injection by constructor
  • injection Container /Service Locator
  • getters and setters are evil
  • modularity
  • hexagonal architecture
  • parallel change refactoring
  • self similarity principle
  • DRY

Responsibility-driven design

¿Responsibility? Nos aleja eso de entender que SRP es "one reason to change, no “responsability”?

  • an application = a set of interacting objects
  • an object = an implementation of one or more roles
  • a role = a set of related responsibilities
  • a responsibility = an obligation to perform a task or know information
  • a collaboration = an interaction of objects or roles (or both)
  • a contract = an agreement outlining the terms of a collaboration
  • stereotype—A conventional, formulaic, and oversimplified conception, opinion, or image

Hot Spots

  • Hot Spots: Hot Spots are points in the application where variations occur. They are recorded using Hot Spot Cards.
  • Hot Spot Cards: Hot Spot Cards are used for recording variations with just enough detail so you can discriminate important difference. Similar to CRC cards, these are also created from index cards

These cards consist of:

  • Hot Spot Name
  • General description of the variation
  • At least two specific examples where the variation occurs

Meter en CRC el estereotipo que cumple tu candidato

Role Stereotypes: Role stereotypes are simplified roles that come with predefined responsibilities.[^[13]^ There are several categories.

  • Controller: Object implementing this role makes decisions and closely directs the action of other objects.^[[13]^

  • Coordinator: This role reacts to events by delegating tasks to others.^[[13]^

  • Information Holder: Information holder knows and provides information.^[[13]^

  • Information Provider: A slight variation of an information holder is the information provider, which takes a more active role in managing and maintaining information. This distinction can be used if a designer needs to get more specific.^[[14]^

  • Interfacer: This role transforms information and requests between distinct parts of an application.[^[13]^ It is further divided into more specific roles.

  • External Interfacer: External interfacer communicates with other applications rather than its own.[^[14]^ It is mainly used for encapsulating non-object-oriented APIs and does not collaborate a lot.^[[15]^

  • Internal Interfacer: Also called intersystem interfacer.[^[14]^ It act as a bridge between object neighborhoods.^[[15]^

  • User Interfacer: User interfacer communicates with users by responding to events generated in the UI and then passing them on to more appropriate objects.^[[14](https://en.wikipedia.org/wiki/Responsibility-driven_design#cite_note-ObjectDesign-page93-14)[[15](https://en.wikipedia.org/wiki/Responsibility-driven_design#cite_note-ObjectDesign-page165-15)[16]^

  • Service Provider: This role performs work and offers computing services.^[[14]^

  • Structurer: This role maintains relationships between objects and information about those relationships.^[[1]^


Emergent Design

The four rules of simple design



Cost of abstraction

Java application architecture pattern catalog