Joe Lewis
Joe Lewis

Reputation: 978

Do I need a web service in this case? When do we use them?

my issue is about web services and all the stuff around that. I've developed a java web app, using hibernate (to connect with a mysql DB), jsf and primefaces. The only thing I have to show to the user is the index.xhtml which will search a data in a database. All of this is running on my PC with my local apache server.

But a doubt comes to my mind when I wonder if I deploy this web app in the apache server of the company, do we need something such as a web service o something like that o they just can access to the index.xhtml and start the queries?

Sorry for this but I'm totally new repesct web services, web app, web server and all these stuff.

PS. So, when do we use web services? and web server?

Thanks in advance :)

Upvotes: 0

Views: 45

Answers (1)

taylonr
taylonr

Reputation: 10790

A web service is typically used as an API that might be integrated into another application. For example, if you have a way to accept payment information. You could make that a web service that would let some other application (e.g. an auction site) make calls into your web service to do some work.

Think of it a bit like a DLL that is accessible on the web. It won't have an interface, it is a collection of methods that either return data or execute some code. It will not return a UI.

So when you use a web service would be a similar question to when you need to break code out into a separate assembly.

On your specific question above, you would not need a web service, if your web application is doing everything you need it to do, then all you need is a web application.

Upvotes: 1

Related Questions