• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

An Age-Old Problem: Having a Remote Object implement a non-Remote interface

 
Paul Tongyoo
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello JavaRanchers--

I've been searching this forum for almost an hour and haven't been able to interpret any concensus on the best design solution for this problem: Having my RemoteObjectImpl (which needs to throw RemoteException) implement my Data interface (which does not need to throw RemoteException). Rancher veterans-- what has been the best approach to this problem?? Ideally, I do not want my Data interface to throw any additional exceptions since it's functions shouldn't need to.

Now FYI, this is NOT for the SCJD exam -- as an attempt to pound my SCJWCD work into my head, I'm refactoring my SCJD app so I could build a JSP/Servlet interface to the business tier in place of the original Swing front-end. So I would love to hear *any* design suggestions (not bound by Sun's specs)! I just figure I'd post my question here since many SCJD'ers may have solved this problem.

Thank you in advance!

Paul

[ May 30, 2004: Message edited by: Paul Tongyoo ]
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11852
185
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,

I did a similar exercise when I was studying for SCWCD - try to use every single item I was studying in SCWCD in a SCJD front end. The end result was something like the Java Pet Store - a good example of every bit of the technology, but a bad example of how to write a real web application . But it served it's purpose.

But what I decided early in the exercise, was that it makes no sense to rewrite the back end, or indeed, any of the logic. I wanted to use this for SCWCD, not as a core java learning exercise.

My original application used an MVC design (well, an HMVC design, but let's not get picky ), so all I needed to do was develop logical views and controllers which connected to my existing model.

I did not go back and refactor the network interface at all - doing so would have (IMHO) distracted me from SCWCD.

Regards, Andrew
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic