Returning interfaces from web-services and remoting servers?

Ask a Question related to ASP.NET Web Services, Design and Development.

  1. #1

    Default Returning interfaces from web-services and remoting servers?

    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
    Ben Fidge Guest

  2. Similar Questions and Discussions

    1. Secure Flash Remoting from main.asc not returning aresult
      Hi, Iv got a problem here that could be Flash Remoting or Flash Media Server related I have created an application that uses flash media server...
    2. Interfaces And Web Services
      Hi, Im having a little trouble with the fiollowing in a web service Public Interface IBookAttribute Property Description() As String End...
    3. Interfaces and web services in .Net.
      Can I specify a custom Interface as the return type for a web service in ..Net? I can see that you can't define ICollection as the return type...
    4. What should I use: Remoting or Web Services ?
      When should I use Remoting When should I use Web Services What is better ?
    5. Web Services and interfaces
      Hi! I wrote a simple web service that has four web methods in it. This web service is designed to run on four different machines. There is a...
  3. #2

    Default Re: Returning interfaces from web-services and remoting servers?

    > 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?
    >
    Hi Ben

    You should definately read the following article. I guess it would
    answer at least the first two questions.

    I would go the interface way, too, because you can have several
    providers (implementations) of the same interface. One could make a
    mechanism to switch between implementations...but the the interface (for
    the client) will remain the same.
    Basically. The OO paragidm "Program to an interface, not an
    implementation" still goes in the WS world.

    Here's the link (watch for linebreaks)

    [url]http://www.topxml.com/reblogger/xml_news/4793_Interface_Based_Service_Contracts_in_the_NET_ Framework_2_0.asp[/url]


    Regards

    Henrik
    [url]http://websolver.blogspot.com[/url]
    Henrik Gøttig Guest

  4. #3

    Default Re: Returning interfaces from web-services and remoting servers?

    Henrik,

    A very fascinating article, and is definitely what I need for the
    web-service scenario. Unfortunately, I'm not going to be able to use .NET 2.0
    for this project. It's to be written entirely in VS.NET 2003 and .NET 1.1.

    Still, the ideas presented in that article are food for thought. I think
    what I'll do is expose the VS.NET generated client side stubbs using shims
    that implement my interfaces in a kind of go-between assembly, so the client
    benefits from the desired transparency. The interfaces will be defined in a
    lightweight assembly that resides on both sides of the divide.

    Thanks

    Ben


    "Henrik Gøttig" wrote:
    > > 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?
    > >
    >
    > Hi Ben
    >
    > You should definately read the following article. I guess it would
    > answer at least the first two questions.
    >
    > I would go the interface way, too, because you can have several
    > providers (implementations) of the same interface. One could make a
    > mechanism to switch between implementations...but the the interface (for
    > the client) will remain the same.
    > Basically. The OO paragidm "Program to an interface, not an
    > implementation" still goes in the WS world.
    >
    > Here's the link (watch for linebreaks)
    >
    > [url]http://www.topxml.com/reblogger/xml_news/4793_Interface_Based_Service_Contracts_in_the_NET_ Framework_2_0.asp[/url]
    >
    >
    > Regards
    >
    > Henrik
    > [url]http://websolver.blogspot.com[/url]
    >
    Ben Fidge Guest

  5. #4

    Default Re: Returning interfaces from web-services and remoting servers?

    Hi Ben
    > A very fascinating article, and is definitely what I need for the
    > web-service scenario. Unfortunately, I'm not going to be able to use .NET 2.0
    > for this project. It's to be written entirely in VS.NET 2003 and .NET 1.1.
    No problem.
    Check this article:
    [url]http://www.fawcette.com/archives/premier/mgznarch/vbpj/2001/10oct01/ws0110/ws0110-1.asp[/url]

    It uses an abstract class implementing the interface. In .NET 1.1 you
    can apply WebService attributes to classes only, also abstract classes.

    When your client need to interact with the service expose only the
    interface, not the abstract class.
    >
    > Still, the ideas presented in that article are food for thought. I think
    > what I'll do is expose the VS.NET generated client side stubbs using shims
    > that implement my interfaces in a kind of go-between assembly, so the client
    > benefits from the desired transparency. The interfaces will be defined in a
    > lightweight assembly that resides on both sides of the divide.
    This sounds pretty much as the same thing the above article is suggesting.

    Regards

    Henrik
    Henrik Gøttig Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139