(setq t nil)
"Most men lead lives of quiet desperation and go to the grave with the song still in them." -Henry David Thoreau
Author: Matt Stancliff (matt@cc.gatech.edu)
Last Updated: 11/17/2002
Questions? If any of it is vague or I have invalid points, please
let me know :)
We need to work out what is where in the CVS. Right now there are duplicate
files in the /src and /pre_src directory.
Anything can go in the src directory as long as it compiles! There is *no*
reason to ever put non compiling code into the source directory. If it doesn't
work, it's not complete enough to be put there.
If something does not compile because of whatever reason, do not put it in
the source directory. If you put something in the source directory, do not
break it. If you put something in the source directory, keep it there. (Don't
copy a version to /src and keep working in /pre_src)
So, make sure everything committed compiles before committing.
Sidenote: Point of CVS
The point of a CVS is not to show a thought or pre-production process.
A CVS is best used to make the code available to everyone in an easy
fashion. Throwing around code that doesn't compile isn't much of a
use to other people.
Also, packages are *great* and packages make for a nice layout.
Quick intro to packages:
Packages follow a hierarchy of directories.
Directories are delimited by '.' in Java because it is multi-platform
and different platforms have different directory delimiters.
Packages are declared before any import statements and before the class
comment:
package go.server;
import blah.blah.*;
/**
* A class in the go.server package
*
*/
All source files require a package statement if you make one element
in a directory a member of that package. So, everything
in the go/server directory will need to have that same package
statement.
The rest is what everyone is used to. To use something out of
the go.server package from outside the go.server package, you
just have to "import go.server.*;" and then you can access all the
files.
So, in summary:
* Packages = good
* It would be great if you could add your things under the
proper directory or make new ones under src/go/
* Don't clutter other people's package space.
* If go.server.chat exists, don't add things to go.server.chat without
talking to who made the package first.
With packages declared, you have to run the files so Java can see the whole
class path.
So, you would run the ChattableClient (in go.server.chat) as:
(assuming you ran ant and it compiled everything in build and
subdirectories of build)
cd build
java go.server.chat.ChattableClient
Then, java does the magic of converting '.' to the proper directory
modifier.