문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top