Best X-platform web/desktop crossover language

Discussion in 'Mac Programming' started by kepardue, Jan 19, 2009.

  1. kepardue macrumors 6502

    Oct 28, 2006
    I've worked with PHP for a while and am now becoming interested in learning a new language that has an application in desktop apps as well. Seems like Java support for Mac (and everywhere else) is quickly fading, and since I have an interest in keeping my applications cross platform, that seems to leave Python and Ruby. Which of these do you recommend?

    I've played some with XULRunner. Since it's based largely in JavaScript I thought it would be a good resource to learn, but there is so little documentation available for it I continue to run into problems.

    Python seems to be more ubiquitous, as it is used in Blender, supported in XULRunner, and many other programs that I'm interested in, but Ruby seems to be more in line with the Apple way of thinking. Although that may just be marketing speak, it makes the language feel better.

    What do you guys use? In the case of desktop apps, are there mature cross-platform graphics toolkits available for either language? Which web framework is easier to work with, Django or Rails?
  2. HiRez macrumors 603


    Jan 6, 2004
    Western US
    If you really need something that's cross-platform and can work with both desktop apps and web apps, you might have a look at Adobe Air or Microsoft Silverlight. For web application frameworks, I like Python + Django quite a lot. Ruby + Rails is good too, but I didn't find it particularly more "Mac-like". For cross-platform graphics, OpenGL is pretty much the standard for 3D, or you could use something like Flash/ActionScript for 2D stuff. At a higher level you can use SDL. There's some other stuff out there too, I'm sure someone will fill in the holes...
  3. hhas macrumors regular

    Oct 15, 2007
    Right now I personally prefer Python: more mature, sane namespaces, and better Unicode support, Cocoa bindings and application packaging tools [IMO].

    OTOH, I think things are going to get really interesting in another year or so once MacRuby matures. I think MR could finally be the Mac's long-overdue answer to Visual Basic (as in 'really popular and accessible', not 'really sucks').

    Either way though, once you've learnt one you can pick up the basics of the other in a week (I did, and I'm a slow learner). So if you try one and don't especially care for it, it isn't a big deal to hop over to the other.
  4. designcodestuff macrumors newbie

    Jan 20, 2009
    I recently bought an iMac and am looking into this as well. I'm considering AIR/Flash/Flex, Python, or Ruby. (Or knowing me just trying to learn them all :D)

    Since I'm most familiar with Python I'm a little biased though.

    I've done very basic image manipulation and creation with PIL(Python Imaging Library). PIL is used in Skencil which is a vector drawing app written mostly in Python. I actually just downloaded it to try it out.

    Python and Ruby both have bindings to OpenGL and ImageMagick and I'm pretty sure all kinds of other things.

    I'm trying to find some vector libraries. So far I've found info on libart and Anti-Grain Geometry but no Python bindings for them.

    I've begun to look at Ruby a little more because I've seem more web hosts support Ruby on Rails. I started toying with Ruby today and the basics at least seem pretty easy to pick up and seems fun. Honestly IMHO when it comes to Ruby and Python, it's almost personal preference. They're both really nice languages and in most cases I can't see one solving a problem that the other can't. I do have to admit that I prefer someString.length to len(someString).

    Isn't Silverlight for web apps only?

    From my understanding Silverlight is a subset of WPF and can only be run in a browser, not the desktop. The only method of running .NET code on an OS other than Windows is through Mono and I don't think there are any plans to support WPF.

    I guess you could try to run Silverlight on the desktop as an HTA, but at that is also Windows only and at that point an XBAP or full blown WPF app would be in order.

    If I'm mistaken and there is a way to create a Silverlight desktop app please let me know.

    Also, Air/Flash/Flex combo still requires an additional back-end language for web apps.

Share This Page