7

I'd like to write some small applications for Windows and OSX.

Portable is good. For instance, the simple TclKit solution for TCL would work well if I could stand to look at Tcl for any length of time.

I'm considering using Javascript + extensions -- I really like Javascript -- seems to me there should be some way to connect a Javascript engine to WxWin or even the Tk toolset -- it's been done for Perl, Python, Ruby, etc. Why not JS?

Any comments appreciated.

7 Answers7

9

I would rather recommend using Adobe Air execution container, it offers way more capabilities / OS integration features compared to HTA of Microsoft or even XULRunner of Mozilla.

Sergey Ilinsky
  • 31,255
  • 9
  • 54
  • 56
7

If you want to write a desktop app in Javascript, check out HTA: http://msdn.microsoft.com/en-us/library/ms536496(VS.85).aspx

Here is an example of an app that I wrote a long time ago in HTA: http://www.boltbait.com/htmleditor/

Hope this helps.

BoltBait
  • 11,361
  • 9
  • 58
  • 87
  • Why the down vote? I answered the question and gave an example. I'm curious why you didn't find my answer helpful. Please explain so that I don't make the same mistake again. Thanks. – BoltBait Oct 21 '08 at 20:39
  • True. Good thing the OP wrote "...or Windows app". – BoltBait Nov 24 '09 at 21:10
3

If you have experience with HTML+JS web applications, I'd recommend Mozilla XULRunner. It gives you native-looking interface widgets (every piece of Firefox interface is a XUL element), and a workflow similar to building HTML-based interface.

You define the interface using XUL, an XML-based language, so it's almost like writing HTML, minus browser incompatibilities and CSS (you can use CSS, but only if you want). All application logic can be written in JavaScript, but in XULRunner you can do a lot more in JS than in a browser (read/write files, execute system commands, make cross-domain XMLHTTPRequests, and a lot of other stuff).

More: http://xulplanet.com/

A lot of example applications: http://code.google.com/p/xulapps/

pawel
  • 35,827
  • 7
  • 56
  • 53
  • It also make sense to mention XBL, one of the most powerful core technologies enabled in Gecko. XBL allows developer to writing binding documents that can implement logic and define layout for abstract components that later on can be bound to the elements on the hosting page. – Sergey Ilinsky Oct 21 '08 at 21:59
1

Mac OS X users tend to dislike applications that don't follow usability guidelines of the platform (menu must be at top of the screen, standard shortcuts & drag'n'drop must work, "OK" must be at right-hand side of alertboxes, no "Apply" button in prefs and so on).

With one-size-fits-all toolkit this may be very difficult to achieve.

The good news is that there's JavaScript<>Cocoa bridge that can be used to create stand-alone full-featured Mac OS X application in JS – just keep front-end and back-end of your application separate enough to be able to plug different UI for each OS.

Kornel
  • 97,764
  • 37
  • 219
  • 309
0

Rhino would probably give you access to swing. Though, I don't know how much work would be involved.

On the other hand, building a swing app with JRuby is so easy even a sock puppet can do it, so it shouldn't be too hard.

Aaron Maenpaa
  • 119,832
  • 11
  • 95
  • 108
0

Definitely if you want to implement it using JavaScript, Adobe Air is the way to go. You will even have support on Linux.

Ferruccio
  • 98,941
  • 38
  • 226
  • 299
jaircazarin-old-account
  • 2,875
  • 3
  • 20
  • 17
0

Give Titanium Appceletaror a look: http://www.appcelerator.com/.

ravi
  • 3,319
  • 4
  • 19
  • 11