jeudi 15 mai 2014

Web services - consommer des services Web sur le client à l'aide de javascript - Stack Overflow


I have found the practice of consuming webservices on the client quite uncommon and have a query in this regard. Is it bad practice to consume webservices on the client end? Does exposing the webservice put your application at risk in anyway. What is the main motive behind calling the webservices on the server and not client, because logic dictates that the number of calls to the server would become much smaller and the whole process would move a lot faster?


Thanks Shouvik


PS: I am not sure contrary to what I believe is widely practiced and if so then I may be completely wrong in my notion. Since I could not find any real article on googling I ask this question.




it completely depends on the nature of the webservice and what you do with them, if the webservice is open and doesn't require authentication or certificate validation, then you can obviously load it from the client side.


incase if the web service exposes some critical information which you do not want to expose to the end user, its a practice to load it on the server.


incase if you want to do a business logic on the data returned by the webservice and dont want to expose the logic to the external world, you can do it on the server.


i would say it completely depends on the type of the web service and what you are doing with the webservice.


for ex: if its a weather webservice which is open, no authentication etc, i dont see any value in having it on the server except you want to increase the load on your server




Go over this Sun Link


Totally depends on web-service type you want to use there.


This might help you in further development.



I have found the practice of consuming webservices on the client quite uncommon and have a query in this regard. Is it bad practice to consume webservices on the client end? Does exposing the webservice put your application at risk in anyway. What is the main motive behind calling the webservices on the server and not client, because logic dictates that the number of calls to the server would become much smaller and the whole process would move a lot faster?


Thanks Shouvik


PS: I am not sure contrary to what I believe is widely practiced and if so then I may be completely wrong in my notion. Since I could not find any real article on googling I ask this question.



it completely depends on the nature of the webservice and what you do with them, if the webservice is open and doesn't require authentication or certificate validation, then you can obviously load it from the client side.


incase if the web service exposes some critical information which you do not want to expose to the end user, its a practice to load it on the server.


incase if you want to do a business logic on the data returned by the webservice and dont want to expose the logic to the external world, you can do it on the server.


i would say it completely depends on the type of the web service and what you are doing with the webservice.


for ex: if its a weather webservice which is open, no authentication etc, i dont see any value in having it on the server except you want to increase the load on your server



Go over this Sun Link


Totally depends on web-service type you want to use there.


This might help you in further development.


0 commentaires:

Enregistrer un commentaire