Why favor SWT over Swing?
Gerald Bauer <[email protected]>
| Newsgroups | gmane.comp.java.luxor-xul.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Denis, > > Once Luxor Beta 9 is out the door I will spend > > most > > of my time on the upcoming Luxor SWT version and > in > > the future I will add all the new stuff to the SWT > > version first. > > :-( Is this really the best thing to do? SWT is > indeed > great an I'm using eclipse all the time. However I > am > not sure SWT is really the platform of choice for > the > kind of deployment Luxor is aiming : webstart. > Indeed > it would require to have different version of > webstarted application for the different platforms > (windows, linux, etc.), and it won't be possible to > make unsigned/restricted JWS apps, since native code > will be included. This issue will last as long as > Sun > won't have integrated SWT as a standard JDK library. > And I'm not sure Sun will agree to do so in the near > future. > > Moreover SWT is much slower on linux than on > windows, > at least for the GTK version (I have tested on the > same computer with dual boot win2k/mdk9.1). Even if > I'm sure this issue will be addressed in the future, > SWT speed is not a overwhelming advantage for the > time > being for the linux community. > > Anyway, if you have already made your mind, I try to > help my best to keep the swing version up to date > with > the SWT one. I think for Luxor to thrive it needs to support at least two UI toolkits. So I won't drop Swing. However, there's only so much I can do in a day and I, therefore, have to set priorities. I think it's great if you want to take over the Swing branch and help to move it forward. You'll get my full support. I will try to break as much code as possible into UI independent modules and I think reuse can go both ways. Feel free to innovate, that is, adding new features to the Swing version and if the new features prove themselves I'll add them to the SWT version too. Now, I just have to get the Beta 9 out of the door and into the CVS repository. Please, give me another week. If you wonder why I "suddenly" favor SWT over Swing, here's the longer story: Basically, Swing is not open-source and is controlled by Sun. Thus, you can't distribute it freely. On the other hand SWT is truly open-source using a OSI-certified license, that is, the Common Public License (CPL). See http://www.opensource.org/docs/definition.php and http://www.eclipse.org/legal/legalfaq.html for more info. Now, why does it matter if the UI toolkit is open-source or not? If I may quote Robert Devi from his TSS post: <robert> Even with Sun's permission, the JVM wouldn't make it into most base Linux distributions since it's not open source. Linux distributions only tend to support software that they can directly fix bugs on. It's one reason why you don't get into the "cross-vendor blame game" when you use open source. When some application doesn't work, it's the distribution's fault and either it, or your support company (e.g. IBM Global Services) is responsible for fixing it. There's not passing the buck. If Java remains and add-on while purely open sourced Mono gets into the main distribution, the playing field will not be level. Perl, PHP, and Python already have an unfair advantage over Java because their already part of all Linux distributions and are already integrated and set up. Many LAMP (i.e. Linux+Apache+MySQL+(Perl or PHP)) systems might migrate to LAMM (Linux+Apache+MySQL+Mono) simply because it has ASP.NET has many of the advantages of JSP and is already integrated into Linux distributions. I'd much rather have LAMP systems migrate to LAMJ (Linux+Apache+MySQL+Java). Having Java part of most distributions would also allow open source projects like OpenOffice, Apache Tomcat, and Mozilla prepackage their own JVM so that they "just work without configuration" when you install them. Besides, Open Source Java is happening, whether Sun likes it or not. You can already run Tomcat, Eclipse, and several other Java apps on the purely open source Kaffe or GCJ JVMs plus libraries. There are stills some compatibility and completeness issues, mostly dealing with the AWT and Swing libraries. SWT fills this niche nicely. If Sun doesn't give it's blessing, the SWT may begin to overtake Swing/AWT, not because it's better, but simply because will be available on all Linux distributions. If that happens for one major library, why not others? By not giving it's blessing, Sun may actually cause a split in the Java platform. </robert> You can find the ongoing discussion at the Server Side @ http://www.theserverside.com/home/thread.jsp?thread_id=19988 To put it in a nutshell I think Linux is the future and for Luxor to thrive I want to clear all roadblocks so that Luxor ships with all Linux distros. I hope this give you a better understanding of my "change of heart". - Gerald ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php