I'm wondering if anyone can help me out with my design.
I've implemented an MVC architecture for the client side gui. I'm using RMI to get an instance of a local or remote Services interface that holds the methods book & search.
The controller is registered as a listener of the view and so when a user clicks the book button the controller needs to determine the currently selected row by querying the view and then needs to call the Service book method with the record number as a parameter.
Now i'm just wondering where I should be putting the Services instance so that it can be called by the controller? Should it be:-
1) A static member of some class (MainClass)or 2) Passed into the controller with the model and view or 2) Should the service register with the controller and the controller should fire an event sending the recNum as a parameter in the event?
Any help is much appreciated.
Peter G Walker
posted 11 years ago
Should the model contain the reference to the services instance? I.e should I pass the service to the model constructor?
Most of these will work i'm just wondering if anyone has a better design? since I think SUN is mostly interested in a well designed system.
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads