views:

574

answers:

1

We are considering a two tier application. However later we may want to convert that to three tier application. Is there any design pattern/framework/technology helpful in that? The main reasons for considering two tier are:

1) Single low end desktop machine is available for running the application.

2) Only single user currently.

3) Application needs to be run at remote locations where there is no network connectivity.

Our idea is to deploy the application as two tier where there is no connectivity and use it as three tier where there is connectivity.

+1  A: 

You haven't stated what your development platform is, so I'll assume .NET, which allows me to answer this with my own experience :-)

I had the same experience, which I solved thanks to the flexibility of .NET remoting.

As you build the application, consider the parts of the application that you would put on the server, if it was theoretically implemented as a client server application. Put all of these classes into a separate library, and simply link your client application directly to this library.

When you want to make the switch to client-server, you can make it that this library is hosted by a windows server, and configure the client and servers appropriately.

Of course, I'm leaving out huge amounts of details here (MarshalByRef objects, serializable objects, the vast number of ways that you can configure the communication), and I might be talking about functionality that has already been made redundant by WCF.

But the point is, it is quite feasible to isolate the business logic / data access layer into a separate DLL that's hosted by the client application, and then later on deal with switching to client server.

Andrew Shepherd
I am open to any development platform (Micorsoft stack - Silverlight/WPF/.NET, Flex/AIR, Swing/J2EE)
Rejeev Divakaran
Another preference is to run the three tier application as web based rather than thick client.
Rejeev Divakaran