Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Class naming convention



Excellent! Eclipse is sounding better every day, especially if it helps around Java's refactoring deficiencies. Thanks for the pointer.

Ian

On 01/09/2006, at 10:23 AM, Bill Stackhouse wrote:

No matter how careful you are when you start, there is no way to truly know what the final package tree will look like. This is exactly where a Java IDE like Eclipse earns its keep. It moves the source, changes the package name, changes all the import references that need to be changed, even creates any new directories that are needed. So cool.

Also remember how difficult it is to rename classes, or method and member names when you have 12 different things called the same thing? Well again Eclipse does the 'right' thing since it knows which name is which rather than just doing a straight text replace.

Bill

At 9:47 AM +1000 9/1/06, Ian Joyner wrote:
I think you are best off trying to use this convention and if you can use it from the start well and good. However, as Niklaus Wirth observed, we end up growing systems rather than designing the finished product. So most things get refactored. A common case is where do you put all those little utility routines you get. I decided to refactor some of this last week, only to find Java's package mechanism is really brittle. You have to revisit every file's imports (rather than this being done in a meta place with overall project information).

So I started out trying to do the perfect package scheme and ended up with a compromise just to keep things working, although this was not without pain of classes and methods not found - not at compile time, but at run time. Ugh!

Ian

On 31/08/2006, at 6:02 AM, bsd5tu1 wrote:

How many out there really adhere to the class naming convention (example com.mycompany.myproduct.XXX.java) for actual products? Why or why not?

I've always disliked using packages when possible because to me it seems Java ties the package with a directory structure too tightly. Sometimes I like to arrange things in order to just "tidy up" things but doing so often ends up causing packaging problems.

Just curious,

Thanks in advance.


_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Class naming convention (From: bsd5tu1 <email@hidden>)
 >Re: Class naming convention (From: Ian Joyner <email@hidden>)
 >Re: Class naming convention (From: Bill Stackhouse <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.