When it comes to good application design, separating the business logic from the UI is essential. It is true, splitting your tiers makes your application more testable, maintainable, and extensible.
A number of developers have come up to me to ask how to pass Entities (as in the Entities Framework) over web services, I began realizing that there are common misconceptions on what nTier ***really *** means for .NET applications and services...
This post is a part of a series that I am putting together to make Architects and developers understands the choices they make while realizing their designs.
The issue can be boiled down to misunderstanding the terminology of ported over from the Visual Basic 6 days and the good ol' days of ActiveX and DCOM where we have logical and physical definitions began to blur.
In the old days of Visual Basic 6 when we talked about good architecture, we considered packaging classes in a class lib, abstracting, and separating the UI from the business logic to be the good thing (and it sure was). Inadvertently we have created a ActiveX library when all we wanted was to create a reusable components that could be separate but still part of the project, we now call them namespaces. The thing that made maters confusing is the fact that we could now take the same ActiveX and register it as a DCOM component, blurring the difference between between the logical design model and the physical deployment.
Unlike with the classics, ASP and VB6, .NET brought the power back to the developers who are now able to virtually anything, anywhere in the code. Which turned out to be good and bad (depending if you are wiring code, or fixing someone else's bugs). Strongly-Typed DataSets, namespaces and assemblies, and a variety of options to from Web Services, to Remoting, to EnterpriseServices became available to developers to realize their designs. Understandably there is confusion.
There is a fundamental difference between the logical design, service orientation and physical deployment.
In the next few posts I will attempt to demystify what are the patterns that will benefit your application