First steps with one of the strongest JS frameworks today

At CookiesHQ we have something called ‘Cookies Lab’, is one day per month in which we spend some time learning new technologies and if possible try to create something with them, instead of doing client’s work. We also get to choose what we dedicate our time to!

Why Angular.js?

Shortly after I began working with Rails, I started hearing about Javascript frontend frameworks like Backbone, Ember, and Angular. I’ve always liked Ember, perhaps because Yehuda Katz is involved in it and somehow I imagine the future of Rails and Ember tied together in some way, who knows. Anyway, I’ve had some experience with Backbone, as we use it in one of our projects at CookiesHQ, and working with it has helped me a lot to understand the framework, and to understand why and how to use a JS framework on top of a Rails app for your frontend.

When I saw the possibility of going to the Barcelona Ruby Conference this year, I chose to attend to Zach Briggs‘s workshop about Angular, as it will give me the opportunity to be guided by a person through the process of creation of an Angular app and shed some light over the most important questions for me right now about JS frameworks and Rails:

  1. Why, where and how to use Angular
  2. How to integrate Angular with Rails

With this in mind, I dedicated my Cookies Lab day to learn something about Angular.js, so I don’t arrive to the workshop empty handed and I can get the most out of it. Below is a list of resources I’ve been taking a look at or that I’ve gathered for further research.

Shaping Up with Angular.js at Codeschool

I like Codeschool courses because they are simple and short enough to make you grasp a handful of concepts and utilities in a short time, so you can get a general idea of the course subject and then look for something more deep. You only need your browser, so you can concentrate on watching the videos and understanding what the technology does.

Visit the Shaping Up with Angular course.

PhoneCat Tutorial App at Angular

This would be your ‘official’ tutorial for Angular.js. You’ll like it more than Codeschool’s if you prefer a hands on experience on your own machine, getting to use a real development stack. In this case, apart from Node, you’ll be using Karma and Protractor for your tests. Because you’ll get to write tests for your Angular App with this one, which is always great.

Visit the PhoneCat Tutorial App

Thinkster.io Angular.js Tutorials

Both previous tutorials revolve heavily around using Angular directives and the idea of web components that use Angular for their behaviour, always looking at the frontend. This one makes you get your hands a bit dirtier, as you’ll start by creating the services that will store the data you’ll use in the app, this is, creating a backend of sorts (also with authentication!), then going into the frontend. Also, you’ll get to use Yeoman, Bower and Grunt, which is a popular stack for JS applications.

For a more complete experience, going through their A better way to learn Angular JS is a good idea, as it is not a tutorial per se, but a readings checklist covering all topics. It will send you to read chapters of the Angular.js book by Green and Seshadri, as well as make you watch videos at egghead.io. The good thing is that this is one is something you can do to complement the first tutorial, or a reference guide if you find yourself scratching your head over some concept.

Visit Thinkster.io for more details.

Delve deeper

Above are three tutorials that should get you started, and get some understanding of Angular JS. As mentioned before, there is a book by O’Reilly, and John Lindquist’s egghead.io seems to be the go-to place to learn to do stuff with Angular, as I’ve seen it referenced in other several sites. Nettuts+ also has several articles and tutorials available that might be worth checking.

Conclusion

Angular.js loos like an interesting and powerful tool, but I still can’t see clearly in what kind of project would/should I use it by itself, or why choose Angular for the frontend on the next CookiesHQ Rails project. It’s not skepticism, I guess that with time and experience, enlightenment will arrive. I hope Mr Brigg’s workshop next week helps to that, and I will be more than happy to share my experience with you in a future post.

Photo taken from Angular.js Github repo