富客户端平台与JavaFX 2与Swing相比 [英] Rich client platforms versus JavaFX 2 versus Swing

查看:231
本文介绍了富客户端平台与JavaFX 2与Swing相比的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在很快,我们需要为我们的EAI解决方案开发一个用于创建配置的GUI(更像是脚本,说实话)。想想典型的工作流编辑器。实际流程的可视化很可能是一个完全自定义的工作,无论是在Swing,SWT还是JavaFX 2.我选择的麻烦在于是自己做其他事情还是使用富客户端平台。



特别是,我注意到JavaFX 2受到了很多关注,并且似乎被Oracle推动为Java GUI领域的下一个重点。演示看起来很有趣,也许这个更新的API更加注重生产力,而不是Swing倾向于强加的大量样板代码。使用获得大量支持的新技术似乎是未来维护的安全选择。



使用RCP对此项目有明确的好处。无论我们是以Eclipse还是NetBeans作为平台,拥有用于查看底层(XML)配置,版本控制等的现有插件/模块都能以最少的工作提供强大的功能。我也喜欢在同一个GUI中将Java项目旁边的软件项目类型包含在内的想法。即使是简单的东西,如窗口管理和自定义排列面板,也可以通过RCP更好地处理我们可以提升的内容。



所以现在的问题是,什么技术或组合是是否可行?因此,根据我的意见,我的选择是:




  • Eclipse。不过,我不太喜欢使用SWT,因为我对Swing更熟悉。 NetBeans也是我的主要IDE,我对它最熟悉。它总是感觉更直观。

  • NetBeans。这将允许在Swing中开发自定义组件。我的学习曲线较低。

  • NetBeans + JavaFX 2.这个想法吸引我......使用NetBeans实现RCP优点并使用JavaFX 2实现自定义组件。 JavaFX 2显然与Swing集成,但是在NetBeans中如何做到这一点?

  • Swing或JavaFX 2.所有GUI都可以自己工作或使用一些现有的框架来获得最多RCP提供什么。这似乎是很多工作,但也提供了极好的控制。我有点厌恶在Swing中尝试这个。 JavaFX 2在这方面的表现如何?



基本上我唯一的GUI体验是Swing on small apps。这是我第一次选择能保证RCP的东西。但JavaFX 2似乎是前进的方向,我不想错过那条船。如果Swing可能即将退出,我宁愿跳上新技术。



如果有人可以分享他们的经验,那么尝试过类似NetBeans +的东西JavaFX 2或者更接近JavaFX的最前沿,可以推荐/阻止它用于我最感兴趣的这类事情。



我意识到它有点开放问题,但我真的不能想到一个更合适的地方。我不是在寻找一个什么是最好的RCP /比Java更好的JavaFX辩论。我正在寻找在这种情况下使用/反对它们的有效点。

解决方案

这里有一些观点和(个人)意见帮助您确定适合当前情况的解决方案:



Eclipse与Netbeans



<个人而言,我不喜欢关于IDE的优缺点的大讨论。只需使用您感觉最舒适的那个。如果您在团队中工作,请进行投票。考虑Swing两个IDE都很好(IMHO Netbeans有更好的GUI构建器)。考虑到JavaFX 2.0,两个IDE都很好,但两者都缺少GUI构建器。我不建议混合使用IDE。



JavaFX 2.0 vs. Swing vs. SWT vs. Eclipse RCP



嗯,我不 - 我甚至不能 - 想告诉你上面列出的哪种UI技术是最好的,因为我对你的项目的环境不太了解 - 经验,人类资源,预算,时间表等。拥有精益时间表和经验丰富的Swing开发团队(?)应该决定Swing。 SWT和Eclipse RCP也是如此。最前沿的开发人员可能倾向于尝试JavaFX。我同意,JavaFX受到很多关注,你会得到很棒的演示,但请记住,使用JavaFX需要 - 除了JRE - 每个客户端上的JavaFX运行时。



<希望这会有所帮助。


Pretty soon now, we're gonna need to develop a GUI for creating configurations (more like scripts, to be honest) for our EAI solution at work. Think of a typical workflow editor. The visualization of the actual flows will most likely be a completely custom job, either in Swing, SWT or JavaFX 2. What I have trouble with choosing is whether to do everything else by ourselves or using a rich client platform.

In particular, I've noticed that JavaFX 2 is getting a lot of attention and seems to be really pushed by Oracle as the next big thing in the Java GUI landscape. The demonstrations look interesting and perhaps this newer API is more closely focused on productivity as opposed to the tons of boilerplate code that Swing tends to impose. Using a newer technology that gets a lot of support seems like a safe bet for future maintenance.

Using an RCP would have definite benefits for this project. Whether we go for Eclipse or NetBeans as the platform, having existing plugins/modules for viewing the underlying (XML) config, version control etc. would offer powerful functionality with minimal work. I also like the idea of having project types of our software next to Java projects in the same GUI. Even simple stuff like window management and customly arranging panels is much better handled by RCPs that what we could whip up.

So the question now is, what technology or combination thereof is viable? My options, as far as I can see, are thus:

  • Eclipse. I'm not too eager for using SWT, though, since I'm more familiar with Swing. NetBeans is also my primary IDE and I'm most familiar with it. It always felt more intuitive too.
  • NetBeans. This'd allow development of custom components in Swing. A lower learning curve for me.
  • NetBeans + JavaFX 2. This idea appeals to me... Use NetBeans for the RCP goodness and using JavaFX 2 for custom components. JavaFX 2 apparently integrates with Swing, but how well can this be done within NetBeans?
  • Swing or JavaFX 2. Do all the GUI work ourselves or use some existing framework(s) to get most of what an RCP offers. This seems like a lot of work but also offers superb control. I'm a bit loathe to try this in Swing. How well would JavaFX 2 suit itself to this?

Basically my only GUI experience is in Swing on small apps. This is the first time I'll be going for something that would warrant a RCP. But JavaFX 2 seems the way forward and I don't want to miss the boat on that one. If Swing might be on the way out, I'd prefer hopping onboard the newer technology.

If there are people who can share their experiences, have tried something like NetBeans + JavaFX 2 or are closer to the forefront of JavaFX and can recommend/discourage its use for this sort of thing I'd be most interested.

I realize it's a somewhat open question, but I can't really think of a more appropriate place. I'm not looking for a "what's the best RCP / is JavaFX better than Swing" debate. I'm looking for valid points for/against their use in this context.

解决方案

Here some points and (personal) opinions for helping you determining a proper solution for your current situation:

Eclipse vs. Netbeans

Personally, I dont't like big discussions about pros/cons of IDEs. Just use the one you feel most comfortable with. If you work in a team, make a voting. Considering Swing both IDEs are fine (IMHO Netbeans has the better GUI builder). Considering JavaFX 2.0 both IDEs are also fine but both share the absence of a GUI builder. I wouldn't recommend a mixture of IDEs.

JavaFX 2.0 vs. Swing vs. SWT vs. Eclipse RCP

Well, I don't - I even can't - want to tell you which of the above listed UI technologies is best since I don't know enough about your project's environment - experience, human resources, budget, timeline etc. Having a lean timeline and a team(?) of experienced Swing developers should lead the decision to Swing. Same for SWT and Eclipse RCP. Cutting edge developers might tend to try JavaFX. I agree, JavaFX gets a lot attention and you get great looking demonstrations, but keep in mind, that using JavaFX requires - additionally to the JRE - the JavaFX runtime on each client.

Hope this helps.

这篇关于富客户端平台与JavaFX 2与Swing相比的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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