Hi, I have this question based on my SCJD work. If in the remote interface, some return type and parameter type refer to some class definition in server side, what is the proper way to handle it in client side? My instinct tells me it is not a good practice to provide the duplicate class definition in client side in order to make the interface in client side compilable. Thanks in advance --- Jimmy
I am not sure if this will answer your question, but I just imported my db package in my client and packages the db classes with the client... not the most elegant, but definitely the most lazy . I only lost 5 point on the entire project, so take my approach as you will . [ August 26, 2002: Message edited by: Nate Johnson ]
I can see your way works. Is there an elegant way? I appreciate your quick response. Thanks Jimmy
Joined: May 13, 2002
Originally posted by Jimmy Fang: Is there an elegant way?
I think the best way would have been to put the interfaces and stubs right in the client. Maybe some others can talk a bit about the ways they did it? [ August 27, 2002: Message edited by: Nate Johnson ]
My instinct tells me it is not a good practice to provide the duplicate class definition in client side in order to make the interface in client side compilable.
Why? You should strive to decouple the server/db package classes from the client package classes as much as is practical, but inevitably the client will have to have some knowledge of some of those classes. I worked very hard to accomplish that in my design. Data itself was unknown to the client, but DataInfo and FieldInfo were necessary for a couple of classes on the client. I just imported the necessary packages as Nate did and never concerned myself with it. Hope this helps, Michael Morris
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher