The Source for Java Technology Collaboration
User: Password:



Simon Brown

Simon Brown's Blog

Reasons to use Eclipse and SWT?

Posted by simongbrown on November 14, 2003 at 09:19 AM | Comments (18)

I popped down to the JSIG today, the topic of which was Eclipse. Unfortunately I had a 2pm meeting so could only stay for the first presentation by Berthold Daum (author of Eclipse for Java Developers) which was an overview of Eclipse, SWT and plugin development.

The first part of the session took a look at Eclipse itself, and Berthold gave a good overview of the tool, the workbench, the various views, perspectives and so on. Following on from this was a look at some of the features that Eclipse provides including things like code completion, code assist, refactoring, etc. Overall this was technically a good presentation although it didn't leave me wanting to download the tool and give it another try. If you've been following my blog, you'll know I'm a big fan of IntelliJ IDEA and I have a personal license to prove it. In terms of the content covered in the presentation, feature for feature there's nothing new that I can't do with IDEA. Apart from the obvious advantage (i.e. price), why should I switch to Eclipse?

The next part of the presentation looked at SWT - the Swing alternative that Eclipse uses and that we (as developers) can use to build our own desktop applications. Again, this was a good presentation that covered topics ranging from the SWT architecture to the various widgets it provides. For me, the interesting part of the presentation was the summary of the pros/cons for using SWT. Advantages quoted include richer (native) widgets and integration, more stable and more responsive than Swing. Disadvantages quoted include SWT only runs on a limited number of platforms, widgets (can) have different behaviour on different platforms and deployment is an issue because of the native code. So, to summarise my understanding, SWT takes all the things that Java tries to achieve (platform independence, compatibility, etc) and throws them out of the window for something that is perceived to be faster, richer and more stable than Swing? I think I need some more convincing, particularly with the advances that J2SE 1.4.2 has provided in this area.

Just as a last point, there was a quick poll done about how many people have used Eclipse and, unsurprisingly, about half of the audience (about 40 people) raised their hands. Whether you like it or not, Eclipse is gaining a large "market" share. There's been a lot of discussion about Eclipse/SWT, but why should developers make the switch to either of these two tools?


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • Eclipse is a very good IDE, but I will take a pass on SWT
    I used Eclipse for a long time and in fact still test the IDE and submit bug reports on it. However, the whole SWT thing is not as exciting as it is cracked up to be, at least in my opinion,

    First is the platform dependence issue. While people who use Eclipse say that it runs on the major platforms (and it does), it is not AS GOOD on each of these platforms. I find Eclipse on Linux to be rather ugly. Now I understand that is because of the windowing kits that they decided to use but really, is a QT port all that hard?

    When I switched over to OS X earlier this year, I eagerly downloaded Eclipse onto my brand new 12" powerbook and was horrified to discover that this great IDE who boasts speeds greater than Swing can achieve was the slowest thing I had ever seen! At first I thought it was the platform I was using, but after grabbing a few other IDEs and testing them I had come to the conclusion that it was SWT (or at least the OSX implementation of it) that was slow and not Java or my particular machine. This was made very clear when I found that jEdit and IntelliJ ran smooth as silk on the machine.

    While the concepts behind SWT are interesting, it is my opinion that if they want to be taken seriously they need to work on these other non-windows platforms MUCH HARDER than they are today. Eclipse needs to wow people on other machines other than Windows.

    As for me, I will continue to use IntelliJ for the forseeable future. Yes it is expensive but I find it to be worth the cost in the time that it saves me.

    Posted by: mzarra on November 14, 2003 at 10:35 AM

  • Eclipse is a very good IDE, but I will take a pass on SWT
    Bottomline-Eclipse is aimed at the Windows community and the more traction it gets, the more people will start using it and I am sure with time, the other platform issues will get resolved esp since IBM would defintely want it to work great with Linux.I haven't used SWT and Eclipse's features are getting to be much closer to IDEA(which i do love as the best IDE I ever worked with).

    Swing never seemed to gain any popularity unlike Servlets and I guess SWT is another attempt at getting at that market.if only swing programming was as user friendly as Servlets-aah!!

    Vijay

    Posted by: vijay172 on November 14, 2003 at 11:52 AM

  • A Great Swing UI
    As an example how good a Swing UI can look you should take a look at the new NetBeans windowing system. It was just merged into the main netbeans.org cvs trunk a few days ago and it's already getting rave reviews!

    http://www.netbeans.org/kb/articles/win_sys_quick.html

    Posted by: wilsonsd on November 14, 2003 at 12:53 PM

  • e a pass on SWT

    Posted by: crnflke on November 14, 2003 at 01:26 PM

  • SWT and Native Code
    Firstly, apparently IBM have a QT port internally, but they can't release it for licensing reasons - QT is not under a license that permits linking by other licenses :(

    Secondly, Swing looks gruesome on pretty much every platform. It looks atrocious on Linux and always has - SWT on Linux, by comparison, looks fine (using the gtk version, and the Bluecurve theme shipping with RH9)

    Thirdly, SWT can compile down to native code using gcj (and possibly JET) - this means a LOT to people. No longer is Java the poor bastard child of the desktop, doomed to an awesomely ugly non-standard GUI - it looks and behaves like a native app, but is Java! No need to ship a JRE, it's a .exe with a shared library.

    I don't think SWT is perfect, I don't even know if it is the best approach. The lack of proper garbage collection is fairly unpleasant - but they explain WHY they've done it this way. There may be a way of avoiding this on many different types of platform.

    Sun made a mistake when they implemented Swing. A pure native implementation might be significantly easier to port, but it looks wrong on every platform, no matter how good Sun are. Not only that, but most of the features that they wanted can be done through native code on some platforms. (renderers in tables can be done by owner drawn stuff in WIn32)

    You never know, we may well end up with something like SwingWT in Java 1.6 - giving us the best of all worlds - an expansive API, and actual native looking FAST interfaces which are natively compilable.

    If Sun wants to fix it, they could do with actually discreetly throwing some developers towards classpath and making the swing implementation up to a 1.3 level, at least to give people the incentive to work on it.

    Posted by: crnflke on November 14, 2003 at 01:38 PM

  • SWT and Native Code
    > A pure native implementation might be significantly easier to port, but it looks wrong on every platform, no matter how good Sun are.

    Of course, I meant 'a pure Java implementation'. D'oh!

    >If Sun wants to fix it, they could do with actually discreetly throwing some developers towards classpath and making the swing implementation up to a 1.3 level, at least to give people the incentive to work on it.

    Well, the idea being that maybe, just maybe they could get more people developing swing apps for native use.

    Posted by: crnflke on November 14, 2003 at 01:48 PM

  • SWT and Native Code
    I am sure that if IBM had a strong desire to release a QT version of SWT they could. The license is rather lax and there are always ways to negotiate with a company to get the licensing issues taken care of. TrollTech has had a good history in this area.

    I disagree that Swing looks "gruesome" on pretty much every platform. While metal is dated, Swing looks great on OS X and I have seen several L&Fs that look very good. Swing is an API, it is left up to the development community to improve upon the basic look and feel packages, which several people have already done.

    gcj is the gcc java compiler which can be used on any java program not just SWT. While this is nice, it is hardly needed, I have not run into any problems in recent years with Java's speed. I have run into problems with program speed but not with Java's speed.

    Given the choice between the two APIs I consider Swing a lot easier to work with than SWT, but that is just my personal opinion. API choices are as about as religious as editor choices.

    I personally feel that SWT is a dead end. Might as well code in C and use a GUI library that is cross platform like QT since that is basically what you are doing.

    Guess we all shall see what happens in the next few years.

    Posted by: mzarra on November 14, 2003 at 01:51 PM

  • Swing not comparable to SWT
    It is misleading to compare Swing to SWT. SWT is a lightweight wrapper around native widgets--there is no Java drawing code. Swing is a delegate-based GUI toolkit, in which every pixel is drawn by Java code. SWT is fast and platform-correct; Swing is very flexible.

    If I wanted to make yet another ugly, skinnable MP3 player, I'd definitely roll my own Look And Feel for Swing.

    In all seriousness, take a look at netomat.net for an example of the kind of L&F customization that's possible with Swing.

    And look at Eclipse for an example of the kind of sweet, harmonious, platform-correct UI that's possible with SWT.

    Posted by: mrfeinberg on November 14, 2003 at 04:11 PM

  • SWT and Native Code
    I imagine they could force the issue, but to be honest, I personally think that the GTK one looks fine. On Redhat 9, they have some very pleasant widgets for gtk which should make KDE and GTK look fairly harmonious.

    The licensing problem comes down to the IBM CPL versus the GPL (which qt is under). Unfortunately, I think that IBM would have to go by the book on this one, and I think that Trolltech would be concerned at releasing qt under a new license as then every company would have a go at getting them to change their license.

    I have a program called 'irate radio' on my Windows box here. It's native code, looks like a windows app, and is just a collection of dlls. It's pretty nice. People, unfortunately have a vision of Java as being slow. Even with hotspot, there is a noticable lag before things happen. gcj works well for that. But gcj still has no implementation of swing - nobody has felt like going through that pain.

    To be honest, I would like SWT to be a dead end. Not because I think the approach of using native widgets is bad - on the contrary, I think it's eminently sensible, but because I fear that the manual resource management is a problem. (although, database code is similar - but then equally, that is dealing with native resources).

    Posted by: crnflke on November 14, 2003 at 04:21 PM

  • Eclipse is a very good IDE, but I will take a pass on SWT
    Swing never seemed to gain any popularity unlike Servlets and I guess SWT is another attempt at getting at that market.if only swing programming was as user friendly as Servlets-aah!!

    Swing programming is as easy or as difficult as Servlets programming. It all depends upon the number of grey cells one has.

    Posted by: swapnonil on November 15, 2003 at 12:31 AM

  • SWT and Native Code

    SWT with GTK bindings on linux is slow. So much so that netbeans and idea feels slower than eclipse. (OTOH, SWT is pretty quick on windows 2000.) The SWT API feels like a half step above the old X/Motif code I used to write in the early 90s.

    What gets me though is that I really like the SWT fidelity. SWT widgets, for the most part, look and feel native!

    Given the above, I'm going to take another look at SwingWT. It sounds interesting.

    Posted by: jtr on November 15, 2003 at 07:47 PM

  • Swing not comparable to SWT
    Perhaps the approach Swing takes differs from that of SWT, but the goal is the same: To provide a library for writing cross-platform GUI applications in Java. The two should be evaluated on how well, and how easily, each can be used to accomplish that goal.

    Posted by: jimothy on November 17, 2003 at 07:21 AM

  • Eclipse is a very good IDE, but I will take a pass on SWT
    I strongly disagree with that statement. Swing programming is a lot harder than Servlet for basic application development.

    The primary hurdle being that it's 1000 times faster to build a web UI than a thicker client because the browser handles lots of things for you, thus you get to spend more time on applicaton code.

    As you do make more advance applications, things become a bit murkier but for lots of applications, Web apps win not just because of the universal client distribution but because it's a lot easier to make an UI.

    Posted by: mwilcox on November 17, 2003 at 09:29 AM

  • SWT and Native Code
    Compiling to native code is not necessarily about execution speed but rather startup and ease of installation.

    Yes, you do make some tradeoffs in terms of the ability to do updates (if you go to executable there's no way to do Java WebStart, you're back to the old download cycle), but in some cases you want your application to be installed like a regular application.

    The fact is that one-sizes fits all approach doesn't work. Going with a client-JVM was the right start -- it was so revolutionary , that Sun had to do it to provie it to people. But now we need more options to compete with the 800 lb gorilla.

    Java, with gjc and SWT give you more arrows in the quiver by enabling you to develop in a great language (Java), but providing customers with an application that looks and acts like it was developed in a more traditional environment.

    I think the better analogy for Java/SWT/gcj is not a threat to Java. But rather as another way to tackle a problem the same way Delphi/Kylix has done for a while.

    Mark

    Posted by: mwilcox on November 17, 2003 at 09:35 AM

  • Swing / More a developer problem
    I can't be agree with your argument.

    I used Eclipse for several months under Linux. This much more slow and bugged
    thant Swing (compared to JBuilder on the
    same platform) and I use I have worked on 2.0, 2.1 and 3.0. Each time the resultat was the same and slow.

    Under Windows, this is not so good too, I have lost once a part of my source for unknown reasons on the 2.1.

    For Swing, I consider people clamming this is slow and bad as non swing developer.

    Swing is :
    - Confortable,
    - Reasonably fast
    - In the Java philosophy

    Problem is more in the swing complexity than
    in the swing performance.

    On the other side, SWT has more
    constraint because of its native part like freeing resource or main loop.

    But I admit, than SWT is pretty and its docking API is good compared to the poor swing toolbar.

    Posted by: abrillant on November 18, 2003 at 04:49 AM

  • SWT and Native Code
    I gather you meant NetBeans and IDEA feel faster than Eclipse, otherwise you just contradicted yourself. :-)

    For what it's worth, I've noticed IDEA on Windows is a hell of a lot faster than Eclipse also.

    As for which looks prettier... the tabs in Eclipse still don't look like tabs in Windows, whereas Swing's generally do but IDEA refuses to use the Windows XP look and feel. Shame, really.

    Posted by: trejkaz on January 05, 2004 at 09:48 PM

  • wow power leveling
    wow powerleveling
    wow power leveling
    wow gold
    wow items
    feelingame.com
    wow tips
    Most Valuable WOW Power Leveling Service
    wow power leveling faq
    cheap wow power leveling
    wow power leveling
    wow powerleveling
    wow power lvl

    Posted by: wowleveling3 on December 13, 2007 at 06:54 PM

  • 网络营销软件
    网络营销软件
    群发软件
    网络营销软件
    群发软件
    群发软件
    ---
    群发软件
    网络营销软件
    论坛群发软件
    网站排名软件
    群发软件
    推广小助手破解版
    论坛群发软件
    网站排名软件
    群发软件
    推荐给你很好的群发软件和信息群发软件和供求群发软件
    推荐给你很好的群发软件和信息群发软件和供求群发软件博客群发软件网络营销软件网络营销软件
    网站排名软件网站排名软件网站优化软件信息群发软件信息群发软件信息群发软件论坛群发软件网站推广软件网站推广软件博客群发软件博客群发软件

    群发软件群发软件博客群发软件论坛群发软件网络营销软件论坛群发软件
    信息群发软件推广软件网站推广软件网络营销软件网站推广软件群发软件网站排名软件网站推广软件博客群发软件论坛群发软件群发软件网站排名软件网站推广软件博客群发软件论坛群发软件
    网站排名软件
    博客群发软件
    网站排名软件
    网站推广软件
    群发软件信息群发软件
    免费论坛群发软件
    论坛群发软件
    网站排名软件
    免费博客群发软件
    网站推广软件

    群发软件
    博客群发软件
    网站排名软件
    网站推广软件
    群发软件信息群发软件
    免费论坛群发软件
    论坛群发软件
    网站排名软件
    免费博客群发软件
    博客群发软件
    信息群发软件
    论坛群发软件
    信息群发软件
    博客群发软件
    qq群发软件
    邮件群发软件
    博客群建软件
    企业名录搜索软件
    信息群发软件
    邮件群发软件
    论坛群发软件
    博客群发软件
    网站推广软件
    网络营销软件
    全能营销破解版
    网络营销软件
    论坛群发软件
    论坛群发软件
    论坛群发软件
    网络营销软件
    信息群发软件
    信息群发软件
    信息群发软件
    群发软件
    论坛群发软件
    网络营销软件
    网络营销软件
    网络营销软件
    群发软件
    群发软件
    ---网络营销软件
    网站推广软件

    Posted by: info0089099 on December 25, 2007 at 04:38 PM





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds