Past Meetup

Taking JavaScript Seriously in Grails

This Meetup is past

19 people went

Location visible to members

Details

Taking JavaScript Seriously in Grails (AngularJS and CoffeeScript)

presenter: Clay McCoy / Netflix

Whenever I write JavaScript I throw all software craftsmanship discipline out the window. There are no unit tests and very little structure to the code. It's just me vs the browser, and hitting the refresh button until we get it right. If you are lucky you may have jQuery to provide a nice CSS selector based library that somewhat shields the developer from browser quirks.

Sadly, this state of affairs is almost normal.

So how can we take client-side scripting just as seriously as our other code in Grails web apps? Grails and AngularJS are both MVC web frameworks that make heavy use of dependency injection and have great support for testing. Overall these technologies work very nicely together. We want tests, structure, and less boilerplate, and I am going to use AngularJS and CoffeeScript to do just that.

Grails stays on the server side and AngularJS stays on the client side. We can have Grails acting as a RESTful web server that works great with up and coming client side MVW frameworks like AngularJS, without having to lose the ability to use GSPs where they make sense.

Demo building a decoupled app with AngularJS and Grails will be presented. More info at http://claymccoy.blogspot.com/2012/09/grails-with-angularjs-and-coffeescript.html