Eclipse, an increasingly influential open-source development tools project, will kick off its first programmer conference next week amid strong industry momentum and lingering questions regarding its future direction. Elsewhere, learn how an application in Java SWING can invoke and display a Windows Form, pass parameters to the form and wait for a return value when the form is closed. This type of technique shows how organizations can introduce new forms and controls based on Windows Forms into an existing Java SWING environment and helping them to rapidly deploy .NET applications without having to rip out existing infrastructure or wait until new replacement applications are written.
The article says that IBM invested $40 million into Eclipse. I always thought that Eclipse was the most impressive (well, maybe the only impressive) GUI Java app that I’ve ever seen … now I know why.
Does anybody think Eclipse (the app) would be what it is now without that $40 million? I’m not saying it wouldn’t, I’m just curious.
I think that overall, Mozilla Firebird is the best open source desktop app every developed, but Eclipse runs a close second. Hell, I don’t even know how good it is as an app, but anybody who can make Java app run that fast deserves kudos
Eclipse is indeed very impressing.
For some strange reason the best (client side) Java apps I have seen so far are all programming tools/IDEs, like Borland’s JBuilder, or Together.
A big difference between Eclipse and other Java apps is that Eclipse uses a different GUI library.
Sun uses SWING, which provides the SWING look and feel on all supported Java platforms. SWING renders all stuff from within Java and is relatively slow that way.
IBM went the other road, going for the native platforms user interface style and not providing another UI style.
That way they interface everything to native user interface graphical interfaces (usully coded in fast C/C++/asm).
What is more remarkable about Eclipse is its plugin architecture which is intended to be extended by the users or other tool venders.
In that regard Eclipse is a meta IDE, thus a toolbox to build more specialized IDEs and tools.
This is a concept that made the old Emacs text based editor so attractive. People extended it with a myriad of new emacs modes, like modules for indenting and syntax colouring nearly any programming language, dealing with cvs, debugging and so on.
When I used JBuilder from Borland, I was excited to extend it with a lot of extension modules provided by a user community, stuff for Java doc generation, mouse wheel support and so on. Borland had published some extension points and thus allowed that community to come up with that useful stuff, of which some stuff was included in later releases.
Eclipse really opens up its IDE in every direction, much more radical than Borland’s JBuilder.
The interfaces and plugin architecture is well documented, the first good books appeared in the last months.
We can expect to see a lot of good extensions of Eclipse.
I am not sure about the roots of Eclipse. It seems to be a descendant from the visual age product line by IBM.
At present IBM uses a commercial branch of Eclipse, extended with tools for developing J2EE stuff as IBM WebSphere.
All in all it looks a bit like that IBM sees Eclipse as a fndamental infrastructure part, like a operating system and concentrates on building stuff atop of that, using the open source community to get relieved from the burden of supporting the basic infrastructure.
Regards,
Marc
“Hell, I don’t even know how good it is as an app, but anybody who can make Java app run that fast deserves kudos “
That is unbelievably sad. Eclipse is still slow compared to KDevelop, albeit with an arguably comparable features set (Eclipse is better at Java and KDevelop is better at most everything else). KDevelop doesn’t have any full time developers AFAIK and still ended up with ‘Best Development Tools’ at LW in NY. The announcer said KDevelop had the most polished presentation of all the apps and won on technical merit alone. Besides, most of the ‘speed’ in Eclipse is do to its liberal use of native libraries. They are just calling GTK+ and friends via JNI. So much for $40 million.
In short, no. To create a quality IDE – you must have a clear direction and management in the overall software design. This is the one (major) inherint flaw in OSS. It’s very, very difficult to have a clear direction within a private software company when developing software and even harder when it’s being developed within the OpenSource community. This is in large part due simply because within a company, management can say “this” is how were can going to do something and “no ands but or no’s”; in the OpenSource commmunity – you almost have too many difficult ideas and directions a software development project can go.
Your example about Mozilla is the exception and I’ll explain why. Mozilla was much easier to develop because W3 has clearly stated what the standards are and all Mozilla has had to do is develop a product that complys (in the most part) with those standards. Now, this is not to take away the great effort and product that the Mozilla team has developed; but in reailty – there doesn’t exist much “GUI” work for a web browser. GUI design is what requires strict rules/guidelines (e.g. HIG) and an overall design plan that becomes difficult as mentioned in an OpenSource community.
And that was just my 2 cents.
> Sun uses SWING, which provides the SWING look and feel on all supported Java platforms. SWING renders all stuff from within Java and is relatively slow that way.
IBM went the other road, going for the native platforms user interface style and not providing another UI style.
That way they interface everything to native user interface graphical interfaces (usully coded in fast C/C++/asm).
In case you are not away, it only takes 1 line of code to make you GUI application look/feel like the native OS.
——————————–
UIManager.setLookAndFeel(
UIManager.getSystemLookAndFeelClassName()
);
——————————–
That’s all it takes to have your GUI look like the native OS.
See the below link for more info. The link doesn’t note that it also includes the look/feel for WinXP’s Luna as well GTK for Linux.
http://java.sun.com/products/jfc/overview.html
System L&F works great on Windows (and I understand it looks equally good on OSX).
But on my linux machines calling the System L&F gives you the (ugly) Metal L&F. Recently, Java 1.4.2 added a GTK L&F. Aside from the fact that it is terribly buggy (can’t handle most themes, can’t handle all display methods, renders terribly), calling System L&F will only get you GTK L7F if you are running Gnome.
Also, I’d like to point out that SWT apps run quite fast on my machines. On Windows, I see no noticeable difference b/w native apps, and on Linux it’s quite negligable. [athlon T_bird 1ghz / 512mb ram]
> But on my linux machines calling the System L&F gives you the (ugly) Metal L&F. Recently, Java 1.4.2 added a GTK L&F. Aside from the fact that it is terribly buggy (can’t handle most themes, can’t handle all display methods, renders terribly), calling System L&F will only get you GTK L7F if you are running Gnome.
I could not agree more – but as you hint at, Linux does not have a common look/feel and thus posses many problems for the Open Source Community because of a lack of “visual” identity. Gnome’s HIG is a great step forward as well as the work that Red Hat has been contributing on the common look.
I run eclipse in the “System” L&F . It works well, it’s a bit slow at times, but very usable. And it’s widgets/controls look like any other GTK+ 2 app.
I run it with Java 1.4.2 on an Athlon 1400Mhz 512Mb ram.
Maybe if the theme you use has a alot of pixmaps all over the place it would be slow.
You nit pickers
Ah yes, there are other L&Fs in Java, they were added to make the Java blend more into the native GUI environment.
But all are rendered by Java routines, although under Windows they seem to use DirectX to speed up rendering.
I just wanted to hint where one of the speed differences
between Eclipse (using SWT) and standard Java apps come from.
It is also interesting to see critique on the metal L&F.
I think SUN did it well. It is better to have a L&F that is cleary distinct from the native UI (but similiar on all supported plattforms) so a user expect it to behave differently than to have several emulations of native GUI elements, that don’t work 100% as expected.
Other problems are mising integration, like drag and drop not working 100%.
My favourite L&F has been the Kunststoff L&F, perhaps
there are nicer ones out in the meantime.
I have not tried out the GTK L&F yet.
Another difference in speed might be the plugin architecture of Eclipse which is big pile of plugins loaded on demands, could be possible they spent some time optimizing.
Regards,
Marc
I talked to Erich Gamma in autumn, and questioned him about why they switched to swt. i asked if their industry partners asked them to deliver a strong alternative to swing, since ibm is probably the only company able to settle such an alternative. He told me that the first version of eclipse was written in swing, but they faced serious performance problems, due to a design flaw in swing as he explaind. so they had to rewrite the gui, and developed swt.
No, system L&F just won’t cut it.
For starters, it is still Swing. That is, it is still an over-engineered and amateurish class design. As a programmer you still have to write awful Swing code.
Note also that Swing platform L&F lags behind the platform look updates, Windows XP L&F only works in Java 1.4, and even when in platform L&F applications still look alien compared to native apps (due to subtle differences in layout handling, Swing apps *never* look exaclty the same from a widget layout perspective as native apps).
So, all things considered, the platform L&F is only a crude imitation of native look and feel.
For the dirty history of Swing and SWT look here. Makes for an interesting reading:
http://www.mail-archive.com/[email protected]/msg00355….
How hard is it to move from SWING to SWT? I’ve tried to get the graphic “drag and drop” plugin with eclipse working, but I can’t seem to get it working. Btw, I’ve read the interview and it sounds like typical SUN suffering from the “no invented here” syndrome. If there is something out there which will fix a problem, they’ll refuse to buy it or adopt it and instead insist on making something completely different and absolutely inferior resulting in their customers getting pissed off.
Swing is extremely awful and it plains sucks. Java is conceptually all good, but honestly I think Sun has a lost war with Swing on the desktop. Take for example the lack of decent GUI builders, which is amazing since theyre trying to compete with MS languages. I’ll stick to the .net languages.
Check out this interesting URL: http://news.com.com/2008-7345_3-5148588.html about James Gosling’s return to Sun. He has nice things, reading between the lines, to say about Eclipse.
That’s on Windows. On OS X, because Apple took over the implementation of the JVM, the System look and feel actually looks native, and you can’t distinguish it from any Cocoa app.
Sun should really work on the Windows XP and Linux native look and feels.
I suppose Eclipse is just about passable on windows, though still not as good (or fast) as jbuilder or IDEA, but it is awful on any other platform. SWT is plain slow and terrible on non-windows platforms. Plus, who the hell wants to manually garbage collect again. SWT is a primitive step backwards in every way possible, and still not as fast as swing.
I tried Eclipse with CDT (C++ plugin for the IDE).
The IDE looks very sharp. And it feels better than Borland C++ Builder X. It is a bit confusing to have to save to trigger a “make”, but in the end this is a good idea.
The first drawback I find with Eclipse is that it has no code reformater such as indent on UNIX.
The second, and more important drawback is that it is not possible to print from it on Linux. At all! It works on Solaris and Windows, but not on Linux. I had a look on their site but I was not able to find when that functionality will be implemented.
Until it can print (am I asking too much from an C++ IDE/Editor ?), I can’t consider using it and I stay with Anjuta.
“Plus, who the hell wants to manually garbage collect again.”
It’s not an question of if you want to. When it comes to system resources such as bitmaps, images, widgets, etc,
YOU HAVE TO!
Now, perhaps some algorithms *could* be invented so the garbage collections is done transparently automatically AS SOON as the bitmaps/widgets/etc GET OUT OF SCOPE.
But depending on the common Java gc to do its usual work on big objects such as graphics, as is the case with Swing is stupid.
One point you miss (perhaps you’re not a programmer), is that java programmers already do a kind of “garbage collection” manually, for resources belonging to the system. The HAVE TO close file objects, connection objects, etc. The same should apply to bitmaps and stuff.
“SWT is a primitive step backwards in every way possible, and still not as fast as swing.”
Primitive? Why, because it uses native, accelerated objects to do a NATIVE job (i.e present widgets to the user)?
Regarding it being “not as fast as Swing”, you are joking, right?
The only reason SWT is a little lacking in features and has some issues curently its because it was started in 2000, and is not included in every god damn JDK/JRE.
Had Java implemented something like SWT 8 years ago (for example by fixing the mess that AWT is), then Java on the desktop could stand a flying chance.
Read Swings bloody history, OK?
Here it is:
http://www.mail-archive.com/[email protected]/msg00355….
I am a java programmer, this is perhaps why I shun such nasty cludges as SWT. Its only “fast” on windows. Its slow as hell everywhere else. And for my money Swing apps such as IDEA beat the pants off it in a GUI sense. SWT is horribly incomplete and a retrograde step. I do not want to garbage copllect objects, I do not want to write an app that works in one palce and doesn’t work nearly as well anywhere else, and so on. Eclipse is slow, load in any decent sized project, or even just try scrolling through text on lunix eclipse of Mac OSX eclipse, to find it jerks with extreme pain. Its a lazy, ass-backwards solution. If you want to programme windows apps (which is what SWT is for), just use c#, but if you want portability stay the hell away from SWT. Oh, and its also a very limited toolkit compared to swing. Fine for eclipse of course, it has the widgets it needs and no more, but useless for anybody else. This is why nobody uses it but freaky OSS zealots (sort of people that rant on about jboss and how sun should open source java and so on ad nauseum). Keeping these idiots out of real java programming is a good thing though, so I welcome SWT & jboss & the rest, as a useful means by which they can ghettoise themselves and be forgotten about.
I’m not a Java programmer but I understand that Eclipse is written in java using SWT for the GUI.
Eclipse may be slow (I have no benchmark on that) but to me it proves to be faster than Borland C++BuilderX (Fedora, Pentium 3 @ 1 Ghz, JRE 1.4.3, Makefile managed by hand).
Just my 2 pennies 🙂
I saw a library to use SWT in Swing instead of AWT, but I don´t remember the name.
From the linked article on ‘learn how an application in Java SWING…’ :
Figure 1. Janetor, the Ja.NET Configuration Tool
This says much about the attitude towards Java.
Maybe the author just wants you to download and install .NET on your machine?
Garbage collection deals with reclaiming memory that you’ve allocated. That is all. This is why you need to manually release system resources that you’ve used, like file handles.
However, a button you create, a bitmap, a color(!!!!) are nothing more than objects that you create in memory. As such, these should easily be garbage collected. In SWT, they aren’t and as such can be considered a step back in terms of progress.
“However, a button you create, a bitmap, a color(!!!!) are nothing more than objects that you create in memory. As such, these should easily be garbage collected. In SWT, they aren’t and as such can be considered a step back in terms of progress.”
Those aren’t garbage collected in Java, either. That is, EVENTULLY they are, but in the meantime, huge piles of bitmaps and widgets are floating around in your memory, when they are NOT needed, until the silly GC decides to run (and freeze your app for some seconds).
Now, that’s a step back. In the results side, not in the “ease of programming” side.
“Note also that Swing platform L&F lags behind the platform look updates, Windows XP L&F only works in Java 1.4, and even when in platform L&F applications still look alien compared to native apps (due to subtle differences in layout handling, Swing apps *never* look exaclty the same from a widget layout perspective as native apps). ”
thats actually a good thing, windows XP == hideous tycco design.
its ugly and counterintuitive.