Whoa, awesome. Thanks for posting that. I've been curious for a long time
why Swing is so unusable, and why IBM doesn't show off SWT more. It's great
to hear more of the story.

Sun's "Java Platform Performance" book talks a little about Swing's
performance issues. The author was on the team that tried to improve the
performance, and he seems to think the root cause of the slowness is an
overly abstracted (amateurish) class hierachy. Among other things, this
results in masses of temporary objects that are churned by the Swing API,
something like a dozen temporary objects are created for each cell of a
JTable on every repaint.

Don't you guys think that if it weren't for the Swing mess, Java would be
the new Visual Basic, and C#/.NET would be pure hype that does nothing new?
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.
Now two or three years later C# and .NET appear, looking surprisingly like
Java with Microsoft Extensions, and this hole is filled. I'm glad, I hate
MFC and VB, and like being able to write Windows applications in a pretty
garbage collected language that has a new and thoughtful API. But I wish it
could be Java instead, so I could work on an iMac and not feel like a
sellout to the man.

-----Original Message-----
From: Simon Ritchie [mailto:simon.ritchie@;amo.com]
Sent: Monday, November 11, 2002 8:03 AM
Subject: [jug-discussion] SWT ... the scoop?

In anticipation of the Tuesday presentation on SWT, here's a message to a
mailing list posted by Alan Williamson, the editor of Java Developers
Journal. The message he quotes is from a source within IBM. It's an
interesting look at the inside politics of Swing and SWT.


