jQuery in Action, 3rd edition
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes URLyBird standalone/server design 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 "URLyBird standalone/server design" Watch "URLyBird standalone/server design" New topic

URLyBird standalone/server design

Diego Manilla Su�rez

Joined: Jan 15, 2006
Posts: 1
Hi. I'm working on my standalone/server design. My first approach would be to have one interface, Server, which would extend Remote, and one implementation, ServerImpl, which would extend UnicastRemoteObject (and implement Server, of course). If the client/server mode were to be selected, I would create a ServerImpl instance and bind it in the RMI registry. Then I would get that instance through Naming.lookup() and pass it to the clients.

So far, so good. My problem/doubt comes with the standalone mode. To keep things simple, I had thought of creating the ServerImpl instance and passing it to the Client instance directly. No RMI involved, but the Server interface would then be extending Remote for no apparent Reason. The same goes with ServerImpl, the extension of UnicastRemoteObject would be completely superfluous, since no RMI would be used.

My question is: do you think this is an acceptable decission or should I spend more time working on a better class hierarychy? I'm not convinced of using it, but the instructions mention that we should keep things as clear as possible and the design mentioned above would be pretty straightforward.

Thanks in advance.
I agree. Here's the link: http://aspose.com/file-tools
subject: URLyBird standalone/server design
It's not a secret anymore!