I need help understanding the Single Responsibility Principle (SRP) in software development. I know that SRP says a class should only change for one reason, but I'm confused about the difference between an "actor" and a "responsibility" in this rule.
Clarification on Single Responsibility Principle: Actor vs. Responsibility
30 Views Asked by Muhammad Nabeel At
1
There are 1 best solutions below
Related Questions in SOLID-PRINCIPLES
- SOLID principles: extract code in superclass
- How to relate canvas drawing objects with canvas controller objects in flutter (in SOLID correspondence)?
- How to Implement Dependency Inversion and Interface Segregation for a Concrete Class that Needs to Be Initiated?
- Liskov Substitution Principle: Confusion about additional Functionalities of sub types
- Is Dependency Inversion Necessary to Ensure Decoupling between Caller and Callee?
- How should i apply SOLID principles for an entity which have two types, one editable and the other uneditable
- Clarification on Single Responsibility Principle: Actor vs. Responsibility
- Where to instantiate my classes and still adhere to SRP
- Applying OOP principles to microservices
- Separating data structures from algorithms in Go
- One DAO per entity vs multiple DAO's per entity
- Breaking up methods leading to more operations
- Entities can move from one use case to another using the controller?
- Does dependency injection make sense for "pass by value" types? Is there a difference in DI for Value Types and Reference Types
- SwiftUI using Enum across module
Related Questions in SINGLE-RESPONSIBILITY-PRINCIPLE
- Clarification on Single Responsibility Principle: Actor vs. Responsibility
- Where to instantiate my classes and still adhere to SRP
- Which is lighter in Flutter: GestureDetector or TextButton?
- Filtering inside a processing method vs. filtering outside
- Responsiveness in different monitors
- Does DI Encourage or Enforce SRP?
- Applying Clean Architecture Principle When Add Dashboard module witch query multiple services from Application Layer
- How to properly build rich domain models
- Do getter and setter methods violate the Single Responsibilty Principle
- Automatic MapStruct conversion within @Repository
- How to generate srp_a for USER_SRP_AUTH flow in cognito (nodejs). Not a single correct way present over entire internet
- Is it possible to avoid using the singleton pattern in my CartManager class for an online shop by using dependency injection?
- In MVVM with Clean Architecture, where is the best place to put the variables that will be used in many places in the project?
- What am I missing in my CRC (Class Responsibility Collaborator) Model?
- Does calling a method of the different class using switch violate Single Responsibility Principle?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Software is changed to satisfy their stakeholders (actors). Different stakeholders (actors) have different roles, resulting in different perspectives on the software, leading to different requests for change, e.g.:
So, "single responsibility" means: A module should be responsible to exactly one stakeholder/actor/role.
For a more detailed discussion on this topic see: https://youtu.be/SUDlJSjh258