After doing some web development work recently, I have clearly remembered why I hate JavaScript so much. Not only is it ugly as a language, lacking in type checking or even decent syntax for inheritance (actually faking it with various workarounds), but the actual fact of having effectively two separate code bases - front end and back end forces you to repeat quite a bit of code. And hunting for missing variables and fields or mismatching types is the favourite pastime of JavaScript developers. CoffeScript makes life more bearable, but it is essentially a fancier and more concise JavaScript with all that it implies.

Well, no more. With Scala.js moving steadily towards production things are changing. Scala.js allows you to write your client-side code in Scala and then compiles it into JavaScript. This allows you to share some code between server and client sides, especially where it matters - the types that the two exchange. Scala is type safe robust language, so many development mistakes are caught by the compiler or even by a modern IDE, such as IntelliJ IDEA.

There are bindings for some popular libraries, including jQuery and AngularJS, so it is immediately usable in real time projects. This also distinguishes it from the likes of GWT, which forces you to use a particular UI framework, whether you like it or not. My next one will make use of Scala.js for sure!

Tags: computers
Categories: None |

0 comments have been posted.

Your email: we will send you a confirmation link to this address to confirm your identity and to prevent robot posting
Get in touch
»...«
Follow updates

Join our social networks and RSS feed to keep up to date with latest news and publications