It is important to make software system as simple as possible, Single repsonsible principle provide us a method to seperate component inside Software, And system become more clean, more readable, easier to maintenance
3. WHAT
Software entities to have a single-minded quality, in
other words, to have a single purpose or reason for
existing
Alan Shalloway
A class should have only one reason to change.
Robert Martin
4. WHAT(CONST)
SRP is the way we organize property and method
to fulfill specific responsible
5. WHY
Easy to change code
Easy to adapt to requirement change
Easy to find bug
Easy to understand code
Help program faster
Easy life
9. HOW ( EXAMPLE )
The program is told which movies a customer
rented and for how long. It then calculates the
charges, which depend on how long the movie is
rented, and identifies the type movie. There are
three kinds of movies: regular, children's, and new
releases. In addition to calculating charges, the
statement also computes frequent renter points,
which vary depending on whether the film is a new
release.
12. WHEN
The Rule of Three
The first time you do something, you just do it.
The second time you do something similar, you
wince at the duplication, but you do the duplicate
thing anyway.
The third time you do something similar, you
refactor
15. WHAT IS IT MEAN?
Don’t wait to deadline
Preparing your tomb
16. HOW TO TELL YOUR MANAGER
Your manager is technical savvy – He knows
If he is Quality or Schedule savvy – Don’t tell
Surely, Refactoring reduce bug( improve quality ) and
also help us faster ( ahead schedule )
Editor's Notes
Let’s take classes, for instance. A class should be defined by its responsibility,
and there should be only one general responsibility per class.
Within a class are methods, state, and relationships to other objects that
enable the class to fulfil its responsibility. Class cohesion is strong when
all the internal aspects of a class relate to each other within the context
of the class’s single responsibility.