Geeks With Blogs
I'd Rather Be Coding Jay Glynn thinking out loud.

Ralf has put up a couple of posts here and here regarding app architecture that everyone should read. His ideas are very similiar to the ideas that we have been implementing ourselves (are you reading this Donnie). One point that I don't particularly agree with is the we should have been using COM+ more. I feel that COM+ is a useful benefit in a relatively small percentage of systems. When you need it you'll know, but it would never be the first thing I look at for a system design. I also believe that .NET as a whole has made COM+ moot.

The point that should be taken from Ralf's posts is that the way the middle tier is looked at should change. This is what he calls the Application and I like the perspective. This is where the heavy lifting is and should be done. I also like the statement regarding the fact that there should be no database api in the “Application” layer. This is one idea that I firmly believe in. What this means is that you have a component that interacts with the database. This component is separate from and independant of the application layer. Instead of the component returning you back a DataSet or some such thing it returns back a business entity to the Application layer. This is the concept behind mapping technologies such as ObjectSpaces, mapping relational data to the object hierarchy. We have a home grown data access layer that is approaching this. All the sql resides in configuration files. The next step will be to return business objects to the Application layer. Currently an XML stream is returned and the business entities consume this and use it to create themselves. The Application layer should not now how the data was obtained or from where it was obtained. All it cares about is that it now has a thing or a collection of things to work with.

Interaction with the front end should be based on messaging of some type. We have been using databinding (which is event based) and event notification in a MVC type of pattern. We now will have to put a batch process in front of an application layer which currently has a WinForms front end on it. Becuase of the very loose coupling we have between the application and the gui, this will be relatively simple process. Hook into the same events and callbacks and we will be good to go. There will be very little if any changes to the application to support the new front end. The front end never sees the data access component, and the Application layer doesn't know or care what front end is being used.

Architecting systems like this offers a couple of challenges along the way, but if your persistent and disciplined the end result is worth the effort.

Posted on Thursday, May 13, 2004 8:25 AM Architecture | Back to top

Copyright © Jay Glynn | Powered by: GeeksWithBlogs.net