Subject: [ST-J] SWT ... the scoop?
> Date: Wed, 6 Nov 2002 10:31:25 -0000
> From: Alan Williamson <[EMAIL PROTECTED]>
> Okay here you go ... read ... digest ... re-read ... and do more digesting
> ...
> ;-)
> --------------------------------
> Thanks for getting back to me.  I'd love to give you the low down on Swing
> and SWT, as long as you keep me as your undisclosed "source close to IBM".
> To see why everything is so messed up you need to go back a few years to
> the world when just AWT existed.  Sun had built a basic set of portable
> control classes that mapped to native widgets on the different operating
> systems, and the next obvious step was to continue this model beyond its
> initial set of CUA 92 components ( text, button, etc... ) and add stuff
> like a table, a tree, a notebook, a slider, etc...  While AWT was buggy
> beyond belief this was just poor code that needed fixing by Sun's coders.
> The developers at Sun like Graham and Otto used to publicly blame their
> bugs on operating system differences like "focus order is different
> windows and OS/2" or "the behavior of Ctrl-X is different between ..." and
> other lame excuses to take the heat off the fact that the real problem was
> that Sun released the code too early.  Then Amy Fowler appeared at Sun.
> Without being sexist, Amy is a very pretty intelligent girl, and most
> developers just go to putty in her hands.
> Amy came from a Smalltalk company called Objectshare where she looked
> the UI class library there.  The history of Smalltalk is a sad one if you
> apply it to Java, because once upon a time there were 3 big Smalltalk
> companies - IBM, Parc-Place and Digitalk.  All 3 had equal market share in
> early 90s and life was good.  Parc Place used emulated widgets ( i.e. a
> Swing design ) while IBM and Digitalk used native widgets.  IBM overtook
> the others who then merged to form, imaginatively, Parc-Place Digitalk.  A
> huge battle enused in which they tried to merge their products in a
> called Jigsaw which failed due to politics ( the developers actually got
> working ) because the native versus emulated crowd fought to the bitter
> death.  Amy won a moral victory, however at IBM we just got all of their
> accounts because the two companies did nothing for an entire year except
> quarrel.  When the dust settled the share price of PPD ( which was now
> called Objectshare for the same reason that Windscale was renamed to
> Sellafield - in the hope that everyone forgets the disaster that occured
> there ) went from 60 bucks to under 1 dollar a share.  They were pulled
> form NASDAQ because of incorrect reportings of earnings and the lights
> out.  Sun were just up the road from PDD so the teccies all sent their CVs
> there.  Amy was hired, and because she promised to solve all of the widget
> problems by doing a lightweight solution, convinced Sun management to make
> her the head of the GUI development.   She got in on the ticket of "the
> folks already here messed up, let me handle it".  Amy then hired all her
> old Parc-Place friends and they set about creating Swing.
> The obvious thing to do with Swing would be to make it just a drawing
> framework for the guys who want to do map software and create drawing
> applications, however build it around the AWT classes that would still
> with  buttons and other stuff.  The Sun guys such as Philip and Mark
> already had AWT working with tables, trees and notebook so it would be the
> obvious thing to do.  Not so for the guys who wrecked PDD, they wanted
> everything lightweight.  Ignorance at Sun's management, combined with
> ruthless politics led to the mess we have today.  Amy also sold Sun on the
> fact that Swing was a joint development with Netscape as part of the
> mozilla project, when in reality this was just a sales puff of hers.
> At IBM we hated Swing from day one.  Big, buggy, and looks crap.
> our tools such as VisualAge for Java were all written in Smalltalk ( which
> used native widgets ) so when we started to migrate these to a Java
> codebase we need a widget set.  All of the IBM developers are the same
> crowd who used to work with Smalltalk, and we reluctantly under management
> orders built our WebSphere Studio tools using Swing.  It was a terrible,
> buggy, monster.  In our initial previews when it was demo'd against
> Microsoft Visual Studio products all our users hated it just because of
> it looked, never mind what it let you do.  Most shoppers don't like to get
> in car that looks and smells terrible, even if it does have a nice engine.
> We therefore created a project to migrate our Smalltalk native widget set
> over to Java.  This was done in Canada by a group called Object Technology
> International.  It was a success as we released a product called VisualAge
> Micro Edition using it, which became a very successful IDE for J2ME
> development.  However, the OTI folks found that Swing was so badly broken
> deep down in the way it reads windows events that we couldn't even get
> interoperability between SWT ( the S initially stood for Simple although
> was later changed to Standard ) and Swing.  They read their event queue in
> a way that can leave memory holes so we had to have our own loop polling
> the windows event queue to do this correctly.  We tried over and over to
> get Sun to fix this but Amy just didn't understand this, so we took the
> decision that SWT and AWT/Swing would not co-exist.  We even have our own
> Point and Rectangle classes in SWT - there is no dependence on any AWT or
> Swing classes in the entire toolkit.  We put the toolkit into Eclipse
> is a tools platform design with total goal of taking on Micrsoft and
> Studio.  It is open source so anyone can build onto it, and we have people
> like TogetherSoft, Rational porting onto it.  Our competition is
> so all our efforts are focused at taking them head on.
> Sun however got totally pissed off about this.  They have NetBeans which
> they want to do the same thing as Eclipse with and they complained to IBM
> senior management.  They saw SWT as tying you into Windows, which is total
> bunk because it runs on Mac/Linux using GTK, and a number of micro edition
> platforms.  They refused to let Eclipse be Java certified because it has
> native code in it, so the Eclipse product has to be very careful about
> their use of the Sun tradmarked word "Java".  Eclipse can't even call
> itself a Java IDE, and Sun have made threats of legal moves to stop IBM
> from ever calling Eclipse a Java IDE.  One result of this is the fact the
> IBM created GUI builder that runs on Eclipse lets you build Swing/AWT
> but doesn't let you drag and drop SWT widgets.
> It is totally possible to separate SWT from Eclipse and just wack the DLL
> in your path and use the widget toolkit to develop your GUI for your
> banking or insurance application or whatever.  Again, we can't promote
> and our hands are tied by Sun on this.  Even though the CPL that is part
> the Eclipse open source agreement allows us to offer this as a solution,
> Sun have made it very clear that they don't want us to do this.
> As for the user community, whatever IBM and Sun's ultimate motives, I
> always find it interesting that those who love Swing say stuff like "Once
> you have spend years mastering it, you can use it properly" which is
> basically a way of them trying to justify and defent their hard earned
> niche expertise, whereas SWT fans say "Wow - this is fast, acts native and
> works with XP skins, etc.. and is small and light".  Another one I like is
> a quote from a user of ours, who says that Swing is like Java deciding not
> to do native IO using the operating system, but instead to use the disk
> motor arm API and read and write the disk data segments themselves.  Swing
> basically does this by just grabbing a low level "paint(Graphics)" method
> and doing all the widget drawing by hand.
> --------------------------------

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to