Chapter

Why design matters

What software design really means, and why coupling, cohesion and code smells decide whether code is a pleasure or a pain to change.

Design Patterns & Principles 4 Lessons from courses

About this chapter

Before any pattern or principle, you need the ideas they all rest on. In this chapter you'll learn what "design" means beyond code that runs, and the vocabulary - coupling, cohesion, code smells - you'll use for the rest of the course.

Lessons from courses

  1. 1 What is software design? What software design really means: readable code, easy change and low maintenance cost. The difference between code that runs and code you can safely change.
  2. 2 Coupling and cohesion Low coupling and high cohesion are the two lenses for judging any design. See what each means with a small before/after PHP example you can follow.
  3. 3 What are code smells? A code smell is a hint that something may be off in your code, not a rule you broke. What smells are, with named examples like long method and duplicated code.
  4. 4 How to read this course The difference between design principles and design patterns, why the examples are PHP, and why patterns are tools, not goals. Read this before you dive in.
Design Patterns & Principles Go to course