简体   繁体   中英

web services layer with combination of asp.NET web application

I have Data Tier, Business Tier which contains interfaces for the data tier, and presentation tier of asp.net web application.
I want to add web services (not wcf services!) that will use an interface.
Where should I put the interfaces for the web services?
Where should I put the web services implementation?
How can I combine the web services implementation with the asp.net web application?

Have you tried Web Service Software Factory ( and on MSDN )? You can find guidance and best practices (even for asmx web services)

I like to think of asmx as a technology to expose functionality in your application. I write business services (BS) instead, unit testable, usable by a controller or aspx code-behind in your case or an asmx web service's implementation.

The asmx web service then exposes only the methods of the BS I want, it instantiate a BS and forward the result back to the caller (using its own "data contract" objects).

I would abstract them out and treat them just like data access (so at the same "level" as data access but in their own "slice").

See below for an answer on where to put an email component - which to me is exactly the same (in principle) as what your asking:

Does sending an email belong in the presentation layer or business layer of an application?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM