Buy now
1.1

About this book

For as long as Ruby on Rails has existed, Rails developers have tried not to write JavaScript. They even embraced a subset of it, called CoffeeScript. It would let you write JavaScript that looked more like Ruby. But today, JavaScript has improved a fair bit. Yes, it is still more verbose than Ruby, but if you can see beyond the excess of characters you will find a language that can be almost as expressive as Ruby.

A language that, if you want to write modern web- and SaaS-applications, you can not do without. In this book I want to demystify, explain some of the quirks and present some modern and readable syntax.

This pragmatic book is short (~31,000 words). You should be able to read it in several hours. My aim is not to cover every feature or utility available, but to show you how to write elegant code with JavaScript. It is set up to build a code editor using CodeMirror within a Stimulus controller. Starting with a naive approach and then with every chapter new and more advanced features are introduced. Written as a journey from start to finish, with each chapter introducing new features and thoroughly explaining any new JavaScript techniques and syntax discovered along the way. Not another JavaScript documentation rewrite without any practical context.

Who am I to write this book? I am a designer, turned developer, turned founder of multiple, successful SaaS apps built in Ruby on Rails for more than 10 years (and been designing for the web since 1997!). Besides that I have helped many teams around the world with their Ruby on Rails apps with loads of JavaScript. Early 2024, I founded Rails Designer: a Rails UI components library, a one-man agency, a product studio, and a vessel for a hundred-plus articles around modern Ruby on Rails and front end development. All alongside running a successful SaaS. Yes, Ruby on Rails with Hotwire makes this possible.

I hope that in several hours, when you finished this book, you will get the same joy, like me, writing JavaScript for your Rails app.

If you find you are stuck or something is unclear, feel free to reach out at: jsbook@railsdesigner.com.

← To contents

JavaScript for Rails Developers

Choose one of the three tiers below

Get your copy!

Solo

$ 49

What is included?

  • Full book (PDF/ePub)
  • Code-base included

Professional

$ 79

What is included?

Team (5 developers)

$ 179

What is included?

  • Full book (PDF/ePub)
  • Full code-base access
  • Share with 5 developers in your team