DevCSI | Developer Community Supporting Innovation » Node js http://devcsi.ukoln.ac.uk Fri, 11 Jan 2013 16:06:31 +0000 en-US hourly 1 http://wordpress.org/?v=3.5.2 Dev8ed Workshop: Node JS http://devcsi.ukoln.ac.uk/2012/05/30/dev8ed-workshop-node-js/?utm_source=rss&utm_medium=rss&utm_campaign=dev8ed-workshop-node-js http://devcsi.ukoln.ac.uk/2012/05/30/dev8ed-workshop-node-js/#comments Wed, 30 May 2012 09:47:55 +0000 kpitkin http://devcsi.ukoln.ac.uk/?p=3891 Scott Wilson

Throughout Dev8ed there was a lot of interest in Node JS. Scott Wilson from JISC Cetis shared his experiences in a discussion-based workshop. He provided a brief overview of how Node JS was developed to solve the problem arising from the move towards HTML 5, which uses a lot more JavaScript. Node JS handles this [...]]]>
Scott Wilson

Throughout Dev8ed there was a lot of interest in Node JS. Scott Wilson from JISC Cetis shared his experiences in a discussion-based workshop. He provided a brief overview of how Node JS was developed to solve the problem arising from the move towards HTML 5, which uses a lot more JavaScript. Node JS handles this by using the JavaScript engine in the browser and packaging it into a server or node. One of the main features is that it has no threads: everything is written in call backs. This means the memory footprint of the server remains flat. Node JS also provides a lot of low level APIs and the libraries are just JavaScript files, so there are already lots available all over the web which can be repurposed.

Wilson observed that it takes a bit of getting used to, as it is not like a normal server environment. However, it is really useful if you want to use sockets. He outlined how best to get started by using a text editor to write some JavaScript and create a server, noting that whilst the stability of the server is very good, the stability of the code base is not as good. It is still quite young so there is a lot of churn. People often start by building a chat bot, which is easy to do using Node JS.

Examples of use within an educational setting include use as an http monitor for sites, and for applications that rely on real-time activity. Wilson has written a lot of demos that replicate some of the features offered by Google Wave. There have also been lots of rapid game hacks, as Node JS is the quickest way to create a multi-player games. Wilson demonstrated ShareJS which is basically an etherpad in four lines of code. You can play with this at http://sharejs.org/. Wilson’s ambition is to build a massively multiplayer Pacman :-)

He stressed that Node JS is not for building a website. It is for doing he hard, fast, synchronous activities, so it is good for real time, multiplayer/multiuser activity, which makes it useful in education.

The group then shared their favourite Node JS applications, including Trello, and discussed where future developments would be useful – including the need for a console manager for managing multiple Node JS server instances.

]]>
http://devcsi.ukoln.ac.uk/2012/05/30/dev8ed-workshop-node-js/feed/ 0