Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #24562
| X-Received | by 10.224.205.138 with SMTP id fq10mr28804034qab.1.1372724525897; Mon, 01 Jul 2013 17:22:05 -0700 (PDT) |
|---|---|
| X-Received | by 10.50.20.136 with SMTP id n8mr911103ige.5.1372724525834; Mon, 01 Jul 2013 17:22:05 -0700 (PDT) |
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!y2no50582qax.0!news-out.google.com!f7ni507qai.0!nntp.google.com!y2no53323qax.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.lang.java.programmer |
| Date | Mon, 1 Jul 2013 17:22:05 -0700 (PDT) |
| In-Reply-To | <kqssv3$dfm$1@speranza.aioe.org> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=69.28.149.29; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T |
| NNTP-Posting-Host | 69.28.149.29 |
| References | <kqssv3$dfm$1@speranza.aioe.org> |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <be0ea9dc-489d-451b-8d74-5214e048f67b@googlegroups.com> (permalink) |
| Subject | Re: Package naming, disk organization |
| From | Lew <lewbloch@gmail.com> |
| Injection-Date | Tue, 02 Jul 2013 00:22:05 +0000 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Xref | csiph.com comp.lang.java.programmer:24562 |
Show key headers only | View raw
Dave wrote: > I'm having fun with Java (really!), but the real-world use of packages > is driving me crazy. If I were a corp. with a web site I might have a > something like this: org.davesjava.firstlgproj for a package > specification. I guess the disk drive files would be something like: > home/org/davesjava/firstlgproj (I use Linux, so there are no '\'). The disk drive organization in most Java implementations matches the package organization, rooted at a directory mentioned in the class path. > However: > > * I don't have a commercial organization (yet), so I would need Irrelevant, as others have told you. Use the domain you would have if you had one. Who says you have to have a commercial organization to have a domain? Who told you you had to have a domain to use it as your package name? The only rule is that you cannot use someone else's. > something else - but what? Would jsoft.davesjava.firstlgproj be ok? It The first element should be a top-level domain, like "com". Do not use the word "java" in your package names. What's the point? If it isn't Java it isn't in your Java program. Also, "Java" is trademarked. > seems to work for one trial, but down the road... What exactly do you fear? What evidence led you to that concern? > * I read that Java programmers like to have a source path and a class Huh? Java programmers don't "like" anything. We do what the platform calls for. > path on the hard drive, which makes sense. So how does that work for > package specifications? Would it be: src/jsoft/davesjava/firstlgproj Is "src" in your classpath or sourcepath? > and class/jsoft/davesjava/firstlgproj ? Assuming so, would a package Is "class" in your classpath or sourcepath? The first element of your package name by convention should equate to a TLD. Use "com", typically. > specification of jsoft.davesjava.firstlgproj still be ok? > > * There is a conflict between a simple file structure and a conventional > package specification. For example, I may like: No, there isn't. > home/jsoft/src/firstlgproj and home/jsoft/class/firstljproj , but that > translates into jsoft.class.firstlgproj - not exactly to convention. Don't use "class" or "package" or "java" or any garbage like that in your package names unless there is a specific semantic to the use of the term. The fact that there are classes in a package does not need reinforcement in your names. It only serves to add clutter to do that. > So, I'm looking for some suggestions from people that have been there > done that. What does the documentation suggest you do? -- Lew
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Package naming, disk organization Dave <dboland9@fastmail.fm> - 2013-07-01 17:39 -0400
Re: Package naming, disk organization markspace <markspace@nospam.nospam> - 2013-07-01 15:22 -0700
Re: Package naming, disk organization Martin Gregorie <martin@address-in-sig.invalid> - 2013-07-01 23:56 +0000
Re: Package naming, disk organization Roedy Green <see_website@mindprod.com.invalid> - 2013-07-01 15:35 -0700
Re: Package naming, disk organization Roedy Green <see_website@mindprod.com.invalid> - 2013-07-01 15:36 -0700
Re: Package naming, disk organization Lew <lewbloch@gmail.com> - 2013-07-01 17:22 -0700
Re: Package naming, disk organization Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2013-07-02 18:51 +0300
Re: Package naming, disk organization Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-07-18 23:50 -0300
Re: Package naming, disk organization Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-07-01 21:30 -0400
Re: Package naming, disk organization markspace <markspace@nospam.nospam> - 2013-07-01 18:43 -0700
Re: Package naming, disk organization Dave <dboland9@fastmail.fm> - 2013-07-02 11:09 -0400
Re: Package naming, disk organization Arne Vajhøj <arne@vajhoej.dk> - 2013-07-03 22:53 -0400
Re: Package naming, disk organization markspace <markspace@nospam.nospam> - 2013-07-03 20:35 -0700
Re: Package naming, disk organization Dave <dboland9@fastmail.fm> - 2013-07-04 12:34 -0400
Re: Package naming, disk organization Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2013-07-04 20:08 +0300
Re: Package naming, disk organization lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-07-04 18:24 +0100
Re: Package naming, disk organization Lew <lewbloch@gmail.com> - 2013-07-04 11:26 -0700
Re: Package naming, disk organization Arne Vajhøj <arne@vajhoej.dk> - 2013-07-04 15:42 -0400
Re: Package naming, disk organization Martin Gregorie <martin@address-in-sig.invalid> - 2013-07-04 20:40 +0000
Re: Package naming, disk organization Lew <lewbloch@gmail.com> - 2013-07-04 14:01 -0700
Re: Package naming, disk organization Arne Vajhøj <arne@vajhoej.dk> - 2013-07-04 17:06 -0400
Re: Package naming, disk organization Arne Vajhøj <arne@vajhoej.dk> - 2013-07-04 15:39 -0400
csiph-web