Chapter 19: Physical Tiers and Deployment on MSDN describes “Distributed Deployment” (see figure 2). All well and good.
In my experience we’ve always deployed our web based systems as per what they describe as “Nondistributed Deployment” (figure 1). My understanding is that in the Microsoft world the “Application Server” as a separate thing doesn’t really exist (as it does in the Java world) because it’s effectively ‘baked in’ to the OS / Windows.
So my question is if you were to distribute the UI and Business Logic (BL) onto different servers / tiers, how would they communicate?
I know one answer is to use a “service layer” – what are the alternatives? How would you actually do that? What would it look like from a code perspective?
First off. Don’t do it. Just don’t. You’re in for a world of pain. Logical and physical layers are different things. Logical separation of application tiers is a good idea. Physical separation of application tiers is more often than not a recipe for disaster. If there is a good deployment reason (shared payment processor on another box), sure, go right ahead. You can use the standard mechanisms we all know and love – WCF, MSMQ, HTTP, … Pick your poison. But don’t take the overhead and complexity for the sake of living up to some mythical ideal in a MSDN white paper.