In the course you will make the hamburger toggle with clean and DRY JavaScript!
How to write and maintain
Clean JavaScript Code in your Rails App
An online course about writing, organising and re-using JavaScript code for Ruby on Rails developers
Plain ('vanilla') JavaScript goes a long way in adding interactivy and a nice, dynamic user interface in Rails apps. As a Rails developer, you don't need to be a JavaScript ninja to achieve some nice JavaScript sprinkles in your Rails views. Just learn the few most useful parts of JavaScript for Rails development. Follow some tried-and-true conventions. And find that working with JavaScript in Rails apps can be fun after all.

About the Course

What you will learn
  • How to refactor JavaScript into clean code
  • The parts of JavaScript that are most useful for Rails developers
  • How to organise JavaScript files (and what Webpacker has to do with it)
  • How to leverage your Ruby knowledge to mastering ES6
  • How to use JavaScript specific tools and apply them to Rails
What it means for your Rails app
  • DRY, re-usable JavaScript features
  • Change-able, extendable, maintainable JavaScript (that your future self understands)
  • Faster development
  • Easy to reason about JavaScript, less cognitive complexity
  • Well organised files (with Webpacker or the asset pipeline)
Bonus Content
  • The 10 Conventions for writing Clean JavaScript Code, hand picked for Rails developers
  • Cheatsheet ES6 for Ruby/Rails developers
  • Checklist for importing JavaScript libraries in webpacker
  • Javascript Code Sandbox Template for Rails work

But what about the Ams.rb workshop?

The Corona lockdown counteracted the spring workshop for the Amsterdam Ruby community. Instead, we turned the workshop into a full featured online course. And to be honest: we think it's even better than the workshop :-) Collateral gains.

Enroll now!

Corona Pricing
If you have a job and can afford to pay, we kindly ask you for a contribution of € 35. If you can't afford to spent money, please please join us anyway.
enroll now

This is for you...

This course is for you if:
  • You seek to be more confident working with JavaScript code in your Rails app
  • You are (far) more comfortable in Ruby and Rails than in JavaScript
  • Learning a whole frontend framework is overkill and/or you're not a fan of Stimulus.
  • You want to understand what Webpacker is all about, and how (not) to use it.
This course is not for you if:
  • You know exactly what you're doing and why, with regard to JavaScript in your Rails app
  • You are looking for the part DJ showed in his talk: how to refactor JavaScript into independent components. This will be addressed in Part 3, coming soon
  • You are (almost) as proficient in JavaScript as in Ruby
  • You are looking for a starter course in Rails or JavaScript.
The current course is the first in a series of 3. It lays the foundation for the following courses, by introducing the conventions maintainable, re-usable and testable JavaScript for Rails. The next courses build upon the conventions.
  • Course 1: Clean JavaScript Code by following conventions.
  • Course 2: Exchanging data between Rails and JavaScript
  • Course 3: Components
Maud about DJ: "I always wondered why DJ loved JavaScript so much. I know he loved Ruby, and I didn't understand how one can love Ruby and JavaScript at the same time. When I showed him a piece of my JavaScript in Rails code, and we started refactoring together, I finally started to see what JavaScript could be - but almost never is. I admire his ability to play with the differences between the languages. And it's good fun to work with him."
DJ about Maud: