Dictionary entry
SRP
Last updated
Meanings
nounsingularcomputingtechnical
A design rule that says a class or module should have only one reason to change.
Grammar: Usually used with the: the SRP. It names a principle, so it is not plural.
Patterns
- follow the SRP
- violate the SRP
- apply the SRP
The SRP says each class should do one job well.
Our code review checks whether the SRP is respected.
Splitting the class helped us follow the SRP.
nounsingularbusiness
The price a manufacturer suggests that shops charge customers for a product.
Grammar: Often used before another noun: SRP price. In British English, RRP is more common.
Patterns
- the SRP of something
- below SRP
- SRP price
The phone's SRP is $699, but stores often discount it.
They sold the laptop below SRP to attract buyers.
Check the SRP before you compare online prices.
Common combinations
- follow the SRP
- Good designers follow the SRP when they split classes.
- violate the SRP
- A class that saves data and prints reports violates the SRP.
- below SRP
- The tablet was sold below SRP during the sale.
- SRP price
- The SRP price is printed on the box.
Synonyms and how they differ
- single responsibility principle
- The full phrase; use it in formal writing or when readers may not know the abbreviation.
- suggested retail price
- The full phrase for the business sense; clearer in consumer documents.
- list price
- A similar business term, but it is the published price, not necessarily a suggestion.
- RRP
- British 'recommended retail price'; the same idea as SRP but more common in the UK.
Commonly confused: SRP or RRP? SRP or SOLID?
SRP vs RRP
British equivalent of SRP in the pricing sense; do not use SRP in UK retail writing if your audience expects RRP.
SRP vs SOLID
A set of five design principles; the SRP is only the first letter, so do not treat them as the same thing.
Practice
A software team says their new class 'violates the SRP'. What do they mean?
Choose one answer.
The SRP is the single responsibility principle, so violating it means the class does more than one job. The other options describe different problems not covered by this principle.
Make it your own
Write a sentence using “SRP”, then check it and compare it with the examples above.