eclipse Java 桌面应用程序框架

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/51002/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 16:08:56  来源:igfitidea点击:

Java Desktop application framework

javaeclipsenetbeansdesktopplatform

提问by Josh Moore

I am working on designing and building a desktop application. I am thinking about using eclipse or netbeans for the base of this application. However, I have never built on either of these platforms. I am personally leaning to using netbeans because it seams like that platform is an easer learning curve. But, I wanted to ask people that have actually build on these platforms before which one is easier to use?

我正在设计和构建桌面应用程序。我正在考虑使用 eclipse 或 netbeans 作为这个应用程序的基础。但是,我从来没有在这两个平台上构建过。我个人倾向于使用 netbeans,因为它看起来像那个平台是一个更容易的学习曲线。但是,我想问一下在这些平台上实际构建过的人,哪个更容易使用?

My personal definition of easer is as follows:

我个人对easyer的定义如下:

  • Easy to get started with

  • Consistent and logical API

  • Good documentation

  • Easy to build and deploy

  • 易于上手

  • 一致且符合逻辑的 API

  • 良好的文档

  • 易于构建和部署

Thanks very much,

非常感谢,

Josh

乔希

采纳答案by mmattax

I can't say enough about the Eclipse RCP platform. I would recommend it for any Java desktop app development.

关于 Eclipse RCP 平台,我说得再多也不为过。我会推荐它用于任何 Java 桌面应用程序开发。

It's free, has great tutorials, and allows cross-platform development of rich desktop applications that use native OS windowing toolkit, meaning that your application will look native in any platform. It also has a clean API that stays out of your way, and makes deploying to any platform a piece of cake.

它是免费的,有很好的教程,并允许跨平台开发使用原生操作系统窗口工具包的丰富桌面应用程序,这意味着您的应用程序在任何平台上看起来都是原生的。它还具有一个干净的 API,不会妨碍您,并使部署到任何平台变得轻而易举。

If your interested check out this book: http://www.amazon.com/Eclipse-Rich-Client-Platform-Applications/dp/0321334612

如果你有兴趣看看这本书:http: //www.amazon.com/Eclipse-Rich-Client-Platform-Applications/dp/0321334612

回答by Marcio Aguiar

  • Easy to use: I have experience developing on Eclipse and I have to say it's not easy to understand its development model. Sure for basic stuff it has some wizards that make easier, but for something a little more complex it's just difficult. I don't know about Netbeans, but I heard its easier.
  • Consistent API: I think Eclipse wins in this aspect. It runs over OSGI (brings some complexity though) and has plugins extensions for pretty much everything. It seems to be the platform of choice for plugin development, so I can assume it's reliable.
  • Documentation: Eclipse wins by far. The help from eclipse site is excelent and the mailing list has plenny of users questions.
  • 易于使用:我有在 Eclipse 上开发的经验,我不得不说要理解它的开发模型并不容易。当然对于基本的东西,它有一些向导可以让事情变得更容易,但对于更复杂的东西,它只是困难。我不知道 Netbeans,但我听说它更容易。
  • 一致的 API:我认为 Eclipse 在这方面胜出。它运行在 OSGI 之上(虽然带来了一些复杂性)并且几乎所有东西都有插件扩展。它似乎是插件开发的首选平台,所以我可以认为它是可靠的。
  • 文档:到目前为止,Eclipse 获胜。eclipse 站点的帮助非常好,邮件列表中有大量用户问题。

回答by Binil Thomas

RCP has a bigger learning curve, but once you learn the basics the Eclipse IDE itself supports building RCP applications very well. I have only built a plugin for NetBeans (not build a full-fledged application), and the learning curve was lesser than for the RCP application. The book Eclipse Rich Client Platform: Designing, Coding, and Packaging Java(TM) Applicationsprovides a detailed introduction to building RCP applications.

RCP 具有更大的学习曲线,但是一旦您学习了基础知识,Eclipse IDE 本身就可以很好地支持构建 RCP 应用程序。我只为 NetBeans 构建了一个插件(没有构建成熟的应用程序),学习曲线比 RCP 应用程序要短。这本书Eclipse富客户端平台:设计,编码和包装的Java(TM)应用程序提供了一个详细的介绍,以构建RCP应用程序。

回答by Tony BenBrahim

Please see some of the open source applications at http://www.eclipse.org/community/rcp.phpbefore opining that RCP is only for building a text editor. Thanks.

在认为 RCP 仅用于构建文本编辑器之前,请参阅http://www.eclipse.org/community/rcp.php 上的一些开源应用程序。谢谢。

回答by James Schek

I've done a little work with both, but only on relatively simple applications. Both seem to have roughly equal capabilities. I personally prefer the Netbeans platform as it makes more sense to me.

我对两者都做了一些工作,但仅限于相对简单的应用程序。两者似乎具有大致相同的能力。我个人更喜欢 Netbeans 平台,因为它对我来说更有意义。

