Forums Register Login

SwingWorker & packaging

+Pie Number of slices to send: Send
1).Should SwingWorker class be used.
Since it is not a part og swing. Is it ok if
I put it in the client folder and use it.
2). I am doing FBN and I have a FlightDAO which implements the remote
interface. I have a StandAloneDAO which extends FlightDAO.
I have done this to resuse code.
I have made this a part of the common/dao package.
But actually FlightDAO is required only on the server.Is it
okay to have it this way.
[ July 31, 2003: Message edited by: Akshay Sharma ]
+Pie Number of slices to send: Send
Hi Akshay

Should SwingWorker class be used.


I assume you talking about SwingWorker as in the SwingWorker example code used in the Swing tutorial.
You are not supposed to submit any code that is not your own work. Since you are supposed to subclass SwingWorker to do what you want anyway, I think you would be safer to just build your own class - it is not difficult for such an easy class.

StandAloneDAO which extends FlightDAO....


I think this means that even in local mode, your client will be calling the methods of the class that extends Remote (even though it is not using networking). Is this right?
Regards, Andrew
+Pie Number of slices to send: Send
Hi Andrew ,
I was talking abt this SwingWorker on;y.
Yaa even in Local mode internally StandAlone wil call methods of FlightDAO which extends Remore.
This is just for code reusability.I can ver well replicate the same code
in the StandAlone class.
******************
One more concern.
The assignment says that
"Writing Data Client
To connect with your server, you should create a client program. This implementation should include a class that implements the same public methods as the suncertify.db.Data class, although it will need different constructors to allow it to support the network configuration. "
In the data class u have read / write etc etc why should these be implemented again. I am confused.
******************
Rgds
[ July 31, 2003: Message edited by: Akshay Sharma ]
+Pie Number of slices to send: Send
Hi Akshay

Instructions: To connect with your server, you should create a client program. This implementation should include a class that implements the same public methods as the suncertify.db.Data class, although it will need different constructors to allow it to support the network configuration. "
Akshay: In the data class u have read / write etc etc why should these be implemented again. I am confused.


I think you are taking a bad interpretation of "implements".
What is needed to meet this requirement (in my opinion) is a class that has methods with the same name and equivalant functionality (via networking) as the public methods of Data class.
That is, inside my client application, I should be able to call a method named update() which has almost the same signature as the update method in Data class, that will perform the update by sending the update request through the network until it eventually reaches the Data class which will do the real update.
Does that make sense?
Regards, Andrew
+Pie Number of slices to send: Send
Andrew just to reconfirm.
Currently I am having a FlightDAO which extends Remote
and a StandAlone DAO which extends FlightDAO.
Now if I modify StandAloneDAO not to extend FlightDAO and
also I put all methods in Data in StandAlone DAO then it should be fine
right.
I will move FlightDAO to server and StandAlone to client packages.
Curentl; they are in common/dao package
+Pie Number of slices to send: Send
Hi Akshay
Yes, this looks like a good plan.
Regards, Andrew
Farmers know to never drive a tractor near a honey locust tree. But a tiny ad is okay:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 755 times.
Similar Threads
Would you use SwingWorker in an applet? Problem with Java 1.5 browser plugin
transfer object
Design for FBN.Pls review
Can I have two inner classes which extends SwingWorker class.
Problem with swing GUI due to lengthy code running in background.
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:44:08.