Java Swing history

April 15th, 2008

Geplaatst: Monday 29th of December 2003 at 18:14:42 Printen

I spent quite a while to find a newsgroup e-mail I read a year or so ago, but I found it.
It’s about the origins of Swing, why it is the way it is and Amy Fowler’s role in it. Even
though it appears not to be completely true, it’s a juicy story:

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 between
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 geeky
developers just go to putty in her hands.

Amy came from a Smalltalk company called Objectshare where she looked after
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 project
called Jigsaw which failed due to politics ( the developers actually got it
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 went
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 deal
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 Amy’s
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. Initially
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 how
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 it
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 which
is a tools platform design with total goal of taking on Micrsoft and Visual
Studio. It is open source so anyone can build onto it, and we have people
like TogetherSoft, Rational porting onto it. Our competition is Microsoft,
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 GUIs,
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 this
and our hands are tied by Sun on this. Even though the CPL that is part of
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.

JSR-168::Hello World Portlet (using Eclipse and Pluto)

March 11th, 2008

Coming Soon!!!

Portal Types

March 6th, 2008

Coming Soon!

JTL’s (Java Tag Libraries)

March 6th, 2008

Coming Soon!!!!!

Eclipse 3.3 & Pluto 1.1.4

March 5th, 2008

Installing your first Eclipse 3.3 IDE for the use of developing
JSR-168 Portlets using Pluto (tomcat) Portlet Driver.

Listed below are the steps needed to start you own JSR-168
Portlet using Eclipse as your IDE.


Step 1: Downloading Software

There are three packages that your going to need installed on your machine
1. Java JDK 1.5
2. pluto-1.1.4-bundle.zip
3. eclipse-jee-europa-win32.zip

These packages can be downloaded at the apache.org and eclipse.org
websites. The ‘current’ direct addresses are listed below respectively:

1. http://java.sun.com/javase/downloads/index_jdk5.jsp
2. http://portals.apache.org/pluto/download.html
3. http://www.eclipse.org/downloads/

To get the correct distribution of eclipse click on the link that says
something like “Eclipse IDE for Java EE Developers – Windows .”
After that you should see an array of places to download the software.

Step 2: Installation of JDK

The first thing you want to do is install the Java JDK 1.5 onto you
machine. The versions of Eclipse and Pluto require JDK 1.5 for creating
JSR-168 Portlets. Once its download just double-click on the executable
and it will install itself on to your workstation. Java usually installs
itself into your (C:\Program Files\Java\jdk*.*).
Step 3: Installing Eclipse

Now that we have Eclipse’s and Pluto’s packages
downloaded lets install them. First lets start with the
Eclipse IDE (3.3). Eclipse really doesn’t have a install
script because its all written in java so when you extract
this from its zipped format to you local machine; the directory
you chose is the directory that it will be installed into. Take a
look at the picture below to give you a good example:
Read the rest of this entry »

Full Duplex using the mii-tool (setting ethernet card) in Redhat

February 26th, 2008

Description – Using mii-tool, the speed and duplex of an ethernet interface can be set manually.

Directions -
You must set both the speed and duplex at the same time (it is not possible to auto negotiate only one). Typical combinations are:

100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD

To set 100 Mbps and full duplex on interface eth0, for example, use:

mii-tool -F 100baseTx-FD eth0

[root@init.d]# /sbin/mii-tool -v eth0
eth0: no autonegotiation, 100baseTx-HD, link ok
product info: vendor 00:08:18, model 17 rev 0
basic mode: autonegotiation enabled
basic status: autonegotiation complete, link ok
capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
link partner: 100baseTx-HD

These links helped me out!!

http://www.yolinux.com/TUTORIALS/LinuxTutorialNetworking.html

http://www.siliconvalleyccie.com/linux-hn/network-linux.htm

Basic Apache Certificat install

February 26th, 2008

Now I’ve got my server installed, how do I create a test certificate?

Step one
- create the key and request:

openssl req -new > new.cert.csr

Step two – remove the passphrase from the key (optional):

openssl rsa -in privkey.pem -out new.cert.key

Step three – convert request into signed cert:

openssl x509 -in new.cert.csr -out new.cert.cert -req -signkey new.cert.key -days 365

The Apache-SSL directives that you need to use the resulting cert are:

SSLCertificateFile /path/to/certs/new.cert.cert
SSLCertificateKeyFile /path/to/certs/new.cert.key

How do I create a client certificate?

Step one - create a CA certificate/key pair, as above.

Step two – sign the client request with the CA key:

openssl x509 -req -in client.cert.csr -out client.cert.cert -signkey my.CA.key -CA my.CA.cert -CAkey my.CA.key -CAcreateserial -days 365

Step three - issue the file ‘client.cert.cert’ to the requester.
The Apache-SSL directives that you need to validate against this cert are:

SSLCACertificateFile /path/to/certs/my.CA.cert
SSLVerifyClient 2

Linux Basics (for a novice)

February 26th, 2008

Linux Beginners Track Everyday with Linux @ thealphet consulting

  • The Beginners Linux Guide Focal Points
  • General Information on Installing the OS
  • Partitioning your Hard Drive for the Linux Installation
  • Booting Up
  • The install process

Using the Command Shell

  • About shells
  • Basic Shell Commands, move, copy, etc.
  • Using the vi text editor
  • Setting up the executable path
  • Finding out how much space a dir takes up
  • Uncompressing tgz files
  • Using the ps command to view processes
  • Using the find command

Configuring Hardware

  • Setting up Plug and Play Devices
  • Setting up a Modem in Linux

Becoming a Super User

  • Introduction for SU candidates

Read the rest of this entry »

Tomcat 5.5 cert install

February 25th, 2008

These are very Basic instructions for installing a certificate on Tomcat Version 5.5 with JRE 1.5

1. On the server where the SSL Certificate is to be installed, “cd” to
$JAVA_HOME/bin/ then execute the version.sh file to verify the Tomcat the JRE/JDK version.

2. On the server where the SSL Certificates is to be installed you have to create a Certificate Signing Request (CSR).

  • Uncomment th “SSL HTTP/1.1 Connector” entry in
    $CATALINA_HOME/conf/server.xml
  • cd to $JAVA_HOME/bin/ (this is the location for java’s command line tools)
  • Run the keytool command
  1. keytool -genkey -alies (FQDN) -keyalg RSA -keystore filename.csr
  2. When prompted on the command line for first and last name, enter the fully
    qualified domain name i.e. “(FQDN)
  3. keytool -certreq -keyalg RSA -alias (FQDN) -file filename.csr
    -keystore filename.crs
    3. Apply for the certificate at (http://www.verisign.com/)4. When you receive your certificate, copy it to the server ($JAVA_HOME/bin) or copy and paste it in to a new file on the server. Name it “cert.cer .”5. Go to Verisign’s site to get the intermediate certificate (AKA Server Certificate Chain) at “http://www.verisign.com/support/install2/intermediate.html” Copy and paste the text into VI and create a new file named “chain.cer”

    6. Run the first of two commands needed to import the cert:
    keytool -import -alias root -keystore filename.crs -trustcacerts -file chain.cer


    7. Run the second command:
    keytool -import -alias (FQDN) -keystore filename.crs -trustcacerts -file cert.cer

Hello world!

August 23rd, 2006

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!