Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get record number?

 
Ray Cheeny
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In my network design,I have a method dobook(DataInfo data,RemoteInterface remote) in my client.But how can I get the record number?
Could I invoke the DataInfo.getRecordNumber() in the client?I'm not sure wether the client has the
DataInfo.class?
 
Ying Ren
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure what you are asking. But I know both client and server will have datainfo class. So don't worry about that.
YING REN
 
Ray Cheeny
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I am confused about the visibility of DataInfo and FieldInfo class. they should belong to suncertify.db, and invisible to Client( in network mode). but they are required by spec. to return to the Client.
I see somebody do that with a vector.
Is that right?
How about you?
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am confused about the visibility of DataInfo and FieldInfo class. they should belong to suncertify.db, and invisible to Client( in network mode).

Why should they be toatally invisible to the client? They are utility classes and, as I see it, fair game to use as you see fit.
Michael Morris
 
George Lawniczak
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I too felt that DataInfo and Data should be invisible to the client. My rationale is what if the database is swapped out? Although I certainly could see where the assignment doesn't require it. I am just not comfortable with having a client rely on the internal workings of the database. So basically I created a kind of "JDBC-light" protocol to handle my database access.
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I too felt that DataInfo and Data should be invisible to the client.

If you use a Facade on the client that knows of DataInfo and FieldInfo but no other classes in the client have such knowledge, why is that a problem? Somewhere, at some point, some class is going to have to deal with translating those classes into something meaningful. If the the database is changed out, you change one class and bingo, back in business. No matter where the translation occurs, some class or classes will require adjustment if databases are changed.
Michael Morris
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic