Saturday 8 September 2012

Web-Apps without Javascript

Hi,


Recently I've gotten very excited about web-apps, little programs or games that live in your browser. The great thing about them is that they work on any device that has a web-browser. That means they work on your home computer -whether you're using Windows, Mac or Linux- but also on your iPad or any other tablet. This is really awesome. Another great thing is that you can circumvent Apple this way, you don't have to put your app on the AppStore, you don't have to pay the 100$ developers fee and you don't have to wait weeks before it gets reviewed!
The downside, however, is that you'll have to use Javascript, which, in my opinion, sucks. Luckily it's not true! In my search for a better way of creating web-apps I found two very promising alternatives to Javascript, and they are both great.

Google Dart

Google Dart is great. It's an entirely new programming language made to replace Javascript. It's a proper programming language, looking a lot like the C-family. It's properly object-oriented and supports interfaces, generics and (optional) typing. The beautiful thing about it is that it compiles to Javascript, so even though Dart isn't supported by most browsers yet -only by a nightly build of Chrome-, the apps you make can still be run in them. And since Google is backing this project, with a little luck you'll see support for Dart soon.
Now, Dart isn't perfect yet. Since it's very very new, there aren't many tutorials yet, so learning it isn't as easy as other languages might be. Neither are there many libraries yet, so you'll have to make everything yourself. Though this might be a positive point, if you like making libraries and tutorials, this is a whole new world that needs your help!

Haxe

The second alternative I found is Haxe. Haxe might be even more awesome than Dart. Haxe, just like Dart, is a whole new programming language. Though instead of being specifically for web-apps, it can do a whole lot of stuff. It too compiles to Javascript, but also to Flash and natively to Windows, Mac, Linux, iOS, Android and more!
Haxe's syntax looks like Java or Actionscript. Just like Dart, it's object-oriented, strictly typed, supports generics, and more. Anything a modern programming language needs.
Unlike Dart, Haxe is already widely used. So it has a bunch of tutorials and libraries for you to use. And even though it doesn't have a big company like Google behind it, it has a very active development team and community. On top of that it also has a very good standard library. Also, if Dart ever becomes the new standard, someone will probably just make a compiler from Haxe to Dart.

Update 12/09/'12

I've been working a bit more with both Dart and Haxe and wanted to add that Haxe truly is a more mature language. It's just been in development for much longer, and has some features Dart is missing. It's just a matter of time before Dart adds these features, though right now Haxe seems to be the better choice.


So, now you know your options when you want to make web-apps but Javascript is killing your buzz. Both languages are great, and both are worth a try.