disadvantage of using web services for business layer and data access layer?

2.5k views Asked by At

for web based business application, is it good to develop business layer, data access layer using web service? what are the disadvantages?

UI Layer (ASp.Net) --> Business Layer (WCF Web service) --> DataAccess Layer(WCF Web Service)

everything will be hosted in single server. is it the best practice to go for web services for business, data access layers?

regards, Anand

2

There are 2 answers

0
home On BEST ANSWER

It highly depends on your non-functional requirements and change cases you might already be aware of. Separating all your layers by using some kind of Web Services (SOAP/REST) this way will introduce:

  1. additional complexity in terms of protocols, security, deployment (con)
  2. latency as several (de)serialization steps are required (UI > Business > DataAccess). Keep in mind that your DataAccess layer again connects to a (remote) datastore (con)
  3. ability to scale out the different layers independently. Say, another system wants to reuse you BusinessLayer, you are in a position to scale out (cluster) only the Business and subsequent layers (DataAccess and Datastore). (pro)

I'd rather start simple and clearly separate the different layers from an architectural point of view only. Establish well-defined (.NET only) interfaces between UI, Business, and DataAccess layers. If you later come to the conclusion that you have to separate the layers on to different nodes, you can 'easily' generate the corresponding Web Services proxies and modify your components at only a few places.

0
sherif On

there are much more pros then cons

Browser compatibility

When the server dies the application dies too

Bandwidth requirements

http://www.exforsys.com/tutorials/client-server/client-server-technology-thin-clients/1.html