You should also consider JSR-296, the Swing Application Framework. It provides a basic framework for building Swing Applications, managing application resources, state, etc, but without as much "baggage" as Netbeans and Eclipse. Netbeans IDE has a number of tools for building applications on the SAF. See https://appframework.dev.java.net/for more info.

您还应该考虑 JSR-296,即 Swing 应用程序框架。它为构建 Swing 应用程序、管理应用程序资源、状态等提供了一个基本框架,但没有 Netbeans 和 Eclipse 那么多的“包袱”。Netbeans IDE 有许多用于在 SAF 上构建应用程序的工具。有关更多信息,请参阅https://appframework.dev.java.net/

Without knowing more about your application, it's hard to point you at the appropriate strengths/weaknesses of the two platforms.

如果不了解有关您的应用程序的更多信息,就很难指出这两个平台的适当优势/劣势。

回答by James Schek

I have a similar task and I am also considering different frameworks. I have some experience with Eclipse (~4 months developing RCP) and now Netbeans (played around for a couple of days). IMHO these frameworks are too complicated. You just end up debugging into Eclipse-specific plugin loaders trying to figure out why you get a ClassNotFoundException or a NullPointer. The same story with NetBeans: somehow somewhere somewhat reads out xml config files and creates UI from that, cool, as long as you follow the tutorial. And of course you can't develop and Eclipse-based RCP using some other IDE, NB is also very jealous about its usage (unless you do some hacks like I did). What I'm lacking is a clear way to debug my threads from main to action performed. Instead I'm always told what I have to do to avoid exceptions. And so I have to keep my fingers crossed each time I'm trying to pull something new. And it never works out the first time. Now I thought about the features I need and I looked out for smaller projects that aim at specific functionality like plugin management eg. And there are plenty. Just compile a list of the functionality you need and start adding smaller frameworks by integrating them into your project. This also makes sense since your project should consume less RAM in the end.

我有一个类似的任务,我也在考虑不同的框架。我对 Eclipse(开发 RCP 约 4 个月)和现在的 Netbeans(玩了几天)有一些经验。恕我直言,这些框架太复杂了。您最终会调试到特定于 Eclipse 的插件加载器,试图找出为什么会收到 ClassNotFoundException 或 NullPointer。NetBeans 也有同样的故事:只要您按照教程进行操作,就可以在某个地方读取 xml 配置文件并从中创建 UI,很酷。当然,您不能使用其他一些 IDE 开发和基于 Eclipse 的 RCP,NB 也非常嫉妒它的使用(除非您像我一样进行一些黑客攻击)。我缺少的是一种清晰的方法来调试我的线程从主要到执行的操作。相反,我总是被告知我必须做什么才能避免异常。所以每次我试图拉出新的东西时,我都必须保持手指交叉。它永远不会在第一次奏效。现在我考虑了我需要的功能,并寻找针对特定功能的小型项目,例如插件管理。而且有很多。只需编译您需要的功能列表,然后通过将它们集成到您的项目中来开始添加较小的框架。这也是有道理的,因为您的项目最终应该消耗更少的 RAM。只需编译您需要的功能列表,然后通过将它们集成到您的项目中来开始添加较小的框架。这也是有道理的,因为您的项目最终应该消耗更少的 RAM。只需编译您需要的功能列表,然后通过将它们集成到您的项目中来开始添加较小的框架。这也是有道理的,因为您的项目最终应该消耗更少的 RAM。

回答by SCdF

I have used Eclipse as a framework base but it was mostly just using SWT-- we didn't really use much of the RCP.

我使用 Eclipse 作为框架基础,但它主要只是使用 SWT——我们并没有真正使用太多的 RCP。

It really depends on what you're writing, but from what I have learned from using Eclipse it is really only suited for writing an app that involves you editing data using various views (just like editing code).

这实际上取决于您正在编写的内容,但根据我从使用 Eclipse 中学到的知识,它实际上仅适用于编写涉及您使用各种视图编辑数据的应用程序(就像编辑代码一样)。

Anything more random that than can cause you to start pushing the framework in a direction it wasn't designed and causing massive fail.

任何比可能导致您开始将框架推向其未设计的方向并导致大规模失败的随机性的东西。

回答by ggasp

You'll use Swing to develop your application because any other windowing framework is useful only if you have a previous knowledge or the appropriate background.

您将使用 Swing 来开发您的应用程序,因为任何其他窗口框架只有在您具有先前的知识或适当的背景时才有用。

You can rely on http://www.javadocking.com/to streamline you application.

您可以依靠http://www.javadocking.com/来简化您的应用程序。

If your application requirements are highly focused on the user interface, maybe you can look in another direction like Adobe Air.

如果您的应用程序要求高度关注用户界面,也许您可​​以寻找另一个方向,例如 Adob​​e Air。

回答by Thorbj?rn Ravn Andersen

If you really want to avoid crossplatform maintainance then work with Swing. This buys you all platforms. RCP requires native libraries for each platform.

如果您真的想避免跨平台维护,请使用 Swing。这可以为您购买所有平台。RCP 需要每个平台的本机库。

We have had good experiences with Swing.

我们在 Swing 方面有很好的经验。