A peek into the Standard Widget Toolkit (SWT)

Before we start the real thing about Eclipse RCP, I think it’d be useful to get a closer look to SWT, the Standard Widget Toolkit, that is the GUI toolkit Eclipse is based on. Apart from the Eclipse thing, SWT can be used standalone to build simple application GUIs, and this is what we’re going to talk about here. I’m going to give you an overview of its main features and limits, assuming that you already had some experiences with graphical user interfaces in Jaa.

The main difference between Java Swing toolkit and SWT is that the first one is entirely written in Java and most of the user experience is perfectly identical among different OS, while the second one is made up of two parts: a Java library and a system library. The Java library is (almost) the same among all systems, and the system library obviously is different from OS to OS. For this reason, SWT applications perfectly integrate in the operating systems environment, but the user may experience slight changes depending on the OS. That’s why a cross-check among different systems may be required.

What we’ll be doing here is an overview of what SWT programming means. I’ll put some bibliography to go into details inside the article.

For the following examples, we’ll be using Eclipse for the development process and I’ll assume that you’ve already taken my suggestion and you’re an expert already :P
Start a new Eclipse Java project and add a new Library variable to the classpath that contains every jar in your plugin directory with a file name containing “SWT”.

Read more of this post

An RCP to rule them all – Introduction

Building portable user interfaces is not just a stressing and very little appreciated job, but also one of the hardest tasks. Toolkits are -most of the time- dumb, too complex, unpredictable and overthreaded.
Most of these toolkits can be divided in two categories:

  • I can do anything, but a tremendous complexity makes me hard to understand and unstable when things get tough
  • I can do very few things, with style and ease, but I follow an “obvious” guideline that can’t be extended

But toolkits are just a part of the game. In fact, most of the time, what programmers are actually looking for is a “rich client platform”.
Not just some functions and objects, but a tool to arrange space, manage interactions and set a functional standard.
I must admit I haven’t tried many platforms, but Eclipse RCP, for Java development, really really surprised me. It’s three years now I’m using it, and (except for some obvious “wouldn’t it be nice”) I wouldn’t change a thing.

Read more of this post

Follow

Get every new post delivered to your Inbox.