UI Controller Layer is the bridge connecting UI and Business Logic layers.
Good-to-great companies understood a simple truth: Tremendous power exists in the fact of continued improvement and the delivery of results.
A significant portion of software development is in writing code. However, another aspect of software development that we must keep in mind constantly is that it is a cooperative activity.
When the CNClient background thread receives entities, those entities are passed to the appropriate XXXManager class (IMManager, UMManager, etc). The XXXManager class then uses the generated DAL to update the client database.
The interactions between the CNClient (polling thread) and the ConnectionManager for online/offline state management are covered in the CAD Client Offline SSAD. The CNClient will subscribe to the OnOnline event exposed by the ConnectionManager. The CNClient background updating thread will notify the ConnectionManager when the CNService is no longer available and the client should go into offline mode. The CNClient will then notify the ConnectionManager when the server is available again. The ConnectionManager will raise the OnOnline event when the user has chosen to go back online so the CNClient background thread can begin polling the CNService again.
The interactions between the CNClient (polling thread) and the Login Manager are covered in the CAD Login SSAD. When a user logs in, the Login Manager will call the CNClient to start the background updating thread, passing in the areas the user is monitoring. When a user logs out, the Login Manager will call the CNClient to stop the background updating thread.
Note that the entire purpose of the AppDomain is to provide isolation
Suspend() -> Suspends the execution of a thread till Resume() is called on that.
Resume() -> Resumes a suspended thread. Can throw exceptions for bad state of the thread.
Sleep() -> A thread can suspend itself by calling Sleep(). Takes parameter in form of milliseconds. We can use a special timeout 0 to terminate the current time slice and give other thread a chance to use CPU time
Join()-> Called on a thread makes other threads wait for it till it finishes its task.