jQuery in Action, 2nd edition*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Asynchronous loading (callbacks or events) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Asynchronous loading (callbacks or events)" Watch "Asynchronous loading (callbacks or events)" New topic
Author

Asynchronous loading (callbacks or events)

Mag Hoehme
Ranch Hand

Joined: Apr 07, 2002
Posts: 194
Hi,
when I deploy my application on two machines connected via LAN, loading about 10 records is awfully time-consuming. That is why I am thinking about implementing asynchronous loading, either as a simple callback or via the Publisher/Subscriber pattern (that is, events).
On the other hand I am afraid that this could be overkill.
PROS:
  • The perceived performance improves (although not the actual performance).
  • The callback pattern is a standard solution in RMI, and Events are supported by Java.
  • RHE has a nice chapter on events - which makes it an eligible technique in my opinion.

  • CONS:
  • My requirements say performance alone is not a

  • justification - however, I'd stress "alone" in this context.
  • My requirements say a design that can be easily understood by a junior programmer would be preferred.


  • The second question is, which technique is more preferable?
    Did anybody implemente asynchronous loading? If yes, how was it marked?
    Any comments are welcome!


    Mag
    Michael Morris
    Ranch Hand

    Joined: Jan 30, 2002
    Posts: 3451
    Hi Mag,
    I used an event scheme for graceful server shutdown and client confidence and definitely lost no points for it. I'd say go for it if you want, but keep it as simple as possible. Event schemes are pretty standard fare, so most junior programmers should not have a problem with understanding what you want to do.
    Hope this helps,
    Michael Morris
    [ August 28, 2002: Message edited by: Michael Morris ]

    Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
    Mag Hoehme
    Ranch Hand

    Joined: Apr 07, 2002
    Posts: 194
    Hi Michael,
    thank you for your opionion!
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Asynchronous loading (callbacks or events)
     
    Similar Threads
    Synchronous or Asynchronous Method?
    Limiting Method Access
    Callback in SCJD Assignment
    URLyBird: runme.jar
    Question: Optimizing JavaScript