4

Composite as Universal Abstraction

 2 years ago
source link: https://cleancoders.com/episode/humane-code-real-episode-2
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Composite as Universal Abstraction

Humane Code, Episode 2

Mark Seemann
37 minutes • 0.12GB • Oct 2017

How do you make code readable? How do you make code fit in your head? How do you create good abstractions? How do you amplify the essentials while eliminating the irrelevant?

One useful tool is to employ the Composite design pattern, but when can you apply it? When are objects composable?

There’s a simple answer to that question. In this episode, you’ll learn to tell at a glance whether an interface is composable or not. This will also set you on the path of being able to deliberately design APIs in such a way that they’re composable—that is, so that they are intuitively understandable abstractions.

Composite is a universal abstraction. It’s not tied to a particular programming language or specific development paradigm. Under a different name, it exists independently of software development. This makes it a powerful abstraction.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK