Note that there are some explanatory texts on larger screens.

plurals
  1. POThe Purpose of a Service Layer and ASP.NET MVC 2
    primarykey
    data
    text
    <p>In an effort to understand MVC 2 and attempt to get my company to adopt it as a viable platform for future development, I have been doing a lot of reading lately. Having worked with ASP.NET pretty exclusively for the past few years, I had some catching up to do.</p> <p>Currently, I understand the repository pattern, models, controllers, data annotations, etc. But there is one thing that is keeping me from completely understanding enough to start work on a reference application.</p> <p>The first is the Service Layer Pattern. I have read many blog posts and questions here on Stack Overflow, but I still don't completely understand the purpose of this pattern. I watched the entire video series at MVCCentral on the Golf Tracker Application and also looked at the demo code he posted and it looks to me like the service layer is just another wrapper around the repository pattern that doesn't perform any work at all.</p> <p>I also read this post: <a href="http://www.asp.net/Learn/mvc/tutorial-38-cs.aspx" rel="noreferrer">http://www.asp.net/Learn/mvc/tutorial-38-cs.aspx</a> and it seemed to somewhat answer my question, however, if you are using data annotations to perform your validation, this seems unnecessary.</p> <p>I have looked for demonstrations, posts, etc. but I can't seem to find anything that simply explains the pattern and gives me compelling evidence to use it.</p> <p>Can someone please provide me with a 2nd grade (ok, maybe 5th grade) reason to use this pattern, what I would lose if I don't, and what I gain if I do?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload