Skip to Main Content
Simple Object-Oriented Design
book

Simple Object-Oriented Design

by Mauricio Aniche
May 2024
Intermediate to advanced content levelIntermediate to advanced
192 pages
4h 26m
English
Manning Publications
Content preview from Simple Object-Oriented Design

5 Designing good abstractions

This chapter covers

  • Understanding abstractions
  • Adding abstractions in code
  • Keeping abstractions simple

Good abstractions allow us to add new functionality to a system without constantly changing existing code. For example, think of a bookstore with a range of discounts like “Buy three books, get one free,” “45% off during Christmas,” and “Buy five e-books, get one printed copy free.” The marketing team proposes new discounts regularly, so the development team needs an easy way to add them to the code. A well-designed software system will have abstractions in place so developers can add new discounts with minimal effort.

It’s difficult to define what abstractions are in one sentence, so I’ll use a few:

  • They describe ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Object Design Style Guide

Object Design Style Guide

Matthias Noback
Design It!

Design It!

Michael Keeling

Publisher Resources

ISBN: 9781633437999Publisher SupportOtherPublisher WebsitePurchase Link