質問

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