Windows 和 OS X 桌面应用程序的首选开发平台

发布于 2024-08-04 04:48:48 字数 440 浏览 10 评论 0原文

我即将编写一个主要在 Windows 和 Mac OS X 上运行的小型桌面应用程序。到目前为止我的选择是:

  • 我通常使用 Java + Swing 来完成此类任务,但是这个应用程序应该非常小(大约 1Mb),并且我不想在 Windows 版本上嵌入 ~26mb JRE 或询问用户安装它。
  • 我对 Flex 和 AIR 有很好的经验,这个应用程序的用户最终将使用 Flash 播放器(该应用程序大部分时间都会输出 swf 文件)。但性能很重要(有点),我想编写一个具有本机外观和感觉的应用程序。
  • 我也一直在考虑realBasic。它看起来很有前途并且很容易上手。但是,我真的不想写basic。自从我写基本程序以来已经有很长一段时间了(大约10年)。另外,我找不到很多它的支持者。

我没有任何 C/C++ 工作经验。这是一个非常小的项目,我想在大约一个月内完成。有什么建议吗?

I'm about to write a small desktop app that should run on Windows and Mac OS X mainly. The choices I have so far are:

  • I usually use Java + Swing for this type of stuff, but this app should be really tiny (about 1Mb) and I don't want to embed the ~26mb JRE on the Windows version or ask users to have it installed.
  • I have good experience with Flex and AIR and users of this app will eventually use the Flash player (the app will output swf files most of the time). But performance is important (kinda), and I would like to write an app that have native look-and-feel.
  • I've been also considering realBasic. It seems promising and easy to get started with. But, I really do not want to write basic. It's been a very long time since I wrote basic programs (about 10 years). Plus, I can't find many supporters of it.

I don't have any working experience in C/C++. And this is a very small project that I would like to finish in about a month. Any suggestions?

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

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

发布评论

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

评论(5

明天过后 2024-08-11 04:48:48

REALbasic 是创建跨平台应用程序的好方法。该语言是完全面向对象的,并且与 Java 的相似程度远远超过您可能使用过的任何版本的 BASIC。

REALbasic 确实可以编译为具有本机外观的本机应用程序,但可执行文件并不小。即使是一个空应用程序也会超过 1MB。

然而,考虑到您的应用程序将输出 Flash 文件,看来 Flex/AIR 可能对这个项目最有意义。

REALbasic can be a great way to create cross-platform apps. The language is fully object-oriented and resembles Java far more than it does any version of BASIC that you may have used.

REALbasic does compile to native apps with a native look-and-feel, but the executables are not small. Even an empty app will be more than 1MB.

However, given your app will output Flash files, it seems like Flex/AIR might make the most sense for this project.

戒ㄋ 2024-08-11 04:48:48

我想说坚持使用 Java + Swing,与相反的信念不同,您可以使用 swing 编写出漂亮的程序。您需要付出一些努力来设置一些属性,并确保根据您所使用的操作系统创建文件的位置,但这比 C++ 或 C 的工作量要少得多。
即使您什么都不做,您的应用程序看起来也一样,并且可以在所有主要操作系统(Linux、Windows、Mac Os X)上运行。

如需一些参考,请查看 mac-widgets,这些与 os x 提供的对应项没有什么不同。这家伙还有一个博客,他在其中解释了他是如何做到的。在java中,你可以重写任何东西来将其塑造成你想要的样子。

至于 JRE 安装 os x 预装了 java 没有问题,对于 Windows,您可以使用 exe 包装器,它会检查正确的 JRE 并为您安装它,但正如它已经指出的那样,大多数计算机都预装了 java。

I would say stick with Java + Swing, unlike contrary belief you can have great looking programs using swing. You need to put in some effort to set some properties and make sure where you create files depending on the os your on but it is much less work then say C++ or C.
Even if you do nothing you application will look the same and work on all major os's (Linux,Windows,Mac Os X).

For some reference check out mac-widgets these are no different from the os x supplied counterparts. The guy also has a blog where he explains how he did it. In java your can override anything to shape it into the way you want it to look.

As for JRE install os x comes pre installed with java no problem there for Windows you can use a exe wrapper and it checks the correct JRE and installs it for you, but as it's already pointed out most computer have java pre installed.

无声静候 2024-08-11 04:48:48

如果您想要一个在 Windows 和 OS X 上轻松运行的单一代码库,您基本上有两个选择:

  • Java
  • Web 应用程序。

我对 Java 路径有很好的经验。程序运行得相当好,并且您在 Swing GUI 中拥有强大的功能(但需要一些时间来适应)。如果您使用 Java Web Start 来启动,您可以控制部署,系统会很容易地提示用户下载 JRE(最新版本的下载量要小得多),并且您可以选择 Nimbus 的外观和感觉(我认为这是非常好)或平台特定的外观和感觉,在您的主要方法中使用一行。

我认为唯一的缺点是 JRE 下载。我会接受这一点并继续这个项目:)如果没有大量的苦劳,你不会得到任何更好的东西。

If you want a single code base running easily on both Windows and OS X you basically have two choices:

  • Java
  • a Web Application.

I have good experiences with the Java path. Programs run reasonably well, and you have much power in the Swing GUI (but it takes some getting used to). If you use Java Web Start for launching you have control on the deployment, users are easily prompted to download the JRE (the latest version is a much smaller download), and you can either go for the Nimbus look and feel (which I think is really nice) or a platform specific look and feel with a single line in your main method.

The only downside as I see it, is the JRE download. I would accept that and get on with the project :) You will not get anything better without a LOT of elbow grease.

九厘米的零° 2024-08-11 04:48:48

JRE 在基于 Windows 的目标用户中真的那么罕见吗?我相当确定大多数制造商现在都在他们的机器上提供了最新版本的 Java。如果很少见,那么使用 SWT 并编译为本机可能是一种选择。

1 - SWT(据我所知)将 Swing 内容编译为本机基本上意味着您需要整个 JRE。我的记忆力衰退告诉我,这是由于一些奇怪的许可证要求造成的。

Is the JRE really that rare among your Windows based target users? I'm fairly sure most manufactures now ship a recent version of Java on their machines. If it rare then using SWT and compiling to native might be an option¹.

¹ - SWT as (as I understand it) compiling the Swing stuff to native basically means you need the whole JRE. My failing memory tells me that this is due to some odd licence requirements.

凌乱心跳 2024-08-11 04:48:48

网络应用程序对您来说效果如何?如今,除了游戏等高清实时图形之外,浏览器的 GUI 功能对于大多数事情来说都足够好了(前提是浏览器不是 IE)。像 http://labs.mozilla.com/prism/ 这样的东西可能符合要求?

How well would a web-app work for you? These days, the GUI capabilities of the browser is good enough for most things (provided the browser is not IE) other than high definition real time graphics like games. things like http://labs.mozilla.com/prism/ might fit the bill?

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