2

I'm writing a client app, quite old school, quite conservative. On Windows, I'd probably use .NET Forms, or maybe WPF, I'm not sure. On the Mac, I'd use Objective-C, Cocoa, and all that stuff. But I want this app to work on both, and I'd rather only write it once.

Should I write it in QT? I heard that when you get down to it, QT is buggy when you use it across platforms. Do I have to worry about continuity, what with Nokia's recent troubles? What does the community think about Digia?

Should I write it in Java? Newer Mac OS doesn't come with Java anymore, and Windows never has. How can I create a good setup experience like that? What about USB devices? There are some Java USB projects, but they're all Windows or Linux based, no Mac. I'm also worried about getting a native look&feel, but I guess Swing has me covered there.

Should I write it in Python? I'm worried about performance here. Also, I've written large Python apps before, and I found that Python scales poorly to large code bases, because of the lack of static analysis.

What do you write yours in?

Dirk Groeneveld
  • 2,547
  • 2
  • 22
  • 23

3 Answers3

5

I asked a similar question a few weeks back Building a Mac and Windows GUI Application.

With regards to "native look & feel": If you want this, don't use a cross-platform GUI library. Write the GUI layer once for each platform. You can share the core application logic. You can probably get away with using Qt or wxWidgets on Windows and Linux since requirements for look and feel are more relaxed, but it will look rather out of place on Macs.

If "native look & feel" isn't essential, I'd say go with Qt or wxWidgets and save yourself the headaches. I wouldn't worry about continuity for Qt. Its desktop framework is very mature and isn't maintained by Nokia (they maintain the mobile part). The open source community will keep it alive. Don't know how buggy it is, but what cross-platform framework doesn't have its share of bugs?

If "native look & feel" is essential, read on for languages choices for the core application logic.

Java: Don't. Swing doesn't actually provide a native look & feel. Just try and make any comprehensive GUI with it. Swing is also very painful to program in. There are plenty of alternatives to Swing, but I doubt any of them will be better than Qt. In addition, most apps will probably need to hook into the OS. Java bridging on Macs is deprecated. You'd have to use JNI for any extensions. Probably the same for Windows.

Python: That's the path I took. Python is not only cross-platform, it comes with a rich set of cross-platform libraries. Also easy to write C/C++ extensions on any OS. Downside is that it's relatively slow to start and takes more memory than a native C++ app. Trying to set up a deployable application is rather painful too. I wouldn't worry too much about performance though unless you plan on doing serious data processing.

C++: Also a good choice. It's not too hard to write a cross-platform app with C++ if you use cross-platform libraries like Qt or Boost (haven't tried, conclusions from questions and research). Also compatible with xCode, Visual Studio, etc, so it's easy to set up the project.

Community
  • 1
  • 1
Yunchi
  • 5,529
  • 2
  • 17
  • 18
  • Boost is a rather low-level "concept" library, not a GUI framework. Qt uses native control rendering on OS X and tries quite hard to behave like native controls do. Where it doesn't it's a bug, so feel free to report it so that it has a chance of getting fixed. I have Qt applications where it's impossible to tell that they were not done using the Objective C frameworks. It only depends on your skill in applying it. – Kuba hasn't forgotten Monica Jun 26 '12 at 23:50
2

Being mainly a Java dev I lean heavily to java. Your concerns with java can for the most part be handled.

One I would JavaFX instead of Swing. It is still fairly new, but I have been playing it recently and it is pretty nice. You should be able to create what ever look you like, and it be pretty consistent. The other added benefit, is that they are adding Native packaging for JavaFX. It is still early, and that is not in the stable releases yet from what I understand.

No matter what you go with there will be hurdles and issues. So regardless of what I said above, you should pick whatever you are most comfortable in. Heck you could if may even be able to go the .net route and use Mono. I hear Mono works well, especially with projects built using it from the beginning.

Jacob Schoen
  • 14,034
  • 15
  • 82
  • 102
1

There are number of options available to you

  • Java application
  • Web application
  • Use a wrapper like App Accelerator

Java Application

Writing a Java application which is platform independent would suite your need. But development wise you might face problems. Specially GUI experience.

Web Application

Web application is the right way to go but installing it and setting up a web server in local machine might be bit tricky. Moreover if you want to host the application this is the way to go.

Application Wrapper (App-Accelerator)

If you can use an application wrapper it will work in pretty much any platform - windows, mac os. A good example might be Wunderlist.

Chan
  • 2,601
  • 6
  • 28
  • 45