Written by

A year ago I received a proposal from an Acquisition Editor for Packt Publishing to write a book on how to test AngularJS applications. The interest from Packt was based on the posts I had written on this blog. I was obviously appreciative of the proposal and initially excited at the prospect of writing my first book, however, I also was aware of the enormity of the task! A year later and the book has been published and damn it was hard graft :) A sample chapter can be downloaded by clicking the image below.

Read on →
js, web

Written by

Over the xmas holidays I had a look at React and was very impressed with the library from the facebook engineers. React is offered as the V in MVC specifically focusing on DOM manipluation. What makes React stand out from the crowd is its simplicity and a virtual DOM to increase performance with an added bonus that it can also render on the server using Node.js. I found its priniciple easy to grasp and was up and running in no time at all. I suggest running through the React tutorial to gain a quick understanding of how to get started building a simple app and understand component based logic.

Being a huge fan of automation using Yeoman and Grunt, I was keen on building a generator to scaffold out a React app. In this post I will go through the steps of how to build a simple React application using the Yeoman generator-react-webpack I wrote.

Read on →
js, web

Written by

One aspect of Rails I love is the simplicity of environment specific configuration. Out the box, Rails provides configuration for development and production environments and additions are effortless to implement. Using Angular, I typically create a constants module for the application configuration e.g. api url’s, third party service specific data, etc. All of these can change based on the applications environment with which it is deployed to. This post details an approach I used to configure an AngularJS app constants based on configuration specific to the environment using Grunt tasks.

Read on →
js, web

Written by

A recent AngularJS application I wrote had to be configured based on a query string. Grunt launches the application in a browser using grunt-contrib-connect offering various options e.g. port, protocol and hostname. However, there is no out the box solution for appending query strings that I am aware of. It’s a minor addition to my development workflow, but manually adding the query string to the url once Grunt launches the browser started to become an irritation. Here is a simple solution I found that worked.

Read on →

Written by

I am so impressed with Elixir, it really is remarkable and worthy of the hype. Elixir’s creator, @josevalim, is a seriously clever fella and also quite a charasmatic teacher as proven on Meet Elixir. I thought I would write a short post on the steps I personally took to getting Hello, World! output from an Elixir script in SublimeText3, my editor of choice. The getting started page for Elixir covers installation, however, I like to document specific steps for my future reference which others may find of use.

Read on →
js, web

Written by

In this post I will show you how you can use an amazing set of tools and libraries to help speed up development of AngularJS applications. We will use Yeoman to generate the project/files for us and Grunt to automate tasks such as running the server/tests. Bower is a package manager for the web and please be aware I don’t go so much into Bower as the other tools take up a lot of the post already, just know what it does and that it’s pretty cool. Please keep in mind that all these tools do so much more so read their documentation and get a full grasp of their capabilities.

Read on →
js, web

Written by

window.postMessage is a method for safely enabling cross-origin communication.

I have created an example demonstrating communication between a wrapper and an AngularJS application within an IFrame using postMessage. Message communication in and out of the IFrame are managed within an attribute directive. Unit tests for the directive, controller and service are in place but no e2e just yet. Project specifics are detailed within the README.md in the GitHub repos. Any optimisations or feedback would be welcomed.

js, web,

Written by

After working with Backbone, Meteor, AngularJS and Ember (however, I have not dived deep into Ember yet), I feel that AngularJS is prepared the best for Test Driven Development (TDD). It truly makes it a cinch removing all excuses to not use tests in your application!

I have had the pleasure of focusing on testing within an AngularJS client application recently and lost a small amount of time testing a directive. The issue revolved around the template being located as an external html file as opposed to being included within the directive itself. There were a couple of head scratching errors that @amscotti and I had whilst seeking a solution but here’s a suggested approach.

Read on →