1. It does not really resemble other script languages a lot, and it does not really resemble Java either (less so than C or C#).
3. The “script” in the name could imply that it would be simple, perhaps a subset of Java. Wrong. It is not simple and is in many ways more powerful than Java.
A simple calculator
My first app was a simple calculator. It uses very standard HTML, and JQuery. It is simply too painful to not use JQuery when it is needed. All I wrote is in index.html, just view source. The fascinating thing for an old school programmer is the way (global) variables work:
- In old web programming, any kind of state had to be maintained by passing parameters to the reloaded page – it really feels defiant that everything is still there after the user clicked a button.
- In old school programming, global variables were embarrassing, but here, just go on like we have not learnt anything since the BASIC era.
A link list
A speed-distance-time calculator
Have you ever tried to calculate how long time it would take to travel 54km in 15m/s. Well, it is not hard math. Anyway, I wrote a little application, especially designed for mobile units with touch screens (but it works well on a computer too). I think my Human-computer-interaction teachers would cry if they saw it, but it works and I think it is a little cool. On the implementation:
- Everything is in index.html, again
- Uses the DHTMLX Touch framework
I have tried it on iPhone and Symbian (as well as computers). I hope it works on Android too.
I think it was useful to avoid getting stuck in the normal challenges of Web (back end server, data, content) and focus on building a more traditional application.
- Simple Server side, for persisting/sharing data
- Local storage (thinking HTML5)