Forums Register Login

Distribution of the packages

+Pie Number of slices to send: Send
Hello ,

I have a doubt about the distribution of the packages with respect to the server.

I explain us: I want to do a small interface graphic for the server. I have the distribution to the package to the following form:

-suncertify.db
-suncertify.gui
-suncertify.networked

My quiestion is , If I start the server on the one hand and on the other hand the client.I must put the classes of the server in packages differents from those from the client.

Thanks in advance.
+Pie Number of slices to send: Send
Well, for your reference, I put all classes related to GUI in the same package.
+Pie Number of slices to send: Send
what about making packages suncertify.gui.client and suncertify.gui.server to contain code that's not shared between client and server?
+Pie Number of slices to send: Send
indeed , this is my question , that I don,t Know if is correct that I put the classes in the same packages if don't share code,
+Pie Number of slices to send: Send
Hi Irene,

From the Sun Creating and Using Packages tutorial:
Definition: A package is a collection of related classes and interfaces providing access protection and namespace management.



Classes do not have to share code to belong in the same package. A package can be thought of as a logical grouping of classes - so I could decide that I might throw Sockets based code and RMI based code into my suncertify.network package, even though they do not share code. This can work well with a small project like the SCJD assignment.

For a larger assignment you might want to consider breaking down the package responsibilities further. So you might want to have suncertify.network.Sockets for pure Socket based code, and suncertify.network.RMI for RMI based code, and any common code (e.g. a Factory) in the common directory.

Regards, Andrew
+Pie Number of slices to send: Send
Ok , this means that it isn,t problem to use the same packages for the server and for the client , always that these classes have a logical relation (bd , networked...)

Irene.
It will give me the powers of the gods. Not bad for a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 666 times.
Similar Threads
Downloading the struts scaffold package
Saving cookies with JSP and JavaBeans
how to upgrade Linux kernel from Fedora 2 to Fedora 3?
Head First Software Development (2007)
packages in component diagrams
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 02:21:51.