With our growing REST API, it’s possible to code applications for the Light that are entirely browser-based, HTML5 and Javascript. The ‘Countdown’ web app is an example of this. The app turns the light green when the countdown starts – using the ajaxcolor REST command, then with two minutes to go the light turns yellow (using gradientcgi), and at one minute, red. For the last thirty seconds, the light pulses red (again, using gradientcgi).
So without any code running on the Light – beyond the normal web stack and REST API functionality – it is possible to write a fully-functional app for the Light. In HTML5 and Javascript. In the browser.
This means many Light apps can be written as web apps.
Download the code for the countdown web app here and have a play. It should work in any modern browser (IE10, Safari, Chrome, Firefox), and it will give you a template for writing your own web apps for the Light.
As a consequence of developing this demo, It’s become clear that we need to write a Javascript library for Light web apps. That’s now a top priority.