In the past 6 months, I have had the opportunity to develop a smart client application, using the CAB, the Smart Client Software Factory, the Web Service Software Factory, and the Enterprise Library 2.0. I have worked on web application development since 2000, and client/server before that.
I was asked recently how smart client is different from a web application, whether it’s easier or more difficult to develop. I think to answer this properly, one really needs to think about the architectural differences. Let’s start with a web application. In my experience, the layers of the application reside on the same physical tier. I am pretty sure this is true in the majority of cases, and there are good reasons for it. It is much easier to pass business entity objects between the UI, business, and data layers when those layers reside on a web server (typically in a single application domain), and it certainly does not prevent scaling out since you can replicate this setup on a number of servers grouped together in a cluster (a.k.a web farm). As outlined by the patterns and practices group in “Application Architecture for .NET: Designing Applications and Services“, the Web Farm With Local Business Logic is a common deployment architecture and has the advantage of providing the best performance.
Now on to the smart client. The deployment pattern we have implemented is named “Rich Client with Web Service Access” in the same Application Architecture for .NET: Designing Applications and Services document. This setup, along with the alternate “Rich Client with Remote Components” naturally involves multiple physical tiers. The mere fact that a client is deployed to end user computers means that there are multiple physical tiers.
This leads me to this conclusion. If you are going to develop a smart client application, you cannot escape the realities of distributed computing. Comparing a web application with local business logic to a smart client application is not a fair comparison because the web application deployed in such a way does not involve distributed computing – objects are passed between the layers without worry about network latency or serialization. A fairer comparison is a web application with remote business logic on the one side and the smart client application on the other because both deal with multiple physical tiers.
What do you think? Please post your comments as I am interested in hearing your opinions.