DEV Community

Dibyojyoti Sanyal
Dibyojyoti Sanyal

Posted on • Updated on • Originally published at

What is Object Oriented Design(OOD)? Why use Object Oriented Design(OOD) Principles ?

What is Object Oriented Design(OOD)?

Object Oriented Design teaches us some basic design principles to write high quality Object Oriented programs. The principles are learned from the common mistakes done by developers. The principles are the guidelines for the developers to avoid the same common mistakes.

Object Oriented Design(OOD) Patterns vs Principles

People might have heard about Design patterns and think we are going to talk about design patterns here. Design patterns provide few well known best practices to be used for some well known circumstances/scenarios and tells about how different classes can be written and used together in each scenario.

Object Oriented Design is more about basic principles, building blocks which programmers should keep in mind when they write programs. The Object Oriented Design principles can be applied in each design pattern, and in turn design patterns obeys the OO Design principles. That means they both are complementary and work together to handle different scenarios.

Why use Object Oriented Design Principles?

Any developers who write programs using any object oriented programming language should keep in mind the design principles and examine the code after writing whether the code is aligned with the design principles. The reasons why we should do this is because the code base becomes:

  1. Easy to maintain(maintainability)
  2. Easy to extend(extendibility)
  3. Easy to understand(understandability)
  4. Easy to test(testability)

Please read my blog post to for detail on above four points

Discussion (0)