8 Stratified design: Part 1

 
Image

In this chapter

  • Learn a working definition of software design.
  • Understand stratified design and how it can help your team.
  • Learn how to extract functions to make code cleaner.
  • Discover why building software in layers helps you think better.

We’ve come to the last chapters in part 1, and it’s time to look at the big picture. We’re going to apply a design practice called stratified design. In stratified design, we write functions in terms of functions defined in lower layers. What are layers? And what are they for? Those questions will be answered in this chapter and the next. And with the concepts we learn, we’ll be set up to succeed in part 2.

What is software design?

The programmers at MegaMart realize how important the shopping cart is to their software. But they don’t think it’s implemented very well.

Image

Jenna’s frustration is an important signal that something is wrong. A good design should feel good. It should help your software development efforts all along the development cycle—from ideation, to coding, to testing, to maintenance.

In fact, that sounds like a good working definition of software design as we will treat it in this book.

software design, noun.

using one’s aesthetic sense to guide programming choices to improve the ease of coding, testing, and maintaining software

What is stratified design?

Developing our design sense

Patterns of stratified design

Pattern 1: Straightforward implementations

Three different zoom levels

Extracting the for loop

Pattern 1 Review: Straightforward implementation

Conclusion

Summary

Up next…

sitemap