View Full Version : Best X-platform web/desktop crossover language
Jan 19, 2009, 10:28 AM
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?
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?
Jan 19, 2009, 04:36 PM
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 (http://www.adobe.com/products/air/) or Microsoft Silverlight (http://silverlight.net/). 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 (http://www.libsdl.org/). There's some other stuff out there too, I'm sure someone will fill in the holes...
Jan 19, 2009, 05:58 PM
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 [...] Which of these do you recommend?
Right now I personally prefer Python: more mature, sane namespaces, and better Unicode support, Cocoa bindings and application packaging tools .
OTOH, I think things are going to get [I]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.
Jan 25, 2009, 01:18 AM
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 (http://www.pythonware.com/products/pil/)(Python Imaging Library). PIL is used in Skencil (http://www.skencil.org/) 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).
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 (http://www.adobe.com/products/air/) or Microsoft Silverlight (http://silverlight.net/).
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.