Introduction to SOLID Principles of Class Design

Introduction to SOLID Principles of Class Design

As professional programmers we should follow several design principles when we are engaging with creation of new classes. We can use design principles to use the full power of object oriented programming to gain flexibility, extensibility and scalability of the software. These were the “first five principles” of object oriented design presented by Robert C. Martin. These design principles are usually called as SOLID principles. This is an acronym introduced by Michael Feathers which is built with the first letters of each principle. There are five design principles.

  • S: Single Responsibility Principle(SRP)
  • O: Open-Closed Principle(OCP)
  • L: Liskov Substitution Principle(LSP)
  • I: Interface Segregation Principle(ISP)
  • D: Dependency Inversion Principle(DIP)

Following these principles of class design helps the programmer to use the object oriented features in an efficient way. We can achieve a better class design with reusability, flexibility, scalability and maintainability from these SOLID principles together. These principles are also part of an overall strategy of agile and adaptive software development. Each design principle has to evaluate individually in future posts. Stay tuned with us.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s