Things Ian Says
javascript
Here are all the items relating to javascript (page 2 of 2)
Functional Javascript
Thursday, 3 September 2015
Functional programming is seeing an increase in popularity, as can be seen in rising adoption of languages like Scala, Clojure and Erlang. Even Java has introduced lambdas (more about lambdas, later).
Javascript supports a functional programming style and I find that working within that style makes many things simpler when developing Javascript. This is particularly true when working with promises.
This blog entry discusses some basic functional techniques and demonstrates how they can be used within Javascript. It should be useful to both people who wish to adopt a more functional style in their Javascript, and to people who just want to understand more about functional programming.
Promises in Javascript
Wednesday, 10 June 2015
Javascript is single threaded and non-blocking, which means that lines of Javascript code are not necessarily executed in the same order they are written. This can cause problems with asynchronous behaviour, for example if the Javascript needs to call two different APIs in a specific order. This article discusses this challenge, and looks at the use of promises to address them.
A learning stub server in 40 lines of code
Wednesday, 2 April 2014
This article demonstrates a simple stub server, written in Javascript, which captures responses as it proxies them to backend services, and can then act as a stub server, serving up those responses as appropriate.
PhantomJS for client side testing
Monday, 17 March 2014
Please note that PhantomJS has been suspended, so this article is only retained out of historical interest.
As web-based projects do more on the client side, conventional server-side performance testing is not able to give you all the performance story. I have, therefore, started looking around for tools which would give more insight into that purely client-side performance.
2