The Source for Java Technology Collaboration
User: Password:



Start New Message Delete Post a Reply

Article: 
 Make Your Swing App Go Native, Part 3
Subject:  Is that the idea of Swing?
Date:  2004-02-01 10:39:33
From:  joshy
Response to: Is that the idea of Swing?


I agree with you that this sort of breaks the write once run anywhere paradigm, but it doesn't have to. It's just a matter of defining what that means.

WORA amounts to two things. One, that I can deploy on multiple platforms without including anything special with my code. Two, that I can write to multiple platforms without requiring conditional logic.

I agree that what I've shown the the articles above is crufty, but it proves that it can be done. I hope that we can develop this codebase into a library that completely hides all of the details of exit/quit and the like without using conditional logic. So this takes care of the second issue.

The first issue really deals with packaging. I package 3rd party libs with my software all the time. Why does it matter if the lib contains native code or not? If I can package up native functionality that is only used by one of my deployment platforms than I would still call that write once run anywhere. The key is that anything needed to run the software above and beyond the JVM are deployed automatically with the software.

I think the real problem is that the type of things described in the article, while technically possible, are not being provided by the JVM makers or defined in spec by Sun. So the question becomes, is this Sun's responsibility?

While I wish Sun would provide these types of things, or in fact do much improvement to Swing period, I have to wonder if it's Sun's responsibility or ours. This technology has been possibly for years and anyone could have created it. Why haven't we? Should we, as the Java community be taking control of the technology and evolving it to benefit the community? Having Sun and IBM as leaders is nice, but if we become completely dependent on them then we get put in the same boat as the .NET people.

I like the freedom and openness of Java. Java's developer community has much more of a bazaar model than the C# world and I kinda like it that way. If that means that we need to provide some technologies for ourselves then I think it's a good tradeoff.

- Joshua

 Feed java.net RSS Feeds