Geeks With Blogs


Google My Blog

Murray Gordon Flash a-ah! Savior of the universe...

I have a question for anyone who might be able to help.

I am building a SmartClient app that uses .NET Remoting to communicate with it’s BLL (Business Logic Layer). The app ultimately speaks to an IBM 3270 Host to execute units of work. The BLL and DAL (Data Access Layer) are for the most part, pass through layers to the real business logic on the mainframe. As the app evolves, functionality in the host might be moved onto other systems.

My question is… I have to maintain state or a session between all the layers of the application.

·         Do I need to create a “Session” class to maintain this state in each layer of the application?

·         How would I sync state across all layers?

Here’s the conceptual design diagram. Notice I have “Session” object on all three layers. Am I off on this approach?


Here’s my session class. It has a bunch of properties that about the user and their session that need to be passed around. This is what I’m trying to pass around to be used on the UI, BLL and DAL.


Thanks in advance for anything.

Posted on Thursday, September 29, 2005 7:55 AM Visual Dev - Host Integration | Back to top

Comments on this post: N-Tier Session Management Question...

# re: N-Tier Session Management Question...
Requesting Gravatar...
Syncing state across 3 copies of your session object sounds like a nightmare. Here's what I would do. For one, *Session* seems a little too generic. Break out *Session* into multiple classes for Customer/Order/Product/Purchase Order etc. Create these classes as entity classes in you DAL. These classes know how to do the basics, Save/Delete etc and provide ArrayLists, collections and datasets. Create a utility class in your business object which has methods which know all about the rules for saving an order, adding a customer etc. Call the Business layer methods from the client to perform the operations in the system. Create instances of these classes in the Business Layer as the client needs them and maintain state by storing pertinent Identity values as session variables, that is page.session - not a custom class you generate.


Left by Brian on Sep 30, 2005 7:59 AM

Your comment:
 (will show your gravatar)

Copyright © Murray Gordon | Powered by: