在Java GUI中未来的发展? [英] Future of GUI development in Java?

查看:193
本文介绍了在Java GUI中未来的发展?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑到


  • 的Sun /甲骨文决定不再开发Swing任何进一步的后,他们发明的JavaFX

  • 的JavaFX并没有真正的工作和有的认为这是一个失败已经

  • SWT的不是真正的平台无关性,手动任务处置GUI元素和必要性捆绑特定于平台的库

有另一种方式呢?

如果我想这样做在JVM上的GUI开发

If I would like to do GUI development on the JVM


  • 具有良好的API(Swing和SWT是不坏,但他们是不是真的不太妙。)

  • 这感觉响应(今天仍然与Swing和SWT,尽管声称这是解决的问题。)

  • ,这将不会是在几年已过时
    我应该做出什么决定?

时甚至有第三个选项可用或可能有可能是一个在未来?

Is there even a third option available or a possibility there might be one in the future?

这是选项


  • 这是快速反应(不可摆动的的如果这还不算快,这是开发商的错的思想)

  • 与本机外观

  • 与单个库运行于所有平台

这是现实吗?

谢谢!

=========

=========

要澄清:如果我要开始在JVM上一个新的软件项目中,有几个现有的选项,比如使用SWT和Swing的,使用像SwingX,基德,JGoodies数据,火烈鸟第三方库Swing或使用应用程序框架像NetBeans平台或Eclipse RCP的。是否有支持/建议这削弱了通常与Java GUI开发所带来的痛苦的方式?

To clarify: If I have to start a new software project on the JVM, there are several existing options, like using SWT or Swing, using Swing with third-party libraries like SwingX, JIDE, JGoodies, Flamingo or using application frameworks like Netbeans Platform or Eclipse RCP. Is there a supported/suggested way which weakens the pain normally associated with Java GUI development?

推荐答案

您不会找到一个客观的回答这个问题,只是个人的preferences和选项。

You won't find an objective answer to this question, only personal preferences and options.

我个人的preference是SWT。我开始使用它时,秋千是坏是一种选择。 SWT是只是一个在本机窗口API之上,因此与SWT感觉本身编写的应用程序编写的应用程序层。这些也可以被搞砸了。没有API将永远是由不良开发商的安全。性能是一样快,因为它可以在我的经验获得。如果不是,有实现它,在那里将是另一种方法。

My personal preference is SWT. I started using it, when Swing was to bad to be an option. SWT is "just" a layer on top of the native windowing APIs and thus applications written with SWT feel like natively written applications. Those can also be screwed up. No API will ever be safe from bad developers. The performance is as fast as it can get in my experience. If it is not, there is another way of implementing it, where it will be.

SWT的API是非常低的水平,这使得实现基本的东西出乎意料繁琐,但幸运的是最典型的用例可以与JFace的,这提高了的情况来解决。而当你使用API​​一段时间,你会积累自己的util类。你可以成为pretty实施SWT工具快。

SWT's API is very low level which makes implementing basic stuff unexpectedly tedious, but fortunately most typical usecases can be solved with JFace, which improves the situation. And when you use the API for a while you'll accumulate your own util classes. You can become pretty fast in implementing SWT tools.

由于SWT只给你的基础知识,你需要 MigLayout 并的星云的小部件来生存。你可能会喜欢釉面列出的。

Since SWT gives you only the basics, you need MigLayout and Nebula widgets to survive. You might like Glazed Lists.

其实我本来希望包括SWT之外的另一种选择和Swing为您提供:的Qt Jambi的。但诺基亚放弃了这一点,它现在是由开源社区维护。所以,我不知道在几年内不被淘汰。

Actually I would have liked to include another option besides SWT and Swing for you: Qt Jambi. But Nokia gave up on this, and it is "maintained by an open source community" now. So I don't know about "not being obsolete in a few years".

不过我对这种持续的讨论兴奋。有些人写的使用Qt Jambi的是原生的API实现SWT。他们正试图找出如何促进它。拥有的Qt作为一个选项可能使你的单库运行于所有平台为SWT有一天,虽然我不会是很快计数。

Nevertheless I am excited by this ongoing discussion. Some people have written an SWT implementation using Qt Jambi as "native" API. They are trying to figure out how to contribute it. Having Qt as an option might enable your "single library which runs on all platforms" for SWT one day, though I wouldn't count on it anytime soon.

但对我来说你的单个库的要求是没有这么大的问题。使用Maven为您的构建,添加配置的几行,你会很快了解这个忘了。

But for me your requirement of "a single library" is not such a big issue. Use maven for your builds, add a few lines of configuration and you'll forget about this very soon.

我真的不能比较SWT到Swing,因为我与Swing的经验是limitted。作为一个用户,我不喜欢大多数Swing应用程序,但我确实看到一些beatiful的。

I can't really compare SWT to Swing, since my experience with Swing is limitted. As a user I don't like most Swing applications, but I did see some beatiful ones.

目前摇摆应用程序的本机外观和感觉了pretty不错,但你不会骗一个电力用户。还表现似乎是新的,做得好的Swing应用程序确实不错,但同样,这只是从我的观点limitted作为用户。

Nowadays the native look and feel of Swing apps got pretty good, but you won't fool a power-user. Also performance seems to be really good in new and well done Swing apps, but again, this is only from my limitted view as a user.

显然,对于摇摆比SWT更多的第三方扩展 - 只是做一个谷歌搜索。 (但话又说回来,如果你忍受学习的Eclipse RCP的痛苦,你会得到一个巨大的,有趣的基础设施也是如此。这不是在谈论小部件,虽然,这东西像的 EMF RAP 我也不Eclipse RCP的人 - 我从来没有足够的耐心为...)

Obviously there are more 3rd party extensions for Swing than for SWT - just do a Google search. (But then again, if you endure the pain of learning Eclipse RCP you'll get an huge, interesting infrastructure as well. That's not talking about widgets though, that's stuff like EMF or RAP. I am no Eclipse RCP person - I never had enough patience for that...)

有关挥杆非常大的优势,如果你喜欢的东西,是马蒂斯的NetBeans GUI生成器。 Qt还具有由方式做得好GUI构建。

A really big advantage for Swing, if you like that stuff, is Matisse, the GUI builder of Netbeans. Qt has also a well done GUI builder by the way.

如果你打算长期,我没有看到比SWT和Swing的在Java GUI开发更多的选择。两者都不够好,如果你花足够的时间来满足大部分的需求。但他们并不完美。使用其他语言为自己的小部件,实现速度,工装,你总是让人羡慕......如果你不绑定到Java中,你甚至可能preFER Flash或Qt的。

If you plan for long term, I don't see more options than SWT or Swing for GUI development in Java. Both are good enough to satisfy most needs if you spend enough time. But they are not perfect. You'll always envy people using other languages for their widgets, implementation speed, tooling, ... If you are not bound to Java, you might even prefer Flash or Qt.

这篇关于在Java GUI中未来的发展?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