Search code examples
asp.netwcfweb-servicesarchitecturen-tier-architecture

Benefits of WCF Service Layer on a ASP.NET Website?


I need advise on the architecture of my new application. In the environment I work in, we normally create Win based apps and these compose a UI layer, Business Layer, WCF Service Layer, and Data Access Layer. These are on a 3 tier architecture with Services Server, Database Server and clients machines accessing the application via Citrix on an Application Server. I just created a web aplpication and my admin has suggested this should be hosted on a separate web server, my question is, is there a need for my web application to use a WCF Service Layer, since it can be hosted on the same application server? Basically, do websites need to use wcf/service layers and what are the benefits?


Solution

  • 1. Read this: http://www.codeproject.com/Articles/10746/Dude-where-s-my-business-logic

    My advice: At the least, you should use WCF, and use "named pipes". You can deploy both the Host (WCF) and the Client (Asp.Net website) on the same machine. The Asp.Net website will be the "client" and access the service.

    Then, if you ever want to horizontally scale, all you have to do is change the .config settings to use a different protocol besides named-pipes. Aka, you'll have the "logical separation", even if you deploy both on the same physical machine(s).

    They (websites, any project) don't "need" to do anything.

    You can write inline sql code behind buttons on webforms if you want. But its not maintainable. And its not scalable. And it is probably foolish. But putting in the time to SOA a mid to large sized application is worth the effort in the beginning, IMHO.