Hacker News new | ask | show | jobs
by ghenne 5134 days ago
In our case (NS Basic/App Studio) we wrote a translator for VB style BASIC to JavaScript.

We wanted to create a cross platform development that could target iOS, Android and other mobile platforms. We started the project about 2 years ago, and saw a few key developments in the JavaScript space.

1. HTML5: the extensions did a lot to move it from a web scripting language to something that could be used for real applications. The Cache Manifest allowed the developer to specify a list of files to be stored on the device, so the app could run offline, with no access to a server.

2. Home Screen: The mobile platforms added the ability to pin web apps to the Home screen with their own icon, making it possible to start them much like native apps.

3. Performance: Work by the browser folks on the internals of the JavaScript engine resulted in huge boosts in performance. The results are in this table: http://www.nsbasic.com/speedtest.htm. You can see the transition from early BlackBerrys being able to run a few hundred JS loops per second to the Motorola Xoom at 718,000. The benchmark is simplistic, but the message is clear: JavaScript on mobile device is 1000 times faster than a few years ago.

It turned out that it was fairly straight forward to write the Translator. Yes, there were enough weird edge cases to question anyone's sanity to do this again, but the result works well. All the control structures translated one to one, so there was little or no drop in performance.

We then built a Visual Studio style IDE around it, with support for frameworks like jQuery Mobile, jqWidgets and Sencha to build a complete dev environment. It's been a lot of fun.

(and yes, you can use JavaScript instead of BASIC if you want!)