简体   繁体   中英

Cross-platform desktop development

I need an advice for cross-platform engine/framework for desktop PC application development (Windows, MAC, Linux). I see 3 possibilities, Qt, Java and Adobe AIR.

  • It must be easy to install (run-time is a drawback, but C++ wrapper and/or installer can solve the issue I think).
  • It must be fast and have a rich GUI (not 3D game, but definitely some 2D graphics).
  • The development environment must be easy to establish and the UI development tool must have drag&drop functionality to define application layout.
  • Target application must have native look and feel. The professional paid support should be available.

All of these criteria are met by Qt, with the exception of "native look and feel". There is no such thing as a cross-platform framework with native feel, especially on OS X, where users are very demanding about the "feel" of applications. If you really want native look and feel, you are best served by writing a shared framework in C++ or C# and then providing native GUI on each platform (you can use MonoMac to provide a native Cocoa UI using C# instead of the native Objective-C, if that's your cup of tea).

That said, we've been very happy with Qt (and the Commercial support) for cross-platform development. Particularly the new OpenGL accelerated 2D Scene API makes animated UIs quite easy. QtCreator is a decent IDE with visual designer support.

Contrary to others, probably due to the fact that I worked on a real-time trading Swing application, I consider Java to be the best answer to your requirements (however, i consider this question as subjective, as previous answers already shows). Let me develop.

It must be easy to install (run-time is a drawback, but C++ wrapper and/or installer can solve the issue I think).

Using Java, you can rely upon Java Web Start , which is, as far as i know, the best solution for easy to use applications : you click a link on the browser, and the application is installed in start menu/desktop and started as soon as it is downloaded. Seems like Adobe AIR offers an equivalent feature, but to my mind Java Web Start integrates, due to the deepness of its ecosystem, far more powerfull distribution solutions (like, as an example, the easy ability to generate the .jnlp file on demand).

It must be fast and have a rich GUI (not 3D game, but definitely some 2D graphics).

Contrary to most popular belief, generating good graphics in Java is possible. Take as an example a look at excellent filthy rich clients companion site of the excellent book.

The development environment must be easy to establish and the UI development tool must have drag&drop functionality to define application layout.

Eclipse is a defacto industry standard for IDEs, and it integrate multiple DnD IDE builders. I would simply take as example the recently liberated Windows Builder Pro .

Target application must have native look and feel. The professional paid support should be available.

Well, Swing default look'n'feel is indeed a little different from system one. however, there are excellent third-party ones, listed here , as an example.

Finally, some examples :

  • the excellent Palantir Technologies blog list some outstanding Swing applications
  • Gephi is a rather complete and efficient high-volume graph viewer
  • My previous work (don't consider it as a masked ad, it's only a way to show some rather solid Swing).

I would not recommend Java for desktop development. I do not care what other say, Java is still slow compared to native languages like C++. I would go with Qt. The IDE has a GUI builder and can be integrated into Eclipse or Visual Studio.

Here's a helpful resource: http://qt.nokia.com/products/

Have a look at Appcelerator Titanium : it basically wraps a web app in a browser. You can have anything you want in a GUI using wen tech, but it looks like an ap[p.

Strangely, nobody mentioned Real Studio (now Xojo ) which does meet all your requirements:

  • It is easy to install and does not require a separate run-time
  • It compiles to native code so is reasonably fast
  • It has a good UI library that is native for each platform
  • The IDE is very nice with drag and drop UI designers
  • Target applications are fully native and use native controls

First of have to mention http://wxwidgets.org/ , one of the most popular X-platoform frameoworks. Depending on the complexity of your application and the requirements to the "nativeness", a cross-platform framework may work for you. The x-platform applications built with framework usually feel a bit "alien", especially on the Mac, but workable. A good example is http://taskcoach.org/ .

If your users are tolerant to hearty download sizes, hefty memory requirements and a bit of non-native look-and-feel then plain Java, eclipse RCP or NetBeans platform can work for you. You may save quite a bit of development time going this route.

However I am not aware of cross-platform framework that satisfies all your requirements.

If you need to get to a production-level application, the strategy that I have seen worked best was to stay native but split the UI-dependent code into cross-platform (eg C++ business logic) and UI. This way, you will use native interface building tools (each platform has something good there). Depending on the complexity and "finish" requirements of your application you may actually save time going this route.

A great overview of the "Native X-Platform" process can be found in this answer by Chris Hanson .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM