• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Client Interface

Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have decided on an Adapter pattern for my RMI to clients for reasons discussed elsewhere.
Now I wonder, what shall I offer in my client interface...

method needed in thin client offered in DBAccess

CreateRecord not needed y
DeleteRecord not needed y
UpdateRecord -> BookRecord y
ReadRecord needed y
SearchRecord needed y
CountRecord needed n

CountRecord is a method for retrieving the size of my AbstractDataModel.
Of course, I can let my client retrieve all the records once, and then record their count, but this is very awkward.

So, then this remains, what to offer in the interface ???
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Frank,

I think there can be several schools of thought:

  • Provide only what is absolutely required. This will get you the leanest code and you will not risk introducing errors in parts of the code that you don't even plan to use.
  • Provide as much as possible. Then you can claim maintainability, because extension of client functionality can in many cases be done without needing to change your server.

  • I choose the second way. Not even so much for the maintainability reason, but mostly because this allowed me to use a test client that can access all server functionality, especially the functionality that I could not test using the GUI client, such as the delete and create methods.

    You totally ruined the moon. You're gonna hafta pay for that you know. This tiny ad agrees:
    a bit of art, as a gift, that will fit in a stocking
      Bookmark Topic Watch Topic
    • New Topic