Link to home
Start Free TrialLog in
Avatar of pclarke7
pclarke7

asked on

C# Classes in a Client server environment

Hello,
I am attempting to develop a simple client/server application in WCF as a learning exercise. I have a couple of basic questions about the behaviour of classes in the server environment.

1. If there are numerous people on a client/server application and each client creates their own instance of a class (say MyUser )  then as they dip in and out of the server application ,  how does the server  application know which object belongs to which client ?

2. If , in my server application I want to create  global variables for each client rather than for all clients on the server then how would I go about this. My understanding is that a static class would make the variables available to everyone.

thanks
Pat
ASKER CERTIFIED SOLUTION
Avatar of Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger)
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of ste5an
ste5an
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pclarke7
pclarke7

ASKER

Thank you all for your comments. I have certainly learned quite a lot from them. What I am designing is a process where a transaction , which resides on the server, is invoked by the user. The transaction has many record types (Tag records, calculation records, Logic records, Decision records , input records  & output records etc..) When the next transaction record to be processed is  an "Input" type then processing will return to the client for an input. The screen displayed on the client will contain the Outputs which were processed by the transaction prior to the Input type.

A simple example might be where the user invokes a transaction to change printers. The transaction will read through the list of printers available and output the name and location to MyDisplayclass. When the transaction hits an Input record to request the input of the selected printer then control will return to the client which will display the list of printers (from MyDisplayClass object) and user will be prompted to select from the list.  The input value is then returned to the server which will resume the transaction at the line after the input statement.  

I assume that this will require me to configure a per session service ?    

regards
Pat