java 使用哪个富客户端平台
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/579109/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Which Rich Client Platform to use
提问by Peter Osborne
We recently started to develop a Java desktop app and management has requested that we make use of Rich Client Platform. I know of four for Java namely:
我们最近开始开发 Java 桌面应用程序,管理层要求我们使用富客户端平台。我知道 Java 有四个,即:
- Eclipse RCP - www link to ecipse rcp,
- Netbean RCP - Netbeans RCP web site,
- Spring RCP - spring rich client
- Valkyrie RCP - Valkyrie rich client
- Eclipse RCP - www 链接到 ecipse rcp,
- Netbean RCP - Netbeans RCP 网站,
- Spring RCP - spring 富客户端
- Valkyrie RCP - Valkyrie 富客户端
Has anyone got any experience in any of these and if so what are the strength and weaknesess of each?
有没有人在这些方面有任何经验,如果有的话,每个方面的优势和劣势是什么?
thanks
谢谢
采纳答案by Kevin Day
I recommend that you take a look at JSR 296 - it's not complete yet by any stretch, but I think it hits the sweet spot for providing certain core functionality that you really, really need in every Java GUI app, without forcing you to live in an overly complicated framework.
我建议您看看 JSR 296 - 它还没有完全完成,但我认为它提供了您在每个 Java GUI 应用程序中真正需要的某些核心功能的最佳位置,而不会强迫您生活一个过于复杂的框架。
I have used JSR 296 successfully to create a mid-sized application. For window layout in this app, we use MyDoggy(highly recommended). For layout management, we use MiGLayout (Beyond highly recommended). For data binding, we use a modified form of JSR 295 (we implemented something similar to PresentationModelon top of JSR 295 that we use for our GUI binding). I'm in the process of incorporating Guice as a DI mechanism but haven't finished that effort (so far, I think it will 'play well' with JSR 296 with a tweak here and there). Let's see... persistence is the big missing link here - I am currently evaluating Simplefor XML persistence, but am running into issues with getting it to work with DI containers like Guice. I have Betwixtworking, but the dependencies on Betwixt are huge so we are looking for something more streamlined.
我已经成功地使用 JSR 296 创建了一个中型应用程序。对于此应用程序中的窗口布局,我们使用MyDoggy(强烈推荐)。对于布局管理,我们使用 MiGLayout(Beyond 强烈推荐)。对于数据绑定,我们使用 JSR 295 的修改形式(我们在用于 GUI 绑定的 JSR 295 之上实现了类似于PresentationModel 的东西)。我正在将 Guice 合并为 DI 机制,但还没有完成这项工作(到目前为止,我认为它会在 JSR 296 上“玩得很好”,并在这里和那里进行调整)。让我们看看……持久性是这里缺失的重要环节——我目前正在评估Simple的 XML 持久性,但是在让它与像 Guice 这样的 DI 容器一起工作时遇到了问题。我有Betwixt工作,但对 Betwixt 的依赖很大,所以我们正在寻找更精简的东西。
Opinions on other RCP options for Java:
关于 Java 的其他 RCP 选项的意见:
NetBeans: I have some fundamental philosophical objections to the approach used by NetBeans (too many design anti-patterns for my taste). In the end, the framework forces you to make poor design decisions - and it's almost impossible to use if you don't use NetBeans as your IDE (I tried, but I just couldn't switch from Eclipse to NB). It's probably just me, but it seems that it should be possible to write code for an RCP framework without using big complicated wizards and reams of auto-generated code and XML files. I've spent so many hours troubleshooting old Visual C++ code generated by Visual Studio that I'm extremely leery of any framework that can't be coded up by hand.
NetBeans:我对 NetBeans 使用的方法有一些基本的哲学反对意见(太多设计反模式不合我的口味)。最后,该框架迫使您做出糟糕的设计决策——如果您不使用 NetBeans 作为 IDE,几乎不可能使用它(我尝试过,但我无法从 Eclipse 切换到 NB)。这可能只是我,但似乎应该可以为 RCP 框架编写代码,而无需使用大型复杂向导和大量自动生成的代码和 XML 文件。我花了很多时间对 Visual Studio 生成的旧 Visual C++ 代码进行故障排除,以至于我对任何无法手动编码的框架都非常怀疑。
Spring RCP: The folks at Spring have a good solid design, but the documentation is really, really weak. It's pretty difficult to get up to speed on it (But once you do, you can get things done pretty quickly).
Spring RCP:Spring 的人有很好的坚实设计,但文档真的非常薄弱。加快速度是非常困难的(但是一旦你做到了,你就可以很快地完成工作)。
Eclipse RCP: Haven't used Eclipse just because of the deployment overhead (depends on your target audience - for us, deploying an extra 50 MB of runtime just didn't work). Without question Equinox is a beautiful thing if your app needs significant plugin functionality (of course, you could run Equinox with JSR 296 as well, or use design patterns similar to the Whiteboard pattern promoted by OSGi).
Eclipse RCP:没有使用 Eclipse 只是因为部署开销(取决于您的目标受众 - 对我们来说,部署额外的 50 MB 运行时是行不通的)。毫无疑问,如果您的应用程序需要重要的插件功能(当然,您也可以使用 JSR 296 运行 Equinox,或者使用类似于 OSGi 推广的白板模式的设计模式),那么 Equinox 是一件美妙的事情。
回答by Martin Lazar
INTRO - skip if you're only interesterd in result ;)
I was developing an editor for a custom programming language very simmilar to JSP. First I've implemented the editor as my thesis using NetBeans platform. After finishing school I've got a job and they wanted me to implement the same thing in Eclipse RCP, so now I can compare these two platforms at least in stuff I was facing during this project.
介绍 - 如果您只对结果感兴趣,请跳过;)
我正在为一种与 JSP 非常相似的自定义编程语言开发一个编辑器。首先,我使用NetBeans 平台将编辑器实现为我的论文。完成学业后,我找到了一份工作,他们希望我在Eclipse RCP 中实现同样的功能,所以现在我可以比较这两个平台,至少在我在这个项目中面临的问题上。
RESULT - If I had a choice between Netbeans platform and Eclipse RCP, I would definitelly pick a NetBeans platform. Why?
Great screencasts, good tutorials, very active friendly and helpful community, quite well documented and the source code is written nicely and with good code conventions. Also has some interesting gadgets (cookies, lookup). It simply suits me.
结果 -如果我可以在 Netbeans 平台和 Eclipse RCP 之间进行选择,我肯定会选择 NetBeans 平台。为什么?
很棒的截屏视频,很好的教程,非常活跃的友好和乐于助人的社区,文档齐全,源代码编写得很好并且具有良好的代码约定。还有一些有趣的小工具(cookies、查找)。它只是适合我。
And why Eclipse RCP does not suit me?
The documentation is weaker and conventions and API are sometimes..ehm..too weird for me :-) It's quite ususal to see methods like:
为什么 Eclipse RCP 不适合我?
文档较弱,约定和 API 有时..ehm..对我来说太奇怪了 :-) 看到以下方法很常见:
/**
* Returns a description of the cursor position.
*
* @return a description of the cursor position
* @since 2.0
*/
protected String getCursorPosition() {
..
}
Well I thought they must be kidding me :-D How am I supposed to use this method? Or like this:
好吧,我想他们一定是在逗我 :-D 我应该如何使用这种方法?或者像这样:
/**
* Returns the range of the current selection in coordinates of this viewer's document.
*
* @return a <code>Point</code> with x as the offset and y as the length of the current selection
*/
Point getSelectedRange();
Although the number and type of attributes fitts, I don't find the Point object ideal data structure for storing range ;-)
尽管属性的数量和类型很合适,但我没有找到 Point 对象用于存储范围的理想数据结构 ;-)
There are numbers of theese such surpises in Eclipse RCP
在 Eclipse RCP 中有很多这样的惊喜
回答by nash
Too late to answer, but some guys might hit this page.
回答太晚了,但有些人可能会点击此页面。
I would go for Netbeans RCP, 1)Netbeans platform. its quite mature and has evolved is a 'easy to use' platform for developing applications.
我会选择 Netbeans RCP,1)Netbeans 平台。它相当成熟并且已经发展成为一个“易于使用”的应用程序开发平台。
2)Its very easy to get started with, whereas the learning curve of eclipse RCP is pretty steep. Just goto, http://netbeans.org/kb/trails/platform.html, there you will tutorials, videos(do watch the top 10 api's videos plus try out tutorials before you read books, that way you will get a hang of things beforehand).
2)它非常容易上手,而eclipse RCP的学习曲线非常陡峭。只需转到http://netbeans.org/kb/trails/platform.html,您将在那里获得教程、视频(请在阅读书籍之前观看前 10 名 api 的视频并试用教程,这样您将掌握事前)。
3)Books on netbeans RCP (i guess there are 2 on netbeans RCP) are uptodate (small changes only which you wont have much issues with). whereas the main book on RCP wasn't available for a long time (recently .that is, may 2010, the new edition has been released, so that's a very good thing for eclipse RCP developers. It wasn't there when i was trying to learn it. I get frustrated with authors who don't publish new editions, almost leaving new developers in lurch. Not everybody likes to read docs. Not publishing updated books almost amounts to killing the technology). I would love to see a cookbook type book for both platforms.
3)关于 netbeans RCP 的书籍(我猜 netbeans RCP 上有 2 本书)是最新的(只有很小的变化,你不会有太多问题)。而关于 RCP 的主要书籍已经很久没有了(最近,也就是 2010 年 5 月,新版本已经发布,所以这对 eclipse RCP 开发人员来说是一件非常好的事情。当我尝试时它不在那里学习它。我对不发布新版本的作者感到沮丧,几乎让新开发人员陷入困境。不是每个人都喜欢阅读文档。不发布更新的书籍几乎等于扼杀了技术)。我很想看到适用于两个平台的食谱类型的书。
4)Netbeans has full integrated GUI builder, which is big plus. Eclipse RCP, either you have to hand code or buy some third party GUI builder.
4) Netbeans 具有完全集成的 GUI 构建器,这是一大优点。Eclipse RCP,要么您必须手动编写代码,要么购买一些第三方 GUI 构建器。
5)Netbeans platform has this pretty cool Lookup api for intermodule communication. I guess eclipse guys use extension points for this purpose. But lookup api is easy once you get a hang of it.
5) Netbeans 平台有这个非常酷的 Lookup api,用于模块间通信。我猜 eclipse 人为此目的使用扩展点。但是一旦你掌握了它,查找 api 就很容易了。
6)Anyways, its a big design decision, about which platform to choose. Netbeans platform works for me. It may not work for you. Both platform require efforts, both provide wonderful 'out of the box' features. Test drive both and then decide.
6)无论如何,这是一个重大的设计决定,关于选择哪个平台。Netbeans 平台对我有用。它可能不适合你。这两个平台都需要努力,都提供出色的“开箱即用”功能。试驾两者,然后决定。
回答by mmattax
I have experience with the Eclipse RCP and would recommend it.
我有使用 Eclipse RCP 的经验,会推荐它。
Pros:
优点:
- Components - component / plu-in model allows for reuse.
- Uses SWTand JFace which allows for native looking UI
- Pluggable Views, Editors, and Perspectives make layouts easy and configurable.
- Eclipse extension points make extending and integration with 3rd party APIs and tools easy.
- 组件 - 组件/插件模型允许重用。
- 使用SWT和 JFace 允许原生 UI
- 可插入的视图、编辑器和透视使布局变得简单和可配置。
- Eclipse 扩展点使与 3rd 方 API 和工具的扩展和集成变得容易。
Cons:
缺点:
- Learning curve
- 学习曲线
If you choose Eclipse RCP, defiantly get this book, it is invaluble when just starting out with the framework: http://www.amazon.com/Eclipse-Rich-Client-Platform-Applications/dp/0321334612
如果您选择 Eclipse RCP,请务必拿到这本书,它在刚开始使用该框架时非常有价值:http://www.amazon.com/Eclipse-Rich-Client-Platform-Applications/dp/0321334612
回答by Thien
I'm currently developing a Spring RCP application. The documentation is really weak, that's for sure, but the blogs and forum have a good amount of information to get going. Once you do get cruising, things do move fairly fast and you really only need to learn basic Spring if you aren't familiar with the framework. The integrations with Spring libraries such as VLDocking is excellent too.
我目前正在开发一个 Spring RCP 应用程序。文档确实很薄弱,这是肯定的,但是博客和论坛有大量信息可供使用。一旦你开始巡航,事情就会变得相当快,如果你不熟悉框架,你真的只需要学习基本的 Spring。与 VLDocking 等 Spring 库的集成也非常出色。
I think Spring Rich is great if your use case is to develop a standalone Java desktop application. What I mean by that is if you don't need to distribute modules and do online updates then it should fulfill most needs.
如果您的用例是开发独立的 Java 桌面应用程序,我认为 Spring Rich 很棒。我的意思是,如果您不需要分发模块和进行在线更新,那么它应该可以满足大多数需求。
回答by Oliver Watkins
Netbeans RCP is excellent. Its come a long way over the years. It uses a more robust technology ('Swing') that many people use and understand. Eclipse RCP (more specifically SWT) just confused me.
Netbeans RCP 非常出色。多年来,它取得了长足的进步。它使用了许多人使用和理解的更强大的技术(“Swing”)。Eclipse RCP(更具体地说是 SWT)让我很困惑。
回答by Andreas Kraft
Of course it all depends on the kind of applications and services you want to provide, and the target environment. But I can also recommend OSGi as a development and deployment platform. The underlying architecture and specifications are very well developed and proven.
当然,这一切都取决于您要提供的应用程序和服务类型以及目标环境。但我也可以推荐 OSGi 作为开发和部署平台。底层架构和规范得到了很好的开发和验证。
Besides of the Eclipse RCP you should have a look at Apache Felix (http://felix.apache.org) and Knopflerfish (http://www.knopflerfish.org), which are (smaller) open source OSGi framework implementations.
除了 Eclipse RCP,您还应该看看 Apache Felix ( http://felix.apache.org) 和 Knopflerfish ( http://www.knopflerfish.org),它们是(较小的)开源 OSGi 框架实现。
回答by OscarRyz
From my end-user perspective.
从我的最终用户的角度来看。
I've seen more implementations in Eclipse than in the other two. Actually I've know about Netbeans implementations but never got one in my hands.
我在 Eclipse 中看到的实现比其他两个多。实际上,我了解 Netbeans 实现,但从未掌握过它。
From Spring this is the first time I've heard about it.
从春天开始,这是我第一次听说它。
While my answer is definitely a super 10,000 ft view, it reflects somehow the preference the industry had had about using one or the other.
虽然我的回答绝对是超 10,000 英尺的视野,但它以某种方式反映了行业对使用其中一种的偏好。
Also, the difference is proportional to the time the platform has been available. Remember Eclipse create SWT to solve the problems Java Swing had back in 1.3 where is was simply prohibitely slow.
此外,差异与平台可用的时间成正比。记住 Eclipse 创建 SWT 是为了解决 Java Swing 在 1.3 中遇到的问题,这里的速度简直太慢了。
Netbeans have been very beneficiated by the JVM improvements and now runs very very fast.
Netbeans 受益于 JVM 的改进,现在运行速度非常快。
Spring is still young ( compared with the other two ) , but as always, the new things learn from the former, chances are it is simpler to use.
Spring 还很年轻(与其他两个相比),但一如既往,新事物向前者学习,使用起来可能更简单。
Here's an article about these two platform Eclipse RCP vs Netbeans RCP. May be helpful
这是一篇关于这两个平台 Eclipse RCP 与 Netbeans RCP 的文章。可能会有所帮助
http://blogs.oracle.com/geertjan/entry/eclipse_platform_vs_netbeans_platform
http://blogs.oracle.com/geertjan/entry/eclipse_platform_vs_netbeans_platform
回答by basszero
While I haven't explicitly used any of them, I have used portions of the Eclipse RCP. Specifically, I've used the Eclipse OSGi runtime (Equinox) and some common utilities and I've very pleased. OSGi is fantastic to work with. I have several friends on large contracts which use Eclipse RCP (more than I use) and they rave about it.
虽然我没有明确使用它们中的任何一个,但我使用了 Eclipse RCP 的部分内容。具体来说,我使用了 Eclipse OSGi 运行时 (Equinox) 和一些常用实用程序,我非常满意。OSGi 非常适合使用。我有几个使用 Eclipse RCP 的大合同的朋友(比我使用的更多),他们对此赞不绝口。
If my project didn't contain a large mount of legacy Swing, Eclipse RCP would be my first choice. OSGi is just so much fun! (I imagine Spring uses it too, haven't checked though)
如果我的项目不包含大量遗留 Swing,Eclipse RCP 将是我的首选。OSGi 真是太有趣了!(我想 Spring 也使用它,但还没有检查过)
回答by Robert Childan
Eclipse RCP provides plug-in mechanism so that you can add new features later on the deployment. Also via the update mechanism you can change the system without user interference. In the development phase, Eclipse RCP provides a fast, robust ground with perspectives, views, editors, command and action mechanisms. If your project requires many different windows with different toolbar and menus (and also custom context menus) I suggest you to use Eclipse RCP. I only check the videos of Netbeans Platform and run the Helloworld project but it seems slow and clumsy :) 40 seconds to start-up (you can reload the application though w/o restart.) vogella.de is a good collection of tutorials for Eclipse RCP
Eclipse RCP 提供插件机制,以便您可以稍后在部署时添加新功能。此外,通过更新机制,您可以在没有用户干预的情况下更改系统。在开发阶段,Eclipse RCP 为透视、视图、编辑器、命令和操作机制提供了一个快速、健壮的基础。如果您的项目需要许多具有不同工具栏和菜单(以及自定义上下文菜单)的不同窗口,我建议您使用 Eclipse RCP。我只检查 Netbeans 平台的视频并运行 Helloworld 项目,但它看起来又慢又笨拙:) 启动需要 40 秒(您可以重新加载应用程序,但无需重新启动。)vogella.de 是一个很好的教程集合日食RCP

