File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Program approach Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Program approach" Watch "Program approach" New topic
Author

Program approach

Mike Bates
Ranch Hand

Joined: Sep 19, 2009
Posts: 81
I have written a program that off loads 4 different records from a serial device, that part works great.

I am wondering on an approach for updating a web page, email, twitter, ftp, GUI, etc. I thought of using the Observer model but not sure if that is the best approach.
Two of the records get updated every 2.5 seconds, 1 record gets updated every 5 minutes (could be every minute) and the forth record is updated about every 5 minutes plus or minus.

The each record is defined in their own class and updated as needed, I thought the best approach would be to notify other processes that the record was updated, have those processes grab the data and to their part.

Anyway, I am looking for options on approach.

Thanks
Mike
dennis deems
Ranch Hand

Joined: Mar 12, 2011
Posts: 808
Mike Bates wrote:I thought the best approach would be to notify other processes that the record was updated, have those processes grab the data and to their part.


This is just what I would do.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Program approach