Skip to Content
Clean Architecture: A Craftsman's Guide to Software Structure and Design
book

Clean Architecture: A Craftsman's Guide to Software Structure and Design

by Robert C. Martin
September 2017
Intermediate to advanced
432 pages
8h 20m
English
Pearson
Content preview from Clean Architecture: A Craftsman's Guide to Software Structure and Design

7SRP: THE SINGLE RESPONSIBILITY PRINCIPLE

Image

Of all the SOLID principles, the Single Responsibility Principle (SRP) might be the least well understood. That’s likely because it has a particularly inappropriate name. It is too easy for programmers to hear the name and then assume that it means that every module should do just one thing.

Make no mistake, there is a principle like that. A function should do one, and only one, thing. We use that principle when we are refactoring large functions into smaller functions; we use it at the lowest levels. But it is not one of the SOLID principles—it is not the SRP.

Historically, the SRP has been described ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Software Architecture Patterns, 2nd Edition

Software Architecture Patterns, 2nd Edition

Mark Richards
Head First Software Architecture

Head First Software Architecture

Raju Gandhi, Mark Richards, Neal Ford
Design Patterns: Elements of Reusable Object-Oriented Software

Design Patterns: Elements of Reusable Object-Oriented Software

Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides

Publisher Resources

ISBN: 9780134494272