Memi.Reflection

Private members of memi's thoughts

Code - UI separation

I guess this issue was talked over and over, but I fell onto it from a different point of view.

I was planning our company .NET framework the other day, and I came up with an architecture that coupled a UI Page and a BL Handler via a simple interface (a bit of an MVC, but not exactly). After the base classes were ready for action, I looked for a good way of checking whether the BL were really a stand alone components as planned. The trivial solution was to create a stub class that would call the various methods in the handler, and see whether it got any unexpected exceptions. However, while thinking of it, I figured other way of doing it, and by the way adding a very nice feature to the framework. Each page now has a switch which indicates how the business logic should be performed - server side (which is the normal way of doing it) or client side. The client side option means that the logic still occurs in the server, but it's called by the web service behavior, using the very same handler. This gives a much improved user experience - a “flicker free” application, much better response time, and more.

Of course, this solution can't be implemented on all the pages, but most of them can do it.

And the best part - the web service that calls the handlers, has only 5 lines of code!

Posted: Apr 13 2004, 02:49 PM by memi | with no comments
Filed under:

Comments

No Comments

Leave a Comment

(required) 

(required) 

(optional)

(required)