Web Technologies

Posted on February 21, 2012


Over the past weeks, time was spent exploring web technologies, with particular interest in dynamic content on the web.  It was discovered that although a new standard for the web is being specified by W3C, the document is still in its draft stages, and existing browsers have not adapted all of the new technologies, with the exception of google chrome which seem to be at the cutting edge of web technologies.

In order for the Agricultural Network Project to be successful a user should be able to add a product to an online market via SMS.  It was decided that the FrontlineSMS developer platform will be used as a starting point.  FrontlineSMS can receive a SMS message that contains a keyword and forward that message to a client/server using an external command feature.

A PHP server was considered as a solution using websockets, however, attempts to connect to the server, has proven to be unsuccessful so far.  The server receives the message, but is unable to process the information, and throws the error:

Warning: socket_select(): 8 is not a valid Socket resource in /applications/mamp/htdocs/server.php on line 15

Although it is tempting the continue solving this error message, the end result would be limited, as websockets is not compatible with all web browsers at the moment, and one of the aim of this project is to make this software available to users where there is little technology available.  This problem has been addressed by the Socket.IO plugin, which adds browser compatibility to the Websocket technology.  See post on Websockets for more information.

Another possible solution would be to build a server in JavaScript – which allows variables to be passed from JavaScript to PHP and vice versa – or a Java application that is able to receive a message and forward that message to a MySQL database or to another client/server.

On the other end, a message was sent from website to FrontlineSMS, using FrontlineSMS HTTP Trigger function, which allows FrontlineSMS to listen for a message on a designated port.  Here is a useful forum for setting up a PHP function to forward a message to FrontlineSMS: http://frontlinesms.ning.com/forum/topics/frontlinesms-data-to-odk-aggregate-using-external-command?commentId=2052630%3AComment%3A80070&xg_source=activity .

Further investigation would have to be carried to have an SMS message sent to website.


WebGL for data visualisations

The release of the specification for WebGL includes support for web browsers, including chrome, opera, safari and firefox.  In addition to running a supported browser, the device used to browse the web page should also contain a compatible graphics card.  The full documentation of WebGL can be found at: http://www.khronos.org/webgl/wiki/Main_Page 

HTML5 Form Inputs

Youtube Tutorial Part 1

Youtube Tutorial Part 2

HTML5 Canvas Tutorials


HTML5 Docs



Further research into HTML5 specification and User interaction in HTML5.  Followed youtube tutorial to implement a a registration and login system on website prototype, this is necessary as the system would contain user information, which would enable the user to keep track of their account.  The next step would be to enable the user to register through SMS.


NodeJS Community wiki


Node Beginners Book


NodeJS connect to database with authorization



Socket.IO How To Use Guide



WebSocket and Socket.IO