Difference between Concern and Responsibility ( ie difference between SRP and SoC )?


HOME ยป Web Design


SRP - each class should have just one responsibility ( ie reason to change)
Separation of Concerns is the process of breaking a computer program into distinct features that overlap in functionality as little
as possible. A concern is any piece of interest or focus in a program.
(Concern == feature of system. )


a) To my understanding the only difference between the two is that SRP tries to separate responsibilities into different classes and SoC tries to separate concerns into different modules?!


b) If assumption under a) is correct, what is the difference between a concern and a responsibility ( besi


Related to : Difference between Concern and Responsibility ( ie difference between SRP and SoC )?
Maintaining Single Responsibility Principle (SRP) with UIViewControllers
Web Design

Sticking to Apple's guidelines, I create one subclass of UIViewController per screen of my iPhone application. However I consistently find that these classes become very large, both in terms of sheer lines of code and number of member variables.


By definition they end up being responsible for quite a number of different concerns (e.g. view life cycle, mediating between views and models, sometimes touch handling, control logic, managing alerts and other UI state).


Not only does this violate the Single Responsibility Principle but it also results in large swathes of code which are near impossible to unit test.


What responsibilitie

Does the SRP suggest that an MVP Presenter should only have one responsibility?
Web Design

I have two features: one that presents the details of a single entity (EntityX) and one that allows the user to view a list of all EntityXs.


Using MVP, is it better to have an EntityXController with two methods (View and List, for example) that use the appropriate View and List views, or should I comply with my interpretation of the SRP and create an EntityXListController and an EntityXViewController to narrow the responsibilities of each?


Are utility classes allowed with the Single Responsibility Principle (SRP)
Web Design

I just answered a question related to SRP which made me think: How does SRP stand on utility classes?


By definition utility classes tend to do a lot of things. I can see how gatering related utilities at a single accesspoint is usefull. By SRP standards you cannot implement the utilities in one class. Does that mean that a utility class is a no-no, or does SRP allow it if it is only a facade for multiple classes, each of them adhering to SRP?


Difference between Concern and Responsibility ( ie difference between SRP and SoC )?
Web Design

SRP - each class should have just one responsibility ( ie reason to change)
Separation of Concerns is the process of breaking a computer program into distinct features that overlap in functionality as little
as possible. A concern is any piece of interest or focus in a program.
(Concern == feature of system. )


a) To my understanding the only difference between the two is that SRP tries to separate responsibilities into different classes and SoC tries to separate concerns into different modules?!


b) If assumption under a) is correct, what is the difference between a concern and a responsibility ( besi

Difference between Single Responsibility Principle and Separation of Concerns
Web Design

What is the difference between Single Responsibility Principle and Separation of Concerns?


What is the difference between the Chain of Responsibility and Command Design Behavioral Patterns?
Web Design

I have the book Design Patterns, by Grady Booch, but I am confused on the difference between the Chain of Responsibility and Command design patterns? Can anyone offer some clarity?


I am trying to figure out which one to use in a mini server system where you can send a command like LOGIN <user:pass> or ADD_ENTRY <title:description> or so on, and then I thought I could make a thread where I parse any data coming in and then throw it out to some commandHandler or something that would look at the command and the data sent with it, and perform an action on it. It seems like either Chain of Responsibility or Co


Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .