Monday, March 26, 2012

web service example

can anyone give me a real world example of a pretty basic webservice?
not asking for code.. I want a description. I guess I don't understand the point of them...
They are just a way to transmit data to apps from the web right?OK, say you have some code that gave you weather predictions, maybe the UK's MET Office has one.
Then companies like BBC, can use this in weather.bbc.co.uk to display the weather.
Maybe a uni exposes a web service with some very complex cool maths functions. This means developers can connect and use the functionality.

OK, here's a good one. MSN Messenger 7. Instead of using winsock I believe it uses a web service. Much better way of connecting, and much easier.

Also, say you have a web app, and a windows app, that use the same functions...both can connect to the web service, or the win32 app can use the web service to expose functions from a DLL on the web server.

There are loads of wb services out there. Most are free, some you have to pay for. There is a web site that is like a phonebook for free web services. Trying to think what it is. Nope it's gone. Will look for you.

Woof
well im thinking more along the lines of what I would use one for. (although those were still good examples)

for instance right now my one app checks for updates via an HTTP stream (you know sort of like the autoupdate app you worked on in vb6) and sends a querystring or form post to the url and the url figures out if an update is needed an outputs the appropriate text, like a yes/no, files to dl etc...

so i was thinking it might be better to use a webserver it connect and see if an update is needed. might be cleaner and less likely to error than just requesting an aspx page from my windows app to determine an update.
Yup. Very good example of a web service.
In fact, that gives me an idea ;)

Be wary though, there are some speed implications with web services. Not sure how they compare to LiveUpdate or your method :(

Woof
its very little data being passed so it wouldnt be an issue.. i was thinking of using a webservice just to poll my webserver to see if an update is available, the actual downloading and applying is done using conventional coding methods..
Personally I'd go with remoting for upades, but maybe it's just cos I know remoting... :)
what exactly is envolved in that?
A class that inplements marshalbyref and a couple of config files. It'll work straight from IIS, and you can binary format the communication (which is faster).
here's a full description:
http://www.codeproject.com/vb/net/RemotingTech.asp

If your interested let me know any I'll try and dig up some of my own examples.
well my issue is that my webserver is hosted by a 3rd party webhosting service. I have FTP access only. I can't customize or configure anything, only upload my pages/dlls. Also the app that has the autoupdating ability is a retail app, that people buy and use, so its not like an internal app being used by a company or something.
All you'd need to do is upload the dll and config file.

0 comments:

Post a Comment