So I’m working on a hobby side project with a friend and his preference is to use the Eclipse IDE for the Java development. Eclipse makes things so “easy” that an Ant build script wasn’t included in the source repository. My entire Java development history (4 years or so) has been emacs for editing (and sometimes compiling, I like emacs jump-to-error stuff), and command line (using Cygwin) for the building and source control. So naturally I was a bit “put off” by not having an easy way to build, test and deploy the code (which my friend readily acknowledged).
I spent some time creating a basic Ant script which allowed to build the app. Then the JUnit tests didn’t work, because Ant doesn’t yet have support for JUnit 4. I google’d around for the solution, which was to add a suite() method which makes use of a JUnit4TestAdapter. Most of the tests ran but the ones that depended on external libraries still didn’t work, despite the fact that my classpath was set up properly as far as I could tell.
More and more in my life I prefer to not spend time fighting with my environment, so I gave in and decided that I’d give Eclipse a spin… go to the Dark Side. My friend said I should get the “Web Platform” version, which has integration with the JEE and web framework stuff.
Once I got that installed, it also grabbed the SVN Plugin and pulled the source repository down.
I’m still a bit ashamed to admit it, but I think I like Eclipse for the most part. Everything you can do it in can be done in emacs (or from the command line) with the right modules and whatnot, but really just not as easily.
It’s nice to right click on a class and say “Create webservice” and also generate client stubs. It’ll warn you if the class isn’t compatible with standard WS-I formatting so that you can make sure to create compliant ones (i.e. no method overloading, objects must be easily serializable and public).
It’s nice to add a new method to an interface and be able to “Quick Fix” the concrete implementations to have a default implementation of the method.
Having standard Refactoring patterns available is awesome… having the option to change a method name and have that result in all usages changing is great.
CTRL+Shift+M to add an Import, very nice.
I’m digging on “create setters/getters”. As an aside, I’m going to admit, publicly, that I honestly see no real problem with exposing *properties* as public variables. I don’t actually do it (except for internal classes which I’m treating as structs for keeping some values together) but I honestly find that it is completely unnecessary 95% of the time to actually do get/set vs just allowing access to the method. I’ve also had times when I’m glad that I *did* have the getter, when I needed to delegate it or do some sort of change notification, etc. I’m just saying, that’s usually not needed…
Constant recompiling and the “intellisense” (or whatever Eclipse calls it) for choosing a method is awesome. I worry that those will change my coding style such that I’ll start forgetting how an API looks and will always wait for it to give me the options. I think the auto recompilation could have the effect of ruining my “flow” if I’m consantly trying to fix the all the “red” that shows up during a high speed laying down of an algorithm.
Also, one of the things that has kept me away from feature-rich IDEs is the fear that I’ll “lose touch” with the code. I really like knowing where each and every file is in and how it affects the system. When everything is accessible via a context menu or through auto-generation, I worry that my understanding of how the system really looks will become disjoint. But I’m finding that that fear seems unjustified. Eclipse absolutely doesn’t hide these things from you. When you generate a Webservice, it clearly creates WSDL and service description files. The package structure is readily apparent, you don’t just have a big list of classes with no rhyme or reason (unless you created it yourself, Eclipse certainly isn’t going to).
I’ve been experiencing a lot of lockups, which I think might be related to not giving enough memory (but 256MB should be enough!). I’ll do something trivial like want to create getters/setters and it’ll just stop responding. This happens to me at least once a session. My friend says that this has never happened to him before.
I’m still evaluating and at work I’m still an emacs guy (not that I get to code all that often any more), but if I continue to feel productivity gains from not worrying about the “little things” and can focus on the core algorithms and component interaction, then I think I could become a convert.
… especially once I find the “generate Ant build script” plugin or option.