News for hackers. Stuff that matters.
Re:Apple deprecates Java by fdb on Thursday October 21, 2010 @05:32AM (#1814807)
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?

Re:Apple deprecates Java by pmjordan on Thursday October 21, 2010 @06:02AM (#1814854)
UI & 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.

Re:Apple deprecates Java by coliveira on Thursday October 21, 2010 @09:21AM (#1815246)
> 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.

Re:Apple deprecates Java by dgabriel on Thursday October 21, 2010 @10:01AM (#1815356)
Java 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.
Re:Apple deprecates Java by stcredzero on Thursday October 21, 2010 @12:44PM (#1816277)
Any 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.
Re:Apple deprecates Java by wheaties on Thursday October 21, 2010 @09:46AM (#1815325)
Have 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.
Re:Apple deprecates Java by voidpointer on Thursday October 21, 2010 @06:03AM (#1814856)
Depending on what you want to do, Adobe AIR would be a practical way of delivering applications on Mac, Win and Linux...
Re:Apple deprecates Java by rryyan on Thursday October 21, 2010 @10:49AM (#1815614)
It's worth mentioning that AIR apps do not use native UI widgets. (and in my opinion: the Flex widgets kind of suck)
Re:Apple deprecates Java by zenocon on Thursday October 21, 2010 @09:22AM (#1815250)
I 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.
Re:Apple deprecates Java by MartinCron on Thursday October 21, 2010 @01:01PM (#1816366)
Again, depending on what you want to do, SilverLight works pretty darn well on Windows and Mac these days.
Re:Apple deprecates Java by dingle_thunk on Thursday October 21, 2010 @08:09AM (#1815085)
Adobe Air, Silverlight/Moonlight Out-of-Browser, Mono, HTML5/JS.
Re:Apple deprecates Java by AndrewS on Thursday October 21, 2010 @08:36AM (#1815143)
Does anyone have any experience with Mono on macs?
Re:Apple deprecates Java by ghurlman on Thursday October 21, 2010 @10:07AM (#1815386)
MonoMac has been around for a little while, but MonoMac + the OSX App Store are firmly in Miguel De Icaza and team's sights:

http://tirania.org/blog/archive/2010/Oct-20-1.html

Re:Apple deprecates Java by AndrewS on Friday October 22, 2010 @12:41AM (#1818612)
Thanks for the info
Re:Apple deprecates Java by Tamerlin on Thursday October 21, 2010 @11:19AM (#1815785)
How about C# in the form of Mono?
Re:Apple deprecates Java by Tichy on Thursday October 21, 2010 @08:55AM (#1815176)
Maybe something like Mozilla's Open Web Apps? http://blog.mozilla.com/blog/2010/10/19/prototype-of-an-open...
Re:Apple deprecates Java by Isofarro on Thursday October 21, 2010 @05:46AM (#1814832)
Open Pascal with Lazarus.
Re:Apple deprecates Java by dragonquest on Thursday October 21, 2010 @05:52AM (#1814836)
Shouldn't that be Object Pascal?
Re:Apple deprecates Java by FooBarWidget on Thursday October 21, 2010 @05:58AM (#1814848)
No, and neither should it be Open Pascal. He meant Free Pascal, an open source implementation of Pascal that also supports Delphi syntax (Object Pascal).
Re:Apple deprecates Java by albertcardona on Thursday October 21, 2010 @05:39AM (#1814820)
GTK 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/

Re:Apple deprecates Java by blub on Thursday October 21, 2010 @05:44AM (#1814831)
I 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.
Re:Apple deprecates Java by wheels on Thursday October 21, 2010 @07:27AM (#1815005)
I 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.
Re:Apple deprecates Java by nikster on Friday October 22, 2010 @11:03PM (#1822446)
This 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.
Re:Apple deprecates Java by FooBarWidget on Thursday October 21, 2010 @05:56AM (#1814842)
Which close button are you talking about and how is it inherent to GTK?
Re:Apple deprecates Java by pmjordan on Thursday October 21, 2010 @06:04AM (#1814860)
I'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).

Re:Apple deprecates Java by roel_v on Thursday October 21, 2010 @08:17AM (#1815098)
"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.

Re:Apple deprecates Java by steveklabnik on Thursday October 21, 2010 @10:11AM (#1815413)
> Is there an implementation of GTK that doesn't run via X11 on the mac?

GTK-OSX is supposed to do this, but I haven't been able to get it working.

Re:Apple deprecates Java by ramchip on Thursday October 21, 2010 @06:38AM (#1814918)
What about Qt? It looks good for me, although I never tried on a mac.
Re:Apple deprecates Java by aidenn0 on Thursday October 21, 2010 @07:26PM (#1817885)
I'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.
Re:Apple deprecates Java by masklinn on Thursday October 21, 2010 @07:23AM (#1814996)
It'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)
Re:Apple deprecates Java by crs on Thursday October 21, 2010 @04:45PM (#1817373)
Nothing, 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.
Re:Apple deprecates Java by blub on Thursday October 21, 2010 @06:05AM (#1814862)
Here'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.