From the course: Advanced Design Patterns: Design Principles

Design principles and design patterns

- [Instructor] We've talked about design principles and how they extend our core, object-oriented concepts, those concepts of inheritance and polymorphism and abstraction and encapsulation. And we've also talked about how they provide the building blocks for many design patterns. You might be wondering, what's really the difference between design principles and design patterns? After all, they seem to have a very common goal of creating flexible and extensible software that's maintainable. Obviously the two are highly related and they have a similar goal. However, they are different. Design principles are general guidelines, guidelines that you can use with any aspect of your object-oriented design. As you're creating your object-oriented design, use principles to help guide your class structure and the relationships and really to steer you away from rigid, fragile and immobile designs. Design patterns, on the other hand, are aimed at solutions to commonly occurring problems. These are proven solutions, solutions that have been found, over time, to solve those problems, rather than abstract guidelines. Design patterns provide actual designs in the form of class diagrams that can then be adapted to your own specific solution. This course is focused on understanding design principles, before you move on to the Creational Patterns course. In this course, we'll lay the groundwork for how these principles connect to and relate to the core Gang of Four patterns. As you see more examples of both patterns and principles, the distinction will become much clearer to you.

Contents