RE: Returning interfaces from web-services and remoting servers?



Your best bet is probably to have local assemblies that define your
interfaces and interface implementations. The implementations would be
responsible for connecting to the web service to meet the contract for the
interface(s) they implement. The web service is just a way to pass data
around.

You might want to read up on service-oriented architectures before you start
development. There is lots of good info on the subject on the web. Also,
you could check out Rockford Lhotka's CSLA framework for his ideas on how to
properly-wrap data logic. Some links follow:

http://www.lhotka.net/
http://www.terski.com/blog/#aec62f263-9e18-4c9b-817a-199ce369a4d9
--
Ryan Kinderman


"Ben Fidge" wrote:

> Hi
>
> I'm just about to start the design and development of a large in-house
> Content Management System. The system will be ASP.NET based with a Sql Server
> back-end and will be developed be using VS.NET 2003 Ent. architect.
>
> Due to high demand (~10,000 users), and varying network setups across sites
> using the system, I want to deliver an n-tier solution where the data layer
> can be implemented as either a web-service, remoting server or a simple dll
> assembly. Each particular installation will specify in web.config which
> method to employ according ot its own specifics.
>
> In order to provide the desired level of abstraction, and "flatten" the
> three technologies, I'd like to be able to return the data-access classes as
> interfaces to the client. This will simplify client-side development as the
> client code will only need to be aware of the interfaces and not the
> implementations. I plan to have a client-side proxy that is responsible for
> brokering instances of the data access classes.
>
> My questions are:
>
> - Can web-services and remoting servers implement interfaces?
> - Can WebMethods etc return/receive interfaces instead of classes?
> - Is there a better way of doing this?
>
> Any enlightenment most gratefully received,
>
> Ben
.



Relevant Pages

  • RE: Versioning web services
    ... collection of Interfaces or Methods defined in the web service. ... Since the client call to ... tell they are consuming a different service, but not OK for them to have to ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Disadvantages of Dependency Inversion?
    ... It depends on how many implementations and how many clients there ... If there is a single client but multiple implementations, ... so that the client package doesn't depend on the ... As a general rule I'd agree with you that the interfaces should ...
    (comp.object)
  • Re: Disadvantages of Dependency Inversion?
    ... As far as where you put those interfaces... ... It depends on how many implementations and how many clients there ... If there is a single client but multiple implementations, ... so that the client package doesn't depend on the ...
    (comp.object)
  • Re: Java Feature Proposal
    ... > conflict. ... No, there is no naming conflict with Java interfaces, since they contain ... class to inherit multiple conflicting implementations of a method. ... I don't see why multiple inheritance of fields is any more of a problem ...
    (comp.lang.java.programmer)
  • Design question on Interfaces
    ... Does anyone have an example of a standard implementation of interfaces ... implementations for each client. ...
    (comp.lang.java.programmer)