Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I like the idea of being able to do some parts of a desktop application with HTML but would really prefer not to have to use Javascript. Does anyone know of anything similar to this but that can be manipulated with another language.


Microsoft's WPF [0] will probably get you the best results on Windows. It's intended to be an easy transition for web programmers to native GUI programming, so it uses an XML-based markup language called XAML for layout.

If you want real HTML, you'll need to work out how to interact with your page from your non-JavaScript code. Two easy ways to do that: plugins and compilers.

IronPython allows you to embed Python in HTML [1] just like you would JavaScript. (A small Silverlight applet does the real work.) I haven't used this myself, so I can't vouch for how well it works in practice.

You can also write code in a language that compiles to JavaScript. [2] CoffeeScript is a popular choice, but there are quite a few others, including several compilers each for Python and Ruby. Some caveats:

* This can have performance implications if the compiler produces poorly-optimized JavaScript or compiles on the fly in the browser.

* Many of these compilers are toys, so make sure whatever you pick has seen real-world use.

* You still need to deal with JavaScript when you debug.

[0]: http://msdn.microsoft.com/en-us/library/aa970268.aspx

[1]: http://ironpython.net/browser/

[2]: https://github.com/jashkenas/coffee-script/wiki/List-of-lang...


Yeah I was kinda thinking of HTML applications that are not intended to be used in the browser.


You could use any of the tools I mentioned outside the browser, the latter two (plugins and JavaScript-targeting compilers) with something like Chromeless or Adobe Air. The whole idea of those is to remove browser chrome but leave the engine, keeping development mostly the same. Anything you can do to script without JavaScript in the browser will work just as well in these non-browser environments.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: