Java 与 EMF 和RCP 与 C#

发布于 2024-09-16 19:12:19 字数 753 浏览 2 评论 0原文

我们正在考虑将未来项目的技术从 C++ 切换到 Java 或 C#。因此,现在自然会发生一场大讨论,该讨论该选择什么。问题是我们都没有 EMF 或 RCP 的行业经验,如果能够满足我们的需求,那就太好了。

所以我想问你你更喜欢什么。我们的程序是:

  • gui Heavy(很多对话框、属性)

  • 相当大的模型(序列化的 xml 现在占用大约 15mb)

  • 应用程序应该集成到我们的框架应用程序中心

  • 数据格式(xml 和二进制) )必须与我们当前的格式相同

  • 需要图形编辑(创建、移动、连接形状+编辑其属性)< /p>

  • 数据模型中存在许多相似但微小不同的对象

以及实际问题分别是:

  • C# 中有 EMF 的等效项吗?

  • C# 中有 RCP 的等效项吗? (例如编辑数据模型、GUI 前端的命令...)

  • RCP 中的 gui 编辑是否与 Windows 窗体或 WPF 一样好且灵活?

  • EMF 的刚性/柔性如何?

  • 我们在数据模型之间存在很多相互依赖关系(有些控制其他模型或允许对它们进行不同的选项) - 您将如何对这些模型进行建模?

  • 您会选择哪些选项?

非常感谢曼尼

的任何建议或意见

We're thinking about switching technology for our future projects going from C++ to Java or C#. So naturally there's a big discussion going on right now what to choose. The problem is that none of us has industry experience with EMF or RCP, which would be quite nice to have if it fits our needs.

so i wanted to ask you what you would prefer. our program is:

  • gui heavy (lots of dialogs, properties)

  • quite big models (serialized xml takes up about 15mb right now)

  • application should be integrated into our framework-application-center

  • data format (xml and binary) has to be the same as our current format

  • graphical editing is needed (creating, moving, connecting shapes + editing their properties)

  • lots of similar but tiny different objects in data model

and the actual questions are:

  • is there an equivalent to EMF in C#?

  • is there an equivalent to RCP in C#? (e.g. commands to edit data model, gui frontend, ...)

  • is the gui editing in RCP as good and flexible as with windows forms or WPF?

  • how rigid/flexible is EMF?

  • we've got lot's of interdependencies between data models (some control others or allow different options on them) - how would you model these?

  • what of the options would you choose?

thanks very much for any advice or opinions

manni

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

悍妇囚夫 2024-09-23 19:12:19

作为 Java 开发人员,我不能对 C# 说太多,但我可以给您提供有关 Java 方面的概述:RCP 有几个不错的选择(最突出的当然是 Eclipse,但还有其他一些,如 NetBeans)。学习曲线相当陡峭,但是一旦你运行了“hello world”,它就会变得容易得多。 GUI 编程没有问题(您有多种选择,并且存在许多免费和商业小部件),并且您有多种处理 XML 的方法。一般来说,几乎所有东西都有一个(通常是免费的)库。因此,如果您喜欢有选择,Java 就适合您。

另一方面,C# 语言在技术上处于领先地位。 Java7 可以缩小差距,但不会缩小差距,这是肯定的。

如果你想同时拥有 JVM 的优点(开放、广泛、独立于平台、大量的库......)和现代语言的优点,那么你应该看看 Scala(你可以混合 Scala 和 Java 代码)没有问题)。 Scala 非常创新,混合了 OO 和函数式特性,但对于习惯 C++/Java 风格语法的程序员来说仍然非常“容易理解”。

As Java developer I can't say much about C#, but I can give you an overview about the Java side: There are sevaral good choices for RCP (the most prominent is of course Eclipse, but there are others as NetBeans). The learning curve is quite steep, but once you have the "hello world" running, it gets much easier. GUI-programming is no problem (you have several choices, and there exist a lot of free and commercial widgets), and you have several ways for dealing with XML. Generally for almost everything there is a (often free) lib. So if you like to have choices, Java is for you.

On the other hand the C# language is technically ahead. Java7 could decrease the gap, but won't close it, that's sure.

If you want to have both the advantages of the JVM (open, widespread, platform independent, plethora of libs...) and the advantages of a modern language, then you should have a look at Scala (you can mix Scala and Java code without problems). Scala is very innovative, mixing OO and functional features, but is still very "accessible" for programmers that are used to a C++/Java style syntax.

定格我的天空 2024-09-23 19:12:19

我对 EMF 和 RCP 一点也不熟悉,但从我快速浏览的情况来看,.Net 中肯定有“等价物”。然而我有很大的偏见,所以不要相信我的话。

有从 xml/xsd 生成数据类的工具,反之亦然 (xsd.exe),Visual Studio 内的图形集成建模工具等。

