Tuesday, November 4, 2008

Using Eclipse for RCP Application Development

Eclipse is free and open-source software that people mainly use to write Java code and develop Java-based programs called Rich Client Platform (RCP) applications. Eclipse is an excellent, if not the best, Integrated Development Environment (IDE) for Java development. The goal of this article it to help anyone who is interested in creating computer applications, even if they never wrote a single line of code in their life before, to decide if Eclipse is right for them.

One popular RCP application created with Eclipse is Vuze, formerly known as Azureus, a BitTorrent client shown at right. A Rich Client Application can be a full-blown program with a menu bar, icons, toolbars, status bars, etc. It can have tabs, tables, buttons, charts, text boxes, wizards, preferences, dialog boxes, and more. It can be multi-threaded and there are virtually no limitations to your creativity. You could create your own version of Photoshop or just simple a program that plays your favorite song when you open it up. Anything is possible.

If you ever used Microsoft's Visual Studio for developing Windows applications with C#, Eclipse is like Java's version of an application used to develop other applications. I started using Microsoft Visual Studio back in 2005, but have since switched to Eclipse. Eclipse matches my programming philosophy and meets my needs much better than VS for the following reasons.
  • With Eclipse, you can develop your application once, and create exports for Windows, Mac, and Linux no matter what operating system (OS) you use as your development computer.
  • I found that creating an exported product with icons and everything to be much easier and intuitive with Eclipse.
  • Eclipse is free and open-source. Microsoft makes you pay for the IDE if you want the full-blown professional version. I like open-source.
I also think VS has its strengths over Eclipse:
  • The learning curve in creating your first application is much steeper with Eclipse. Getting used to the Eclipse IDE can be frustrating because it has many quirks, that until you figure out, you may spend a lot of time banging your head against the wall. I also found the classes used to simplify the layout of your GUI widgets (i.e. buttons, text boxes, graphics) were better designed in VS.
  • Online documentation and available quality books is much better for VS and programming Windows applications in C#.
All in all, I'm very glad I took the plunge and learned how to use Eclipse to develop RCP applications, and I don't miss VS at all. Some people argue that Java is slow, but I personally believe that is wrong. I've run my own similar C# and Java applications on a Windows system and I can't tell a difference. Java on a Mac and Linux is also very fast.

Another observation that I made is that an Eclipse RCP run on a Windows box will be slower than the same exact application run on a Mac or Linux machine with similar specs. After converting a Windows computer to a Linux computer, the application ran twice as fast and caught up to my other Mac and Linux machines. That's not saying Java is slow on Windows, just that Mac and Linux may be superior operating systems for Java applications. But in most cases, the difference will be negligible. The beauty of Eclipse is that you can choose whatever OS you like!

I want to write about my experience with Eclipse and help others avoid some of the frustrations I had getting started. It's my way of giving back to the people involved in making Eclipse possible because I've used it and enjoyed it a lot. So go ahead and download Eclipse and get started on your applications.


You'll want to download "Eclipse for RCP/Plug-in Developers", unzip it, and place it in an easy to access location in your file system. You can double click the Eclipse IDE launcher icon to open up Eclipse. Also make sure your computer has the Java JRE (Java 5 JRE or above) installed. If you have a Mac or a PC running Ubuntu (not sure about other Linux distros), it will already be installed. I like to make a shortcut on my desktop or drag the launcher icon to the dock (Mac).


You should be greeted with a splash screen as Eclipse loads...


and then the Welcome Page.



Next---> Hello World with Eclipse RCP - Your First Application
Also see: Eclipse RCP Tutorial Table of Contents

No comments: