1 / 10

Connections

Connections. Karl Lieberherr. Sources of Information. Textbook: The Pragmatic Programmer (TPP) My book: AP book + lecture notes Java Data Binding Technology Tools we use: DJ, later we use DemeterJ. TPP section: The Evils of Duplication. Tip 11: DRY – Don’t Repeat Yourself

farhani
Download Presentation

Connections

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Connections Karl Lieberherr

  2. Sources of Information • Textbook: The Pragmatic Programmer (TPP) • My book: AP book + lecture notes • Java Data Binding Technology • Tools we use: DJ, later we use DemeterJ

  3. TPP section: The Evils of Duplication • Tip 11: DRY – Don’t Repeat Yourself • Imposed duplication without tool support

  4. Connections • TPP Tip 11: DRY • Don’t duplicate class graph information in programs and in inputs • Programs: traversal strategies • Inputs: parsing • TPP Tip 17: • Program close to problem domain • Use class dictionary describing application objects

  5. Connections • TPP Tip 36: LoD • Minimize coupling between modules: avoid coupling by writing “shy” code • traversal strategies • TPP Tip 20: Keep knowledge in plain text • Java data binding: class dictionary and sentences

  6. TPP section: Decoupling and the Law of Demeter • Write shy code: • A shy person does not interact with too many people. • A shy method does not interact with too many classes/objects.

  7. Connections • TPP Tip 37:"Configure, Don't Integrate“ • We configure programs with class graphs, traversal graphs or object graph slices and we don’t integrate those structures into the program manually.

  8. Connections • TPP Tip 38: "Put Abstractions in Code, Details in Metadata“ • We put abstractions like ClassGraph.traverse(Object, Strategy, Visitor) into code and details like whereToGo into metadata.

  9. TPP: Tip 53: Abstractions Live Longer than Details • Is in the Requirements Pit section • Also applies to code: don’t overspecify!

  10. TPP: Tip 54: Don’t Program by Coincidence • Don’t confuse a happy coicidence with a purposeful plan.

More Related