*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Client requirements Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Client requirements" Watch "Client requirements" New topic
Author

Client requirements

Ian B Anderson
Ranch Hand

Joined: Jun 26, 2001
Posts: 275
Hello,
I've been reading through Sun's documentation and i quote:
"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 suncercify.db.Data class, although it will need different constructors to allow it to support the network configuration"
What confuses me here is why would a DataClient want this kind of knowledge? I want to create clients that simply have basic methods such as getAllFlightDetails(), makeReservation() etc. In a client you would not need getRecord() etc this would be done elsewhere. Also as all communication with the db file would be done either through the Data Class or RMIServerData Class why would a client need these public methods as they are already here in the Data and Server? I may have misunderstood the requirement but my plan was to separate GUI | Client | Server or Data Classes.
Can someone please explain.


<a href="http://www.INESystems.com/scbcd/" target="_blank" rel="nofollow">http://www.INESystems.com/scbcd/</a> - SCBCD Exam simulator<br /><a href="http://www.INESystems.com/scbcd/" target="_blank" rel="nofollow">http://www.INESystems.com/scea/</a> - SCEA Exam simulator
Andras Nemeth
Ranch Hand

Joined: Jul 31, 2001
Posts: 80
Hello Ian,
Actually, the business logic can be either at client or server
side and SUN required it at the client. (smart client)
You do not need to rewrite those public methods just "somehow"
provide them at the client side.(composition, delegation,
adapter pattern or anything else)
Although, I have heard some people who survived with putting
the business logic at server side, I shouldn't say against
the requirement (mainly because they use the word MUST).
Have a rest and a nice weekend!
Bye,
Ban
Ian B Anderson
Ranch Hand

Joined: Jun 26, 2001
Posts: 275
Thank you. I was just re-reading the requirements and started to doubt how I planned to implement my design. You have re-assured me, thanks.
Ian B Anderson
Ranch Hand

Joined: Jun 26, 2001
Posts: 275
Hello,
Am I right in thinking that using composition would require the Client to have an instance of the Data class in the local mode and that would be enough to fulfill Sun�s public methods requirements? However I am unclear how this would be done in remote mode.
If I were to use the Adapter pattern I would have to create a DataAdapter Class.
�This pattern implement�s an interface known to its clients and provides access to an instance of a class not known to its clients.� � Mark Grand, Patterns in Java Volume 1
So the DataAdapter would implement DataBaseInterface and therefore providing access to all the public methods through the DataBaseInterface. It would contain an instance of RemoteServer class.
Then each client would contain an instance of the DataAdapter class, they would have the public method access and have access to the RemoteServer. The RemoteServer object contained in the client would simply be the link to the RemoteServer
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Client requirements
 
Similar Threads
Should lock methods be callable by the client
sun instructions???
Remote client and Data client
Implementaion question.
SwingWorker & packaging