PC Review


Reply
Thread Tools Rate Thread

Asynchrous Business Objects

 
 
Michael E. Pouliot
Guest
Posts: n/a
 
      7th Feb 2005
I read this article the other day and was unsatisfied by the concepts
described:

http://msdn.microsoft.com/library/de...ml/asyncui.asp

Essentially, it discussed how to best implement asynchronous processing from
the UI. That's nice, but the article is limited in its scope. What I'd
like to see an article about, or hear comments on, is how to implement an
asynchronous Business Objects layer that exists on a separate thread from
the GUI and is able to handle the processing of asynchronous server events.

For example, let's say you have an application that maintains a persistent
TCP/IP socket connection with a back-end application. It needs to be
persistent so that the application can get asynchronous updates in
real-time. The application's business logic layer would be responsible for
processing incoming/outgoing data for this socket connection, and
maintaining an in-memory cache of the current application data set. In
order to provide a more responsive UI, it seems it would make sense to have
a separate thread that manages the business logic layer (and thus the
internal data set), and then once received data has been fully processed and
cached, the business logic layer would notify the UI that it needs to be
refreshed.

I haven't found any reasonable way to keep a worker thread alive such that
it could wait around and handle any delegate callbacks. Therefore, my idea
is to create a Business Logic class that inherits from
System.Windows.Forms.Control. This would allow me to create a new GUI
thread that is separate from the main GUI thread. This new thread could be
used to process any asynchronous callbacks from objects that are owned by
the Business Logic class. Then, various GUI objects could "register"
delegate callbacks with the Business Logic class. The drawback to this is
that it would potentially involve a lot of thread switching, and would thus
potentially cause more performance problems than if the Business Logic
processing existed on the main GUI thread.

I'd appreciate any comments regarding this approach. In particular, I am
most interested in evaluating the merits of alternative approaches to
maintaining a Business Logic layer that is functionally independent of the
main GUI thread.

Regards,
MP
Michael.Pouliot-(E-Mail Removed)


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
session variable and asynchrous call carrolky@gmail.com Microsoft Dot NET Framework 3 27th Oct 2006 07:14 PM
OT: Business Objects - what are they and can they contain objects like sockets? g18c@hotmail.com Microsoft C# .NET 1 20th Jan 2006 07:12 PM
OT: Business Objects - what are they and can they contain objects like sockets? g18c@hotmail.com Microsoft VB .NET 1 20th Jan 2006 07:12 PM
Cancel asynchrous Socket Read Tod Johnson Microsoft Dot NET Compact Framework 2 18th Feb 2005 06:17 PM
100% Free MS Access .NET Code Generator (tired of hand cranking business objects/data objects) ? MyGeneration Microsoft Access 0 27th Jan 2005 04:55 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:40 PM.