Single Responsibility Principle – and why it matters

coding wallpaper
image found from reddit
  • Facebook
  • LinkedIn
  • Twitter

This image is a perfect example why we need to adhere to SRP (Single Responsibility Principle).

Imagine how terrible would it be to have your elevator disabled due to a light switch that has tight coupling to the main functions of the elevator.

Examples like this are easy to understand because you know what exactly a lightbulb,what exactly an eleveator is and their differences/boundaries but when it comes to coding information systems (like a procurement system and a disbursement system) things get muddy because we dont know what they are, how they work and what their differences/boundaries are. Information Systems are often abstract to programmers until they spend long enough time in the domain.

My advice to circumvent that is to read business books and work closely with business people until you understand how the yout system works.

..to be continued

Other Sources you can read

Leave a Reply

Your email address will not be published. Required fields are marked *