For the past decade or so I've been working with .NET almost exclusively, so I'm hoping this journey out from under the Microsoft shadow will be most informative. Here are my experiences so far:
Finding the right downloads.
It was slightly confusing at the Eclipse download page as to which download I really needed. I knew I wanted to focus on desktop applications initially so that means Java Standard Edtion (JSE) rather than Java Enterprise Edtion (JEE).However there is an "Eclipse Standard" download as well as an "Eclipse for Java Developers" download and the descriptions of both did not clarly differentiate which would be better for me, based on my needs. However Eclipse Standard had 6 times as many downloads and was about 50MB larger so I decided to ho with that.
After reading the Eclipse forums, I understand that Eclipse is best seen as a container for various packages, and that it is the packages that provide the most functionality. Therefore don't get too caught up about the specific initial download. You can just add and remove packages later.
The JRE and JDK
My system already had both the 32 bit and 64 bit Java Run-time Environment (JRE) installed and up to date. So nothing further to do here.However Eclipse doesn't actually include the Java Development Kit (JDK). The JDK can be downloaded separately from Oracle. Before you download it, be aware that it is not actually required to create and run Java programs because the Eclipse installation includes the Java compiler.
I downloaded the JDK anyway as it contains the source code for the system class libraries as well as additional tools that build and version control systems (Maven etc) rely on. To this point it looks like Eclipse only cares that the JRE is installed, it appears to have no direct dependency on the JDK.
Installing Eclipse
The Eclipse download was a zip file rather than an installer so it's up to you where you put it on your system. I have a base development directory containing subdirectories for my .NET projects and other languages. So I just created a Java / Eclipse directory under this and unzipped Eclipse here. In this directory is the Eclipse.exe executable, which can be run directly or shortcut/s to it created and placed wherever you find convenient.
On first running Eclipse it asked me to open an existing workspace or create a new one. So I created a new workspace directory: Java / Workspace. Don't know if this is the best structure but it works for me so far and allows me to easily include Java in my backup procedure.
Initially I thought that a Workspace was a more general concept than the 'Solution' in .NET and so I created one Workspace under which all my Java projects are then created.
Right now however I feel that a Workspace is closer to a Solution than I first thought. For example: Eclipse defaults to showing all errors and warnings for all projects in the curent workspace. That means if you have unrelated projects under the one workspace, by default, you see the warnings and errors for those projects too.
Also, the Eclipse 'package explorer' shows all projects under the workspace, although you can easily expand and collapse these as required. I think I may need to review my workspace structure in future.
First Impressions of Eclipse
In short, I've been very pleasantly surprised. Here's what I've found most impressive:- A nice range of built-in refactorings. I particularly like the "no context switch" rename refactoring that I use daily.
- Powerful code navigation and search tools such as find references, write/read accesses, implementors etc, once again all built-in.
- Hot Code Replace. Run your application, make changes to source code within methods/functions while running, save and watch the changes immediately take effect in the running application. This is what "fast feedback" is all about.
- Keyword searchable options/preferences. Why is this not mandatory in all large or complex applications? This has been an enormous help to avoid minutes at a time hunting around for some obscure setting.
- Key shortcut configurability. Although I'm trying to learn Eclipse key shortcuts, it is happy to let me change the key used for any command I require.
- The Javadoc context window that provides documentation on the system classes and can focused and expanded unlike a simple tooltip.
- Solid and flexible window layout control. I can move and dock/anchor windows exactly where I want them.
- Solid multi-monitor support. Tool and navigation windows stay exactly where I want them and can have layours for different usage contexts such as when debugging, editing and so on.
- Adding new packages has been simple using the IDE integrated online marketplace.
Things that could be better:
- I like a darker background syntax highlighting scheme for the text editing window. This is certainly possible, however it is much harder to change the color scheme used for the rest of the IDE (ie tool windows, package explorer etc). Having a dark background editor window while the rest of the IDE is bright white is hard on the eyes. (It looks like Eclipse has recently moved to a CSS like styling system that I believe gives control over this, with a little tinkering).
- Content assist (ie: Intellisense) gives useful contextual feedback and information. However it seems to become confused and stops working in certain java files. I found that closing the file and re-opening it brings it back again though.
- There seems to be a bug in Kepler that means an exception window is not displayed for runtime exceptions. This means I have to look at the Debug window, or the Output window for information on what went wrong. Hopefully this is fixed soon.
- While debugging it is not possible to "Jump to a statement" (change the current instruction pointer) as I could in Visual Studio. You can return to the start of the current function though.
Comparison to Visual Studio.
After years of working with Visual Studio up to version 2010 I have become increasingly frustrated with the view that Visual Studio is by far the best IDE available.Don't get me wrong, it is a servicable IDE with a powerful debugger, good visual designers and is much more productive than a text editor, once you learn its quirks. However it is also patently obvious that without third party extensions such as Resharper (and others) it is, at best, nothing special, and at worst, over-priced and lacking usability.
Resharper is a powerful aid, that is if you have at least a 4+ Core, 16GB RAM+ machine.
Right now I can't afford to upgrade my current Dual Core 3.3 Ghz, 8GB RAM Windows 7 64bit PC. Resharper brings Visual Studio almost to a standstill on this machine. Background compilation can be turned off, but Resharper loses much of its power without it, so whats the point in spending $100 for it.
While I realise Eclipse is probably not doing background compilation, in Eclipse I can at least have good refactoring support and a snappy responsive IDE at the same time without upgrading my perfectly good current PC.
Over the years I've tried fixing frustrations I've had with Visual Studio myself. I've written extensions, macros, configurations etc, but have either found the core issue can't be fixed or the time and effort required to do it is excessive.
A common refrain from fellow .NET developers was, "oh, I've heard that they fixed that in the new VS 20XX)". Sadly, it very rarely was. Of course each new version introduces more flashy visual designer support for Silverlight, WPF, ASP.NET MVC etc. In my opinion they need to focus on the basics of usability again instead of flashy new features, but I know that's not going to happen.
Finally
So that's it for now, thanks for reading.My primary goal here was to give an overview of my first impressions of Eclipse and Java (as it stands in October 2013) from the point of view of a (possibly cynical) .NET developer. Hopefully it was informative? I also feel there are a lot of opinions and views regarding Java (both in my head and in the wider .NET community) that I intend to examine for basis in reality.
It's funny, but not only has the experience been pretty smooth and painless so far, it's making aspects of Visual Studio and .NET look very ordinary in comparison.
I've focused on Eclipse in this post, so perhaps next time I'll look at Java itself.
No comments:
Post a Comment