473,507 Members | 2,377 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Package Naming

Hi,

I am currently redesigning some code of mine and trying to determine
the best way to "package" it. So far I've been doing this more or
less blindly, so I thought I'd consult this group.

Actually, I've never heard the motives or history of java
package-naming conventions (with the orgs, edus, coms, etc). Is the
idea to provide a space of classes that are as organized as possible?
What is the relation between this structure and say, the internet,
where url's end with .com, .edu, etc? Knowing the relevant history
and motives might help me use the conventions appropriately. Pointers
to sites discussing this, or info of any kind, appreciated.

Ok, on to specifics. I have a java-based neural net
(simbrain.sourceforge.net) that I'm currently re-writing. In
particular, I've separated the network model from the rest of the
simulation "view." In the future, two other components (gauges and a
simulated environment) will also be abstracted. Currently (but not on
the site) I have two jars:

simbrain.jar (network GUI, world, gauges, etc)
simnet.jar (neural network model. No graphics, no dependency on
simbrain.jar)

I was planning to build these from two directories:

/org/simbrain/sim/....
/org/simbrain/simnet/....

But I could also use:

/org/simbrain/networkGUI
/org/simbrain/gauge
/org/simbrain/world
/org/simbrain/simulation

and

/org/simbrain/networkModel

respectively.

Any thoughts on my packaging scheme (pitfalls you see looming,
suggestions, better names than "networkGUI" and "networkModel", etc)
would be appreciated. Thanks,

Jeff
Jul 17 '05 #1
1 4445
On Sun, 29 Jun 2003 14:26:16 -0700, Jeff Yoshimi wrote:
Hi,

I am currently redesigning some code of mine and trying to determine the
best way to "package" it. So far I've been doing this more or less
blindly, so I thought I'd consult this group.

Actually, I've never heard the motives or history of java package-naming
conventions (with the orgs, edus, coms, etc). Is the idea to provide a
space of classes that are as organized as possible?
The idea is to make sure that libraries from different companies don't
conflict. With this scheme, you can be sure that a company ABC software
(who has domain abc.com) won't create a package abc that might clash with
one from ABC development (who might have domain abc.net).
What is the relation between this structure and say, the internet, where
url's end with .com, .edu, etc? Knowing the relevant history and
motives might help me use the conventions appropriately. Pointers to
sites discussing this, or info of any kind, appreciated.
There is no relationship. It simply was a convenient way of guaranteeing
unique names.
Ok, on to specifics. I have a java-based neural net
(simbrain.sourceforge.net) that I'm currently re-writing. In
particular, I've separated the network model from the rest of the
simulation "view." In the future, two other components (gauges and a
simulated environment) will also be abstracted. Currently (but not on
the site) I have two jars:

simbrain.jar (network GUI, world, gauges, etc) simnet.jar (neural
network model. No graphics, no dependency on simbrain.jar)

I was planning to build these from two directories:

/org/simbrain/sim/....
/org/simbrain/simnet/....

But I could also use:

/org/simbrain/networkGUI
/org/simbrain/gauge
/org/simbrain/world
/org/simbrain/simulation

and

/org/simbrain/networkModel

respectively.

Any thoughts on my packaging scheme (pitfalls you see looming,
suggestions, better names than "networkGUI" and "networkModel", etc)
would be appreciated. Thanks,


Beyond the org.simbrain, there really are no general rules. Larger
companies use division names or the like after the domain name to avoid
in-house clashes. Other than that, you can choose whatever you like.
Packages do not distinguish between sub-packages, or packages in a
completely different hierarchy. The only technical difference is whether
the package is "identical".

--
Keep American Families united! Support H.R. 539 and H.R. 832
For more information, see http://www.kkeane.com/lobbyspousal-faq.shtml

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5298
by: G. Ralph Kuntz, MD | last post by:
Step on my soapbox... :-) I believe that the "final" keyword is underused in Java. I have gotten into the habit of using it on EVERY method parameter, instance variable, and local variable...
23
2125
by: Yannick Patois | last post by:
Hi, Under some naming conditions of module files, it seems that python lost class static variables values. It seems only to append when importing a "badly" named module that itself import a...
4
495
by: Thomas Lotze | last post by:
Hi, I've two questions concerning organizing and naming things when writing a Python package. - Naming of classes: I'm writing a library that reads PDF files. I have a data structure that...
23
2187
by: Rotem | last post by:
Hi, while working on something in my current project I have made several improvements to the logging package in Python, two of them are worth mentioning: 1. addition of a logging record field...
3
2817
by: shorti | last post by:
running on AIX with DB2 v8.2.2 I ran across a problem with naming source files with similar names. For instance, if I have these three files: upd_startaccessingdb.sqc upd_startusingdb.sqc...
10
2585
by: vivekian | last post by:
Hi , New to dot net and C# and was wondering what is the equivalent of a java package in dot net ? thanks, vivekian
8
6143
oll3i
by: oll3i | last post by:
it worked but suddenly when i run it and click a button it throws exception ? D:\SR>java Producent queue1 queue2 queue3 queue4 queue1,queue2,queue3,queue4...
0
802
by: Marcus.CM | last post by:
Hi, Actually i think its the email package that needs to be "redefined", using lazyimporter is a bad decision and a lousy one. Even py2exe could not handle it correctly. Marcus. Wingware...
12
1538
by: Abhishek Mishra | last post by:
Hello Everyone, I have the habit of using domain names (of either the application or company) in reverse in package names. for e.g. com.spam.app1 I've recently started a project for an...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
7031
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7485
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5042
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1542
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
760
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.