tags:

views:

46

answers:

2

Hi All,

I have a web application that is based on 3 Layer. I prefer to deploy this application one one server to avoid the overhead involved in communication between layers if the layers are separated out into different physical tiers.

I want to know what are the different design considerations at the architecture level that I must keep in mind so that the application can be flexible enough so that it can be deployed on different servers without big change.

For example in Visual Studio, I can create the three layers in one single solution. The project references are also easy to create. But what if in future the Business Layer has to be deployed on a different physical server. What are the different and efficient ways that UI can communiciate with Business Layer. How will commuincation happen between Business Layer and Data Layer?.

A: 

My general advice: design your layers as though they will be deployed to separate tiers. Hence pay very careful attention to the design, especially granularity, of the interfaces. Busy interfaces (getFirstName, getFamilyName, getPhoneNumber ...) will have serious overhead when remoted (prefer single method. getPersonDetails) Also consider errors that can occur when layers are separate.

Now you can wrap access to the layers in a Location Transparant API. CORBA, JEE EJBs are examples of way to do that, but of course you can write your own facade.

The actualy remoting technology you use is down to you, I'm a JEE guy so I would just us EJBs.

djna
Thanks djna. I am looking for more inputs from others here.
pradeeptp
A: 

It should be more than "maybe". That is, you are going to experience some design and implementation overhead building a system that abstracts away the communication layer. If you are not sure you are going to have to split apart the layers, you might consider building your system for In-Process and then bear the burden of the comm split out later.

If your're convinced there is a good chance you will need to have comm abstracted away, look at something like WCF. Design your system along Service Oriented Architecture guidelines. Then when your on the same machine, you can use a single machine binding between layers for the speed and when you have to change over to a new binding, you can do so through configuration.

JP Alioto