From the course: Programming Foundations: Design Patterns

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

What are design principles?

What are design principles?

From the course: Programming Foundations: Design Patterns

Start my 1-month free trial

What are design principles?

- [Instructor] Although this course is about design patterns, you'll also find it beneficial to learn a set of object-oriented design principles. These principles go beyond the object-oriented basics you already know, like inheritance, polymorphism, abstraction, and encapsulation. And these principles really give you a set of guidelines that will help you to avoid bad object-oriented design. These might be designs that are too rigid, inflexible, too fragile, too hard to understand. You might be saying to yourself that sounds a lot like a design pattern, and they do share a common goal, good object-oriented design. But principles and patterns are different. Principles are general guidelines while patterns are specific design solutions often aimed at solving common object-oriented problems. As we see more of each, you'll start to understand the difference. Let's look at one example of an important principle we'll be touching on throughout the course, encapsulate what varies. This…

Contents