Java has been prospering since its born, mostly because of its WORA feature. In java, the bottom line is WROA rule should not be broken. Though AWT has kept the rule, it fails due to the wrong implementation strategy: LCD(Lowest Common Demoniator). That is, a component will not be accepted as a AWT component if it does not exist on one of the major OS platforms. Due to LCD strategy, AWT can not provide enough rich UI components and functionalities. This led to its final failure.

IMHO, SWT is following the same old road. SWT people may argue that SWT implementation is totally different from that of AWT, that SWT combines native calls using java code and provide platform independent API, that SWT uses emulation as Swing does to provide missing components on specific platform. Yes, SWT make up the component level LCD defects by native stub calls and java emulations. But, how can it compensate the component feature level missing? What if a component has a feature on some platforms while misses this feature on a specific platform. For example, on some platforms icon cannot be placed on a button unless it is toolbar button. What will SWT do? Will it implement the component feature using LCD rule? It is very hard to imagine to emulate this feature by SWT strategy, IMHO.

What's more, because of the blackbox nature of native OS components, it is very hard implement rich functionalities by wrapping native components using java code. This is another place where AWT and SWT failed.

Maybe I am wrong in stating that SWT cannot overcome a component platform specific feature. But I doubt using SWT strategy can solve this problems. If it cannot solve it, it is stepping the road AWT has stepped. It cannot provide as rich component features and functionalities as Swing does. If it can, I think the application developed with SWT must be platform specific, not accordant to WROA.

An opinion backing SWT boasts why should we support multi-platform and be WORA. The answer is why you should choose Java since you don't want to be WROA.

Just my $0.02.

评论:

A perfect example of this is the new azureus bittorrent. If you download it, it tells you to download the latest SWT bittorent. I you do this, under Solaris 10 6/06 x86, you'll find that SWT has links to libraries like libXtst.so.6 and libc.so.6 that *don't exist* because SWT was built on a *new* (unreleased) Solaris platform instead of an *old* one. Java is supposed to be better than this.

发表于 66.90.29.240 在 2006年08月30日, 05:54 上午 CST #

Yah, same thing happened to me, when I tried to install jUploadr to Solaris x86. I got the SWT libraries to replace the Linux ones that ship with jUploadr, and it fails saying it can't find libXtst.so.6. Argh!

发表于 David Van Couvering 在 2006年10月27日, 08:04 上午 CST #

It seems both of problems are due to Solaris x86 is not a popular OS and SWT did not support it. I believe that when Solaris x86 become popular, SWT will support it.

发表于 203.86.164.36 在 2007年09月19日, 10:40 上午 CST #

发表一条评论:
  • HTML语法: 禁用

This blog copyright 2009 by williamchen