8 ms·
So then what's the best way to do cross-platform development? For all its faults, Java does deliver something that resembles the "write once, run anywhere" dre
by fdb 16y ago
So then what's the best way to do cross-platform development?
For all its faults, Java does deliver something that resembles the "write once, run anywhere" dream.
Any idea for a high-performance, cross-platform, native UI development stack? Is C++/Objective-C still the best option?
- albertcardona 16y agoGTK is trying to get there. Gimp was ported to MacOSX GTK--haven't checked in a while the state of the port. The Inkscape dev team at least has high hopes that GTK will become stable for MacOSX. http://gtk-osx.sourceforge.net/ http://gtk-osx.sourceforge.net/
- blub 16y agoI disagree with GTK, and I recommend Qt. I use several GTK apps on Windows and they don't look native. Furthermore, GTK has some deeply ingrained usability issues - such as the close button - that they bring to all platforms.
- FooBarWidget 16y agoWhich close button are you talking about and how is it inherent to GTK?
- pmjordan 16y agoI'm guessing the close button on dockable floating windows. Is there an implementation of GTK that doesn't run via X11 on the mac? Gimp/Inkscape are lovely software on Linux, but using them on the Mac drives me insane. They're "meh" on Windows. I concluded a while back that the only decent way to do GUI programming properly was to develop multiple native frontends for the platforms you want to support. Everything else seems to produce crap. I haven't found the ideal runtime/language for this yet, though. The C family is an obvious candidate but is a little more low level than necessary for desktop apps. .NET/Mono seems promising, though I do worry about having to distribute the Mono runtime with apps. Plus, people seem to have an irrational fear of it (though probably not end-users).
- ramchip 16y agoWhat about Qt? It looks good for me, although I never tried on a mac.
- masklinn 16y agoIt's meh. Not as bad as GTK+ by a long shot but still a far cry from native applications. And OSX users generally don't like non-native applications (for a number of reasons)
- crs 16y agoNothing, Nokia has come along way with it. It the latest (Qt 4.7.0) they are slowly getting things closer and closer to native look and feel. There are carbon and cocoa versions for the mac. The Cocoa version obviously integrate better than the carbon version will. There are also Qt classes to integrate Qt based widgets into cocoa based containers etc. Is it perfect, not even close. Is it pretty darn good, yes.
- aidenn0 16y agoI've been very satisfied with Qt on the mac. I've ported a couple of linux applications I use. They are not as good as truely native ports (MacVim is clearly more of a "mac" app then any Qt built application), but it gets basic things like menu bar at the top and shortcuts using command instead of ctl right.
- roel_v 16y ago"I concluded a while back that the only decent way to do GUI programming properly was to develop multiple native frontends for the platforms you want to support. Everything else seems to produce crap." This +100. Qt is OK-ish if dev resources are a bigger concern than platform integration, Gtk is not even remotely integrated with the platforma (well except in a Gnome desktop where it basically is the platform), and all the other attempts like wxWidgets, Tcl/Tk and the hundreds of smaller projects/products don't even come close. Anyone developing desktop software who want to make his application feel 'native' to each platform has to make various frontends, with each platform's native UI toolkit. It takes some careful design but it's not all that painful, really.
- blub 16y agoHere's an example: I use WorkRave to remind myself to take breaks. If I open the preferences dialog, I can close it by pressing Close, clicking the X in the corner or pressing Esc. No matter what I do, my changes are saved. In Windows the guideline is to use Ok & Cancel buttons while most of the GTK apps I've seen use just a Close button. GIMP is a mixed experience: most dialogs have both buttons while others just the close button.
- wheels 16y agoI love Qt, and much prefer working with it to Cocoa, but Qt on OS X is ugly and doesn't feel particularly native. I can usually recognize a Qt app as soon as it starts up. It still gets the job done in the cases where elegance doesn't matter (i.e. we have a tool for optimizing query parameters that has a Qt GUI that we just use internally), but for places where it does, it's better to go with Cocoa.
- nikster 16y agoThis is why Steve Jobs is against ALL cross platform development. Because it's going to be a lowest common denominator. At the same time, advancements on the platform are not going to be taken advantage of. Any new features in OSX would go unused - because it's not in the lowest common denominator. As a Java dev, I have to say he has a good point there. I just wish Objective C didn't suck so much.
- Isofarro 16y agoOpen Pascal with Lazarus.
- dragonquest 16y agoShouldn't that be Object Pascal?
- FooBarWidget 16y agoNo, and neither should it be Open Pascal. He meant Free Pascal, an open source implementation of Pascal that also supports Delphi syntax (Object Pascal).
- pmjordan 16y agoUI & cross-platform dev are two separate issues. Cocoa/Java has been dead for some time, and nobody who cares about design or usability seems to use Swing etc. It mainly seems to be developer tools in the Java ecosystem. I'm more worried about development of server stuff becoming more painful, particularly as Clojure, my favourite language, is (currently) JVM-based. There's obviously plenty of other JVM-based server development going on, and it'll be a pain if that stops working properly. As for Cocoa bindings in higher-level languages on Mac, there are MacRuby, Nu and Mono. I haven't tried any of them, but this will be relevant for me in the near future so I'd be interested in any war stories from anyone deviating from the Objective-C path. I generally wouldn't recommend cross-platform GUI development, it just ends up producing mediocre software; obviously, try and pick a common language/runtime if you're going to have different frontends.
- coliveira 16y ago> I'm more worried about development of server stuff becoming more painful, particularly as Clojure, my favourite language, is (currently) JVM-based That is what the clojure guys get for investing in a dead platform. Java as a language was dying. The sun-oracle deal means that the Java platform is also dead for open source.
- dgabriel 16y agoJava seems to have been dying for quite a long time, if you believe the hype. I think I saw the first "Java is Dead," headline in 2002. Frankly, I doubt the language is taking a dirt nap any time soon.
- stcredzero 16y agoAny language that has some measure of 'good' is like a well loved comic book character. There may be reports of death, but if the character is well loved, there will be some means of bringing the thing back.
- voidpointer 16y agoDepending on what you want to do, Adobe AIR would be a practical way of delivering applications on Mac, Win and Linux...
- zenocon 16y agoI am building one now, and they do allow you to create a native installer for all three platforms. The only thing that sucks is that you have to build the installer on said platform. Not that big a deal with vmware, but still kind of annoying.
- rryyan 16y agoIt's worth mentioning that AIR apps do not use native UI widgets. (and in my opinion: the Flex widgets kind of suck)
- MartinCron 16y agoAgain, depending on what you want to do, SilverLight works pretty darn well on Windows and Mac these days.
- dingle_thunk 16y agoAdobe Air, Silverlight/Moonlight Out-of-Browser, Mono, HTML5/JS.
- AndrewS 16y agoDoes anyone have any experience with Mono on macs?
- Tichy 16y agoMaybe something like Mozilla's Open Web Apps? http://blog.mozilla.com/blog/2010/10/19/prototype-of-an-open-web-app-ecosystem/ http://blog.mozilla.com/blog/2010/10/19/prototype-of-an-open...
- wheaties 16y agoHave you considered Python? I'm a big fan of statically typed languages but that's the one I use for all my scripting on *nix and Windows. It's used by a whole slew of web developers. Nothing stopping it from becoming the new cross-platform development language of choice.
- Tamerlin 16y agoHow about C# in the form of Mono?