Forums Register Login

About client-server interaction...

+Pie Number of slices to send: Send
In my design, the Data class is fully encapsuled in a DataFactory, which is in turn used by a <Remote/Local>BusinessService that implements the interface BusinessService:
Collection findByCriteria(Criteria criteria);
Bookable book(Bookable bookable, BigInteger requested seats);
In this way, the client does not call directly the criteriaFind or getRecord method(it doesn't know anything about how the data is retrieved), but it iteracts with a command pattern which uses a remote or local BusinessService and return the business object (an object which implements the Bookable interface).
Is that design wrong?? The instructions.html says : "The remote client code should implements all the public method of the Data class".
I think the client code shouldn't know the method getRecord, criteriaFind. The server(local or remote) should must hide this details providing any method like book, findByCriteria, findByPrimaryKey, etc...
Thanks everyone...
+Pie Number of slices to send: Send
Andrea,
I can't be sure, but I think you're on the right track: it sounds like you're pretty much providing an Adapter pattern, which is pretty much what you want to do.
All best,
M, author
The Sun Certified Java Developer Exam with J2SE 1.4
+Pie Number of slices to send: Send
Thanks Max...
I knew I would regret that burrito. But this tiny ad has never caused regrets:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 606 times.
Similar Threads
confused with my design,thanks for you comment
FBN Design
Final review....some doubt
RMI server questions
FBN : Exception in High level Data Interface
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 08:59:01.