• Post Reply Bookmark Topic Watch Topic
  • New Topic

A good example for the need for and usage of web services ?  RSS feed

 
sid smith
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I made one. Is it okay ? Does it need improvement ? Any errors ? Please give me some reviews and feedback. Thanks.

A web service enables interoperability between systems which may be quite different from each other. That is web services allows two different pieces of code, in different languages, running on two different servers to be able to talk
to each other and call each other's methods. With this, you can make a Java program call a web service written in .NET.

Why would you want to do something like this ? Here is an example for the need – Say a website called Crime.org is made with “LAMP stack” and it gives an updated list of crimes committed in any city by area codes. It does not show anything on a map. You have google maps written in say Java EE which only shows you maps. If you want to make a housing website which also shows people the crime rates in a neighborhood, what do you do ? Now, if both Crime.org and Google maps allow you to extract their data from some web service, then you can simply get information from them and combine them using any language you like, without worrying about what platform they use. If they don’t have a webservice, then you would have to make code to load their webpages, extract all the relevant info and discard things like photos, advertisements or html code from those pages.

Thanks.
 
Stephan van Hulst
Saloon Keeper
Posts: 7992
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That seems like a pretty solid example to me.
 
Knute Snortum
Sheriff
Posts: 4281
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's a good example. I've even written both the web services and the client that uses it. For example, I want a backend that checks a database and retrieves data or writes data back. I write that service, then use it to create a web interface. The advantage of this is you have a more general (less proprietary) way to get to the data so that you can modify your program more easily and other people can use the web service too.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I look at it on a higher level - the use case is architectural in nature. Connecting two disparate systems is something that comes up frequently, so I think the "why would I want to do this" question doesn't really arise. Or rather, it has an obvious answer. And HTTP is a convenient choice of transport, as both client and server sides are readily available in many languages.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!