Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Rails Asset Pipeline: Defunct or Da Funk

Rails Asset Pipeline: Defunct or Da Funk

The Rails asset pipeline has been a useful tool for rapidly crafting beautiful front ends but with ever growing JavaScript toolchains like Grunt and Gulp it seems defunct, or is it?

Traditionally elegant front end interfaces can be a pleasure to craft by following The Rails Way(tm) with simple JavaScript behaviours.

When a round-trip delay just doesn't cut it, more complex approaches can be crafted with libraries like Backbone to create a truly client-side application. The asset pipeline remains a perfect complement, allowing all sorts of optimisations.

But going beyond these simpler approaches is all the rage with Angular leading the charge. We'll look at building Angular apps leveraging the pipeline for templates, compilation, and more.

Quickly touching on some more esoteric applications, we can also export rails routes for use in client side templates, automatically create sprite sheets, and even generate icon fonts, optimising assets along the way. The Rails asset pipeline is still Da Funk; a fantastic tool for front end developers.

Samuel Cochran

February 20, 2014
Tweet

More Decks by Samuel Cochran

Other Decks in Programming

Transcript

  1. Grid system Typography Code Tables Forms Buttons Images Helper classes

    Dropdowns Button groups Button dropdowns Input groups Navs Navbar Breadcrumbs Pagination
  2. Grid system Typography Code Tables Forms Buttons Images Helper classes

    Dropdowns Button groups Button dropdowns Input groups Navs Navbar Breadcrumbs Pagination Labels Badges Jumbotron Page header Alerts Thumbnails Progress bars Media object List group Panels Wells
  3. Reasons I like sprockets • Great dependency management • It’s

    like make for assets • Pre-processing • No unwieldy config files • Built in to Rails • Stays in Ruby-land