Do I need service layers as well?

57 views Asked by At

I have just started learning asp.net webforms mvp and I'm a little confused about whether I need a service layer or if everything that was in the service layer should go into presenters.

1

There are 1 answers

0
Karl Anderson On BEST ANSWER

No, the MVP pattern, or MVC pattern for that matter, is strictly a presentation layer pattern. A true service layer should never exist in the presentation layer.

One of the main reasons for this is that a service layer should be able to support more than one presentation layer. Imagine you wanted to build a WPF front-end for the same data your ASP.NET MVP application is using, then if you had the service layer logic inside of the ASP.NET MVP app, then your WPF application would need to reference the web application.