Forums Register Login

UB MVC for Network and stand alone

+Pie Number of slices to send: Send
I am using the MVC design pattern for the UrlyBird assignment. Following is generic explanation of my Model portion of the MVC pattern.

<code>
interface UBModel extends Remote
</code>

When running as standalone:
<code>
UBModelImpl implements Model.
</code>

When running as network:
<code>
interface UBServer extends Remote, UBModel
UBServerImpl extends UnicastRemoteObject, implements UBServer and
has a UBModelImpl
</code>

The Model notifies the views of changes to the Model. So, do I need two implementations of the View as well? One extending UnicastRemoteObject, and one that does not?

Thanks in advance.
+Pie Number of slices to send: Send
Hi Jeff,

Normally the only classes that need to extend UnicastRemoteObject are those that will be called remotely. So if your MVC Model is extending UnicastRemoteObject then you are implying that it will be called from the server. Is this correct?

There may be a reason for having your server call the MVC Model, but there would normally be no reason to have your server call the MVC View. So there should be no reason for having the view extend UnicastRemoteObject.

Additionally there is the following statement in the instructions: "Architecturally, [standalone] mode must use the database and GUI from the networked form, but must not use the network server code at all." So, assuming the View and Controller of your MVC form the GUI (which is normally the case), then you must only have the one View.

Regards, Andrew
[ October 08, 2005: Message edited by: Andrew Monkhouse ]
If a regular clown is funny, then a larger clown would be funnier. Math. Verified by this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 435 times.
Similar Threads
FBN: Which classes in which package?
comment design please
RMI implementation
Single Data Interface Justification
RMI help please
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 12:40:00.