How best to interact with a WinForm app over the web?
-
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
-
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
The Windows Form Application can query the Web Server at periodic intervals through a WebService right?
Vasudevan Deepak Kumar Personal Homepage Tech Gossips
-
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
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.
-
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.
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.