Anand Kumar
Anand Kumar

Reputation: 425

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

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

Upvotes: 3

Views: 2520

Answers (2)

home
home

Reputation: 12538

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.

Upvotes: 2

sherif
sherif

Reputation: 2332

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

Upvotes: 0

Related Questions