Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Client Server Packaging !

Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI friends,
I am in the initial stages of my assignment and am a bit confused about the structure of client , server and db packages and also about the contents of client and server executable jar files.
I am thinking of putting the Data and support files along with db.db file in the db package and will include this package with both the client.jar and server .jar files along with the requisite client and server packages.
My structure is as follows:-
Client package contains:
ServerPackage contains:
RemoteData (impl class)
RemoteDataService (remote interface)
db package contains:

Client.jar will have both the db and client package,while server.jar will have both the db and server package.Is this the right approach pls do send in ur inputs.
Thankx for reading this msg,
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That looks fine. Just make sure your package names are all lowercase. Also, moving db.db up to the root directory would probably be simpler so you could hardcode a default location just using the filename as opposed a path which involves File.separator, and most java projects I've seen try to keep the source code isolated with the exception of package.html (thanks, Sun!). Finally, I would imagine the client jar would need the code in the server package as well, unless you're doing dynamic class loading, which I would not recommend.
Vikas Sood
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pete,
thankx for ur reply.
I was also thinking of puting my db.db file at a diffrent location than inside the db package,so as to make the db package more generic,and also as u have mentioned i can straight away choose the db file directly.
As for the package names they are all lowercase as u have also suggested.And my client .jar will also have the stub required for rmi.But there is another doubt in my mind that is the contents of my client.jar will then have three packages as:
a)client package containing client classes and gui.
b)server package containing stub classes.
c)db package containing db access classes.
apart from having the db.db ile at the root.

server.jar consistes of:
a)server package containing all the server specific classes including the skeleton classes.
b)db package containing db access classes.apart from having the db.db ile at the root.
Am i right with my presumptions or am i missing something.
It would give a normal human mental abilities to rival mine. To think it is just a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic