This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bad design ?

 
James Clarke
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am designing a client-server application that registers an object containing swing components with RMI registry for retrieval from the client side. The object containing the swing component will be remote and serialized...

The object will be retrieved from the client side and the swing components will be used for the GUI...

Is this bad design practice ? I am thinking that passing swing components over the network is a bad idea...

thanks,
J.C
 
Greg Fidster
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll be a lot happier designing it so the remote service passes only data. Let the client side decide how to present the data. Your Swing application will use JTables and such, but another application can use the same service and display the same data in html or some use it in a batch process. Even if you never ever have plans to use this data in any other view, this excercise will lead to better design (separation of responsibilities, MVC)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic