January 2020
Intermediate to advanced
640 pages
16h 56m
English
The single responsibility principle (SRP) was described by Robert Martin [23], a seasoned software engineer who offers, under the nickname of Uncle Bob, advice about best practices for software development. The SRP states the following:
In a nutshell, object implementations should focus on doing one thing well, and in an efficient way. To understand how this principle works, let's examine a piece of code that violates it. In the following imaginary scenario, we are working for the ACME drone company where we are using Go to build a drone-based goods delivery system.
The following code excerpt illustrates one of our initial attempts at ...