Test your technical skills online, appear in Virtual Interview and be ready for job!
Twitter Twitter LinkedIn YouTube Google
Be Interview ready ! | Search
Make friends on DotNetFunda.com and expand your network!
Winners

Win Prizes

Announcements
Like us on Facebook
Sponsor
Top Articles Author
Wed, 23-Apr-2014 Authors
Goud.Kv
200
All Time Authors
Rajkatie
20480
Vishal@Neeraj
19600
Bharathi Cherukuri
18040

Latest members | More ...


(Statistics delayed by 5 minutes)

What is SRP?

 Posted by SheoNarayan on 11/11/2008 | Category: Pattern and Practices Interview questions | Views: 6818
Answer:

SRP stands for Single Responsibility Principle. This states that a class should have only one reason to change. If a class is doing too much (i.e. hitting the DB, writing files, doing business logic, calling a web service, etc, it’s violating SRP. It will be very difficult to change later should we need to change it, and it will likely be prone to have more defects.

SRP applies to the methods or in a class also. The two are inseparable. A class, or object, is the combination of its data and its behavior.

For more details read this document: Single Responsibility Principle
http://www.objectmentor.com/resources/articles/srp.pdf

Source: With input from Chad Myers


Asked In: Many Interviews | Alert Moderator 

Found interesting? Add this to:




Comments or Responses

Login to post response.

Comments / Responses
Select text & click toolbar to format. Formatting appears in viewmode only. HTML Tags are not allowed.
Bold Italic Underline Paragraph Title Code  Link 
 Wait ... Processing ..... please wait.