Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. IT & Infrastructure
  4. Best way of exposing an interface to a service for a local UI

Best way of exposing an interface to a service for a local UI

Scheduled Pinned Locked Moved IT & Infrastructure
questioncsharpdatabasewinformsdesign
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Adam Crawford
    wrote on last edited by
    #1

    Hello, I haven't posted on here but before but I've been a reader for a while. I've just switched jobs and taken up the role of developer so I was hoping you good people could give me a bit of advice on the best way to go about designing a solution. I have been given an existing application that runs as a windows service. Currently, this application simply provides a wrapper to control some telephony hardware, managing messaging queues, that sort of thing. It returns some real time information such as delivery reports and failure reports and currently there are only limited options to interact with it (text file input directories or direct database interaction, neither of which are ideal). The service can be extended using the api to write service extension dlls. Here's what I need to do. I want to create an interface to the service so that I can have a heavyweight local winforms UI manage it, as well as allowing a very limited web interface to interact with it eventually (though that is not the priority). I want the level of access allowed to the winforms UI to be much greater than that allowed by web interface later on. Here's the question - what's the best practice for exposing my service. Do I extend it with a web service and simply have different levels of functionality available on different ports, then communicate with my local service as if it was a remote service from my winform application? (I'm a little worried about whether this will provide the appropriate level of real time event handling). Or is there a better way of approaching this and exposing my windows service to a local winform UI? Also, are any of the relatively recently released Application Blocks or Software Factories applicable to this development? I noted the web service factory has just come out and might be worth a look. Any help and advice appreciated. Thanks, Adam

    L 1 Reply Last reply
    0
    • A Adam Crawford

      Hello, I haven't posted on here but before but I've been a reader for a while. I've just switched jobs and taken up the role of developer so I was hoping you good people could give me a bit of advice on the best way to go about designing a solution. I have been given an existing application that runs as a windows service. Currently, this application simply provides a wrapper to control some telephony hardware, managing messaging queues, that sort of thing. It returns some real time information such as delivery reports and failure reports and currently there are only limited options to interact with it (text file input directories or direct database interaction, neither of which are ideal). The service can be extended using the api to write service extension dlls. Here's what I need to do. I want to create an interface to the service so that I can have a heavyweight local winforms UI manage it, as well as allowing a very limited web interface to interact with it eventually (though that is not the priority). I want the level of access allowed to the winforms UI to be much greater than that allowed by web interface later on. Here's the question - what's the best practice for exposing my service. Do I extend it with a web service and simply have different levels of functionality available on different ports, then communicate with my local service as if it was a remote service from my winform application? (I'm a little worried about whether this will provide the appropriate level of real time event handling). Or is there a better way of approaching this and exposing my windows service to a local winform UI? Also, are any of the relatively recently released Application Blocks or Software Factories applicable to this development? I noted the web service factory has just come out and might be worth a look. Any help and advice appreciated. Thanks, Adam

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      NamelessParanoia wrote:

      what's the best practice for exposing my service

      Don't think that exists. It is largely dependent on the specifics of your service and applications. Based on my best understanding of what you posted I will offer this potential solution. Extend the service with a dll that exposes Remoting Service(s) then in either a winforms or a ASP.NET applications you can use the remote proxies to access the Service process. It is quite simple and supports security. I recommend the book Professional C#[^] for it's coverage of Remoting.

      led mike

      A 1 Reply Last reply
      0
      • L led mike

        NamelessParanoia wrote:

        what's the best practice for exposing my service

        Don't think that exists. It is largely dependent on the specifics of your service and applications. Based on my best understanding of what you posted I will offer this potential solution. Extend the service with a dll that exposes Remoting Service(s) then in either a winforms or a ASP.NET applications you can use the remote proxies to access the Service process. It is quite simple and supports security. I recommend the book Professional C#[^] for it's coverage of Remoting.

        led mike

        A Offline
        A Offline
        Adam Crawford
        wrote on last edited by
        #3

        Thanks for the response Led, I've been having a much more thorough look into using remoting today and came across this MSDN article that pretty much answers my question: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bdadotnetarch16.asp There's an architecture section at the end that shows the reasons for the different selections to be made. Best Regagrds, Adam

        L 1 Reply Last reply
        0
        • A Adam Crawford

          Thanks for the response Led, I've been having a much more thorough look into using remoting today and came across this MSDN article that pretty much answers my question: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bdadotnetarch16.asp There's an architecture section at the end that shows the reasons for the different selections to be made. Best Regagrds, Adam

          L Offline
          L Offline
          led mike
          wrote on last edited by
          #4

          Yes I know that article but did not link to it since your architecture (having an existing service) is not very well represented in the article. Since you already have a Service that contains the information you want to publish to a .NET Windows Forms application, adding remoting services to the existing service seems like the simplest and relatively efficient solution.

          led mike

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups