• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Threat to AWT/SWING

 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sun does not like eclipse because it is a threat to AWT/SWING? Is it true.
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A funny thing but one of the problems that caused the falling out between MS and Sun was that MS was writing classes to interact directly with Windows objects. Sun made a big stink because programs written using those classes wouldn't be "run anywhere".
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thomas,

Care to provide further explaination of your comment?

It seems a bit... ummm... non-sequitur.
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sun saw what MS was doing as a direct threat to Swing which was new technology at the time. That is exactly what SWT is. It is a direct threat to Swing that will not run in every JVM.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I thought the beef Sun had with MS is that they were providing "platform specific functionality" (i.e. bindings to COM and other MS specific stuff.) inside the core classes (java.lang.*). I don't even think Swing was out yet! (Wasn't the last MS JVM 1.1.8?) If all that MS was doing was making a platform specific binding of the GUI layer they could have easily accomplished this through Swing mechanisms, and Sun wouldn't have had a problem with that. In fact, that's exactly what Apple does with its OS X look and feel... and Sun doesn't berate them for it.

As for SWT, yes, it is a direct threat to Swing. But as for not running in every JVM, I don't see how you come to that conclusion. It does require platform specific shared libraries to run, but the java classes produced *will* run in any JVM. This isn't any different than AWT... AWT requires a shared library (provided with the JRE) to be on the system to actually produce any GUIs.

I suppose the argument may be that SWT isn't "write once, run anywhere", it's "write once, run anywhere that has an SWT shared library written for it." But this same statement is true for AWT. Also, you can check here to see all the platforms SWT runs on... it's pretty close to the same platforms you can run AWT/Swing on anyway.

As for why Sun doesn't like SWT... I don't know if this is true, but here's some lumber to throw on the rumor mill.

I've used Swing for quite a while and have been playing around with SWT recently, and each has it's advantages and disadvantages, but this isn't one.
 
Author
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Although the "lumber" thread mentioned above is pretty entertaining it has been partly (mostly?) debunked in numerous online discussions, see google.
SWT is a simple, high performance widget set. Swing is a higher level model-view GUI library. JFace provides some Swing-like features on top of SWT but they're not especially comparable.
Everything has its place. Here are some rules of thumb I suggest for people looking at user interfaces:
1. If your primary concern is competing with native desktop applications such as Windows apps written using C++/MFC or C# then you should take a good hard look at SWT (and JFace).
2. If your primary concern is writing a program that runs the same way on Unix, Mac, PC, etc. then Swing is a good choice.
3. If you're trying to target confined platforms with old versions of Java then AWT might be a good choice.
There are exceptions but that should give you a starting point.
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Nathan Pruett:
I thought the beef Sun had with MS is that they were providing "platform specific functionality" (i.e. bindings to COM and other MS specific stuff.) inside the core classes (java.lang.*).


MS had their own set of packages labeled as com.ms.x. Sun even forced them to change their IDE so that if you selected the toolbar with those widgets you got a warning message that your code wouldn't be transportable.
The difference with SWT is that SWT works on a lot of OSes but that is because IBM has provided a lot of ports. If they had only provided a port to Windows would Sun be suing them? I doubt it.
Swing was out at that time but it was available only as a separate download.
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know how "debunked" that post was but I think this is 100% truth:
"In retrospect, I think the "Microsoft Java Extensions" were a good idea: you could write pretty UI's in Java. Instead of admitting that there was a real need for this, Sun went to court and never offered something competitive."
That has been my complaint since 1997. AWT stinks. Swing is slow and buggy and way too complicated. If Sun hadn't been in their "we hate Microsoft" mode in 1997, C# and .NET would never have been written and former VB programmers would be using VisualStudio.Java to do their development.
 
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is an interesting debate about swt/swing.
http://www.logemann.info/day/archives/000008.html
I've read a lot of anti-swing ranting, but it isn't that bad. Am using it in a project for frontenting with JAplet a Domino6 database (supports Java1.3). Don't even need to use slow Corba-implementation of Domino. It communicates with the Domino6 server through a lotus package which uses JNI wrappers for Lotus-RPC stuff.
So far I am positively surprised with performance and speed of development (I have done more webstuff before). With good books, Netbeans and some discussion partners in newsgroups, swing looks like a good choice for a lot of smaller/mid-range projects.
Would be great if I only get working that multi-Threading stuff with invokeAndWait() or/and invokeLater() to communicate with my NotesConnection class in its own thread this night or the next, to make the NotesConnection class statefull and gui-snapiness more scalable.
Wise what the guy says in his weblog:


But people forget that a "fast" application is not only widget-responsiveness, in real life, applications suck at database calls and business logic, there SWTs speed wont help you in any way.


regards Axel
[ July 15, 2003: Message edited by: Axel Janssen ]
 
Dastardly Dan the Author
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ed Burnette:
Everything has its place. Here are some rules of thumb I suggest for people looking at user interfaces:
1. If your primary concern is competing with native desktop applications such as Windows apps written using C++/MFC or C# then you should take a good hard look at SWT (and JFace).
2. If your primary concern is writing a program that runs the same way on Unix, Mac, PC, etc. then Swing is a good choice.
3. If you're trying to target confined platforms with old versions of Java then AWT might be a good choice.


Good rules of thumb.
metacomment: It is worth mentioning for historical perspective that SWT wasn't a new idea at OTI. The UI of VisualAge for Smalltalk was based on a precursor implementation of SWT called CommonWidgets. Their approaches to widget portability are similar, however SWT is simplified in many respects, owing to the experience OTI gained over the years. The arguments about the superiority of these approaches ("heavyweight" versus "lightweight" widgets) are very familiar to Smalltalk programmers -- it was covered ad nauseum in comparisons of ParcPlace's Smalltalk (lightweight) and IBM/OTI's (heavyweight). In competitive situations, customers generally preferred the more "native looking" UI.
As a former Smalltalk programmer, it is interesting (and in some ways sad) that we're still debating this point over 10 years later.
-- Dan
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic