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. General Programming
  3. .NET (Core and Framework)
  4. How best to interact with a WinForm app over the web?

How best to interact with a WinForm app over the web?

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpdatabasesql-serverwinformswcf
4 Posts 3 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.
  • N Offline
    N Offline
    nzmike
    wrote on last edited by
    #1

    Hi all, I have a VB2.0 Winforms app that runs from about 9am until about 11pm every day analysing a live datafeed and then doing certain actions depending on the data. (It's an automated betting system for horse racing in case you're curious). What I want to be able to do is to have some semblance of control over the app via my web server for when I am not home but need to check on the app's status or feed it a certain command to change it's behaviour. (I don't need to see the app itself so I'm not looking for a VPN/VNC type solution). Since I also have my own web server I am thinking about building a private/secure web site which can read or write to the various SQL Server 2005 tables the app also uses. In this way I could interrogate data being created by the app (bets and results written to the DB) over the web (via stored procs run by clicking on links) and also issue commands via the website that could be written to another SQL table or XML file that the app could then check for, say every minute or so via a timer. To give a real example - sometimes the data feed needs a gentle prod to download the latest data (which I can request via an API in the app) so I could have a status page on the web that displays the last time of the downloaded datafeed and a button to tell the winforms app to request an updated datafeed. The app would then check the "Events" table every minute or so, see that a new command to refresh the data had come in and call that method in the datafeed API. (This is a pretty simple example - I have more complex things I want to do with an interface of this sort.) Given the app, the SQL DB and the web server are all on one machine is this the best way to do this sort of thing? Are there any nice .Net tools I don't know about to assist with this sort of (admittedly strange) type of remote interface? Should I be thinking about web services or just keep it simple and read/write SQL tables and/or XML files from both the app and the web site? TIA for any input, comments etc - just interested if anyone has any recommendations or can see any problems with doing this sort of thing. Mike

    V P 2 Replies Last reply
    0
    • N nzmike

      Hi all, I have a VB2.0 Winforms app that runs from about 9am until about 11pm every day analysing a live datafeed and then doing certain actions depending on the data. (It's an automated betting system for horse racing in case you're curious). What I want to be able to do is to have some semblance of control over the app via my web server for when I am not home but need to check on the app's status or feed it a certain command to change it's behaviour. (I don't need to see the app itself so I'm not looking for a VPN/VNC type solution). Since I also have my own web server I am thinking about building a private/secure web site which can read or write to the various SQL Server 2005 tables the app also uses. In this way I could interrogate data being created by the app (bets and results written to the DB) over the web (via stored procs run by clicking on links) and also issue commands via the website that could be written to another SQL table or XML file that the app could then check for, say every minute or so via a timer. To give a real example - sometimes the data feed needs a gentle prod to download the latest data (which I can request via an API in the app) so I could have a status page on the web that displays the last time of the downloaded datafeed and a button to tell the winforms app to request an updated datafeed. The app would then check the "Events" table every minute or so, see that a new command to refresh the data had come in and call that method in the datafeed API. (This is a pretty simple example - I have more complex things I want to do with an interface of this sort.) Given the app, the SQL DB and the web server are all on one machine is this the best way to do this sort of thing? Are there any nice .Net tools I don't know about to assist with this sort of (admittedly strange) type of remote interface? Should I be thinking about web services or just keep it simple and read/write SQL tables and/or XML files from both the app and the web site? TIA for any input, comments etc - just interested if anyone has any recommendations or can see any problems with doing this sort of thing. Mike

      V Offline
      V Offline
      Vasudevan Deepak Kumar
      wrote on last edited by
      #2

      The Windows Form Application can query the Web Server at periodic intervals through a WebService right?

      Vasudevan Deepak Kumar Personal Homepage Tech Gossips

      1 Reply Last reply
      0
      • N nzmike

        Hi all, I have a VB2.0 Winforms app that runs from about 9am until about 11pm every day analysing a live datafeed and then doing certain actions depending on the data. (It's an automated betting system for horse racing in case you're curious). What I want to be able to do is to have some semblance of control over the app via my web server for when I am not home but need to check on the app's status or feed it a certain command to change it's behaviour. (I don't need to see the app itself so I'm not looking for a VPN/VNC type solution). Since I also have my own web server I am thinking about building a private/secure web site which can read or write to the various SQL Server 2005 tables the app also uses. In this way I could interrogate data being created by the app (bets and results written to the DB) over the web (via stored procs run by clicking on links) and also issue commands via the website that could be written to another SQL table or XML file that the app could then check for, say every minute or so via a timer. To give a real example - sometimes the data feed needs a gentle prod to download the latest data (which I can request via an API in the app) so I could have a status page on the web that displays the last time of the downloaded datafeed and a button to tell the winforms app to request an updated datafeed. The app would then check the "Events" table every minute or so, see that a new command to refresh the data had come in and call that method in the datafeed API. (This is a pretty simple example - I have more complex things I want to do with an interface of this sort.) Given the app, the SQL DB and the web server are all on one machine is this the best way to do this sort of thing? Are there any nice .Net tools I don't know about to assist with this sort of (admittedly strange) type of remote interface? Should I be thinking about web services or just keep it simple and read/write SQL tables and/or XML files from both the app and the web site? TIA for any input, comments etc - just interested if anyone has any recommendations or can see any problems with doing this sort of thing. Mike

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #3

        You may want to think about using technologies like SqlDependency or Notification Services in SQL Server 2005. Alternatively, take a look at Windows Communication Foundation or Remoting to exercise more direct control over the application.

        Deja View - the feeling that you've seen this post before.

        N 1 Reply Last reply
        0
        • P Pete OHanlon

          You may want to think about using technologies like SqlDependency or Notification Services in SQL Server 2005. Alternatively, take a look at Windows Communication Foundation or Remoting to exercise more direct control over the application.

          Deja View - the feeling that you've seen this post before.

          N Offline
          N Offline
          nzmike
          wrote on last edited by
          #4

          Thanks - they both sound like good alternatives... I'll have to do a bit of research. At the moment I am just doing it very simply where I write an event to a table from the web site then a timer in the app checks the table for any new entries every minute... seems to work well for what I need so far.

          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