Board index » jbuilder » class path

class path


2004-01-30 12:19:37 AM
jbuilder2
if we are firm with domain name "microstep-mis.com" ,
what is better to use as path for classes in jar packages:
com.microstep.mis
or
com.mis.microstep
?
Can by used
com.microstep-mis
or rather
com.microstep_mis
?
thx
5o
 
 

Re:class path

Peter Misun wrote:
Quote
if we are firm with domain name "microstep-mis.com" ,
what is better to use as path for classes in jar packages:
com.microstep.mis
or
com.mis.microstep
?
Can by used
com.microstep-mis
or rather
com.microstep_mis
?

thx
5o


You aren't really talking about classpaths here. It's package naming.
In general, I find that I get grumpy when using code that fails to
follow the naming conventions in the Sun Java Coding Style guide. But
that's just me. The use of "_" is strongly discouraged.
wwws.sun.com/software/sundev/whitepapers/java-style.pdf
--
Regards,
Lori Olson (TeamB)
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
www.google.ca/advanced_group_search
Other Newsgroup Searches:
www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
www.visi.com/~gyles19/fom-serve/cache/1.html
 

Re:class path

On 1/29/2004 at 9:20:26 PM, Lori M Olson (TeamB) wrote:
Quote
In general, I find that I get grumpy when using code that fails to
follow the naming conventions in the Sun Java Coding Style guide.
But that's just me. The use of "_" is strongly discouraged.

wwws.sun.com/software/sundev/whitepapers/java-style.pdf
The /Java Coding Style Guide/ that you link to suggests that you should
*generally* not use underscores. However, it also indicates that you
should follow the scheme suggested in the /Java Language Specification/.
The /Java Language Specification/ says:
In some cases, the internet domain name may not be a valid package
name. Here are some suggested conventions for dealing with these
situations:
* If the domain name contains a hyphen, or any other special
character not allowed in an identifier (?.8), convert it
into an underscore.
* If any of the resulting package name components are keywords
(?.9) then append underscore to them.
* If any of the resulting package name components start with
a digit, or any other character that is not allowed as an
initial character of an identifier, have an underscore
prefixed to the component.
So the correct answer is "com.microstep_mis".
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
www.JPMcGrath.net/newsgroups/e-mail.html
 

{smallsort}

Re:class path

John McGrath [TeamB] wrote:
Quote
So the correct answer is "com.microstep_mis".
And of course, rules are made to be broken :-).
Certainly if the code you're creating is going to be exposed to the
outside world, you want to be rigorous in your package naming. For
internal-only code, you can get away with whatever convention you
choose. For instance, you can abbreviate your company name (com.msmis...).
(Just don't pick an ALL.CAPITALS.NAME :-).
 

Re:class path

On 2/2/2004 at 4:03:35 PM, Shankar Unni wrote:
Quote
And of course, rules are made to be broken :-).
Sometimes it makes sense to break the rules, but you really should go
along with these rules unless you have a *really* good reason not to.
Quote
Certainly if the code you're creating is going to be exposed to the
outside world, you want to be rigorous in your package naming. For
internal-only code, you can get away with whatever convention you
choose. For instance, you can abbreviate your company name
(com.msmis...).
Internal code sometimes becomes external code, so I do not think that
is a good idea, *unless* you own the domain name "msmis.com".
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
www.JPMcGrath.net/newsgroups/e-mail.html