Difference between revisions of "Single responsibility principle"
From Wiki @ Karl Jones dot com
Karl Jones (Talk | contribs) (Created page with "In software engineering, the '''single responsibility principle''' states that every module or class should have responsibility over a single part of the functionality pro...") |
(No difference)
|
Latest revision as of 09:20, 24 August 2016
In software engineering, the single responsibility principle states that every module or class should have responsibility over a single part of the functionality provided by the software, and that responsibility should be entirely [[Information hiding|encapsulated] by the class.
All its services should be narrowly aligned with that responsibility. Robert C. Martin expresses the principle as follows:[1] “ A class should have only one reason to change. ”
See also
- Chain-of-responsibility pattern
- Cohesion (computer science)
- GRASP (object-oriented design)
- Open/closed principle
- Separation of concerns
- SOLID - the "S" in "SOLID" stands for the single responsibility principle
External links
- Single responsibility principle @ Wikipedia