What I ll cover


What I'll cover

Eclipse

The first big topic in the book is Eclipse. Indeed, that's probably the reason you bought the book ”to learn how to use Eclipse. Eclipse is a huge application ”a set of applications, really ”and since it's an Open Source project, it's constantly evolving and growing. You'd literally need thousands of pages of documentation to keep up with everything, but as with all such applications, you will use only a small part of the entire application in your day-to-day activities.

Without any features added, Eclipse doesn't do much of anything. It is really just a common framework onto which you can attach tools. However, Eclipse comes with a couple of standard features. One is the Plug-In Development Environment (PDE), which we won't be covering in this book. The other is the Java Development Tooling, or JDT, which is our focus. The JDT is the standard Eclipse Java IDE.

The primary tasks for any IDE are managing, editing, compiling, and debugging code. In this book, you will:

  1. Create a Java project

  2. Enter source code and edit it

  3. "Compile," run, and debug an application

I put the word compile in quotes, because the JDT automatically compiles source when you save it. It's important to remember, though, that Eclipse is not simply about Java development. The Java Development Tooling feature is just one of many features that can be added to Eclipse.

As you read this, people are working all over the world adding other features to Eclipse. These plug-ins will add all sorts of new capabilities, from support for additional languages to extra options such as Google searches or even an MP3 player. [2]

And the wonderful thing about it is that if these features are written in the spirit of the Eclipse framework, then it will be easy for you to learn to use them, because you will already be familiar with Eclipse. In this book, you will learn the features that all Eclipse applications share and the common operations and actions that can be used with any well-designed Eclipse feature.

The Java Development Tools (or JDT)

While I will teach you the common aspects of the Eclipse environment, I do want this to be productive, and so most of your time in this book will be spent in the JDT. The JDT is as close to a "base plug-in" as you will get; the developers of Eclipse put a lot of work into the JDT. Each new release of Eclipse includes an updated JDT, and I think the JDT is one of the primary testing grounds for the SWT (which I'll get to in a moment).

The JDT is IBM's replacement for the Visual Age for Java IDE (which was, in my opinion, the best Java IDE available). It's no coincidence that one of the primary teams behind Eclipse and the JDT is a company called Object Technology Inc. (OTI), the same folks who brought you Visual Age for Java. This is a very bright, very innovative group of folks.

The Software Widget Toolkit (or SWT)

One of the biggest innovations from the Eclipse team, an innovation that grew out of OTI's long experience with graphical interface design, is the Software Widget Toolkit or SWT.

The JDT is the next generation of Visual Age for Java. One of the problems with VAJ was that it was pretty platform-specific. That was because it used a very complex and sophisticated UI. The OTI team figured out a way of combining the run- anywhere nature of Java with the performance of native GUI routines. While there is great debate over the architecture of this approach, there is no doubt that the SWT API allows the creation of some very powerful application code.

The SWT is different from other Java packages. First off, it requires a native piece ”a DLL in Windows, a shared library in Linux. SWT won't run unless that piece is available. Second, much of the SWT has been designed to keep as small a footprint as possible. This has been done with the thought in mind that any program written for a larger machine should be able to be run on a portable. Thus SWT is designed to run on machines using Windows CE or similar micro edition operating systems.

Note  

If you're not comfortable using SWT, I've included an alternate set of Swing-based programs. There's nothing in the text to support them, and they'll be fairly different from Swing in several areas, so you might have to adjust your text accordingly of you use. Even if you don't use the Swing examples, you can compare them with the SWT code.

JDBC and HSQLDB

Finally, once you've learned how to talk to the user via SWT (or Swing if you're so inclined), you need to talk to a database. Without this capability, a business program is largely useless. Step 10 deals specifically with accessing the database.

I've used HSQLDB, an Open Source 100% Pure Java SQL database engine, as the underlying database for this book. I did it because, of the many SQL engines I've worked with, HSQLDB required the least work during initial setup. Basically, it was unzip and go. However, you may want to use a different database. I've included instructions on some of the more popular free databases, such as PostGreSQL.

So, if you're ready, it's time to get started. Enjoy!

[2] For more information on plug-ins, try eclipse-plugins.2y.net/eclipse/plugins.jsp .




Eclipse
Eclipse: Step by Step (Step-by-Step series)
ISBN: 1583470441
EAN: 2147483647
Year: 2003
Pages: 90
Authors: Joe Pluta

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net