还有 WPF,我强烈推荐它用于任何项目(不仅仅是图形密集型项目) ;对象模型很容易使用,它具有声明式 GUI 设计 (XAML),并且与 WinForms 等旧的 .Net 技术相比,它使类似图表的工具(如您所描述的)更容易制作。在使用 WPF/Silverlight 时,请特别关注 MVVM(模型-视图-视图模型),以了解最广泛使用的模式。

I'm not familiar at all with EMF and RCP, but from what I gathered in a quick glance, there are cetainly 'equivalents' in .Net. However I'm heavily biased so don't take my word for it.

There are tools from generating data classes from xml/xsd and vice-versa (xsd.exe), graphical integrated modeling tools inside Visual Studio etc.

And there is WPF, which I highly recommend for any project (not just graphical-heavy ones); the object model is easy to work with, it has declarative GUI design (XAML), and it makes diagramming-like tools (like what you described) a lot easier to make compared to older .Net technologies like WinForms. Especially look into MVVM (Model-View-ViewModel) for the most wide-spread pattern when working with WPF/Silverlight.

轻拂→两袖风尘 2024-09-23 19:12:19

对于大部分应用程序,我强烈推荐 Eclipse RCP + EMF(Eclipse RAP 也是一个优点,因为您可以单一来源应用程序并“免费”获得基于 Web 的丰富 Ajax 应用程序)。

如果您需要访问本机功能,您始终可以用另一种语言编写或使用 JNI,或实现某种形式的 IPC 或使用 Web 服务 (SOAP)、REST-JSON 或 DBus 或您喜欢的任何最喜欢的通信机制。

我有时会从我的 Java 应用程序中调用 Linux 工具来完成这项工作(例如“ssh someserver”或“rsync”),并且感觉这样做很舒服。当其他工具完美地完成工作并且我可以继续下一个有趣的任务时,我不认为获得“Java 的纯 SSH 库”或“Java 的纯 Rsync 库”是一个紧迫的理由。

顺便说一句,虽然我偏向 Eclipse 和 JVM(注:Java 语言不是我最喜欢的,我更喜欢 Scala 和 Groovy,但使用 EMF,使用 Java 语言工作更容易),我对 .NET 有一些经验。虽然 .NET 有一些优点(一是 C# 优于 Java 语言,但仅此而已,二是 Microsoft 为 Java[SE] API 提供的内置功能多于 Sun/Oracle 提供的功能),但有些事情你需要考虑。

首先是跨平台性。虽然有 Mono,但总体而言 .NET 很难移植。虽然您可能不需要这个,但它可能会派上用场。此外,Eclipse RCP 不仅“更跨平台”,而且优于 .NET Framework 提供的开箱即用功能。 (我知道这不是一个公平的比较,与 Visual Studio Shell 进行比较更公平)

其次是许可证,然后是工具和成本(制作三项)。整个 Eclipse 工具都是免费提供的。它们是开源的(您可以修复任何错误,贡献补丁)。该许可证是开放的,您可以在其上正确地创建商业产品。

第三是功能性。 RCP 本身内部有很多功能,当与 EMF、其他 Eclipse 项目和 Java 生态系统的其余部分(更不用说 JVM 语言)结合使用时,您有很多基本功能的选择。

另请参阅:http://eclipsedriven.blogspot.com

For the bulk of the application I highly recommend Eclipse RCP + EMF (Eclipse RAP is also a plus as you can single source the application and get a web-based rich Ajax application "for free").

If you need to access native features you can always write it in another language or use JNI, or implement a form of IPC or using web services (SOAP) or REST-JSON or DBus or whatever favorite communication mechanism you like.

I sometimes call Linux tools from my Java app to do the job (e.g. "ssh someserver" or "rsync") and feel comfortable doing it. I don't find it a pressing reason to get a "pure SSH library for Java" or "pure Rsync library for Java" when other tools do the job perfectly and I can get on with the next interesting task.

BTW although I am biased towards Eclipse and JVM (Note: Java language isn't my favorite, I prefer Scala and Groovy, but with EMF it's easier to work in Java language), I have some experience with .NET. While there are some good things about .NET (one is that C#'s superior over Java language, but that's just about it, the second is Microsoft packs more functionality built-in than Sun/Oracle gives to Java[SE] API), there are some things you need to consider.

First is cross-platformness. While there is Mono, overall .NET is hard to port. While you may not have a need for this, it may come in handy. Besides, Eclipse RCP not only it is "more cross-platform" but it is superior to the out of the box functionality provided by .NET Framework. (I know it isn't a fair comparison, it's fairer to compare it with Visual Studio Shell)

Second is license, then tooling, and cost (makes three items). The whole Eclipse tooling is freely available. They are open source (you can fix any bug, contribute a patch). The license is open and you can rightly create commercial products on top of it.

Third is functionality. There are so much functionality inside RCP itself, when combined with EMF, other Eclipse projects and the rest of Java ecosystem (not to mention the JVM languages) you've a lot of options for basic functionality.

See also: http://eclipsedriven.blogspot.com

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文