Web Service for DataBase call
-
Hi Everyone, I would like to know under which scenario, in a web application we can use Web service to make database call. Means, what is the benefit of using web service to return data from database and to use that data in application. In this case, web service to be built for internal purpose only and not a public web service. Can any one please suggest me why web service can be used to make a database call instead of simple DAL? What this extra layer of web service can give benefit to the architecture? Thanks & Regards Lokesh Gupta
-
Hi Everyone, I would like to know under which scenario, in a web application we can use Web service to make database call. Means, what is the benefit of using web service to return data from database and to use that data in application. In this case, web service to be built for internal purpose only and not a public web service. Can any one please suggest me why web service can be used to make a database call instead of simple DAL? What this extra layer of web service can give benefit to the architecture? Thanks & Regards Lokesh Gupta
Its a layer of abstraction, which gives the usual things - benefits of being able to replace the database+webservice end and have your application still working fine, easier implementation of security, and the usual downsides of more complexity, maintenance and worse performance. Of course if you never intend to change the architecture, then you are just burning money to add complexity for no real reason.
Mark Churchill Director Dunn & Churchill Free Download:
Diamond Binding: The simple, powerful, reliable, and effective data layer toolkit for Visual Studio. -
Hi Everyone, I would like to know under which scenario, in a web application we can use Web service to make database call. Means, what is the benefit of using web service to return data from database and to use that data in application. In this case, web service to be built for internal purpose only and not a public web service. Can any one please suggest me why web service can be used to make a database call instead of simple DAL? What this extra layer of web service can give benefit to the architecture? Thanks & Regards Lokesh Gupta
Hi, Principally that of abstraction. The chances are that whatever it is that calls your webservice should not know about the database at the other end- ideally if there is even one. It should think in terms of calling something to get the data it needs. The webservice will form part of your middle tier, so should you change databases or decide to implement some caching etc, the client remain unaffected. Of course, if you want your application to work other the internet as well, then you need to do something like this or you'll have to open up firewalls to the database port which exposes a nightmare scenario of security risks.
Regards, Rob Philpott.