What is Hot Glue
Please be sure to TURN OFF AUTOPLAY in the the Teachable interface for this course to prevent several videos from playing at once.
Turbo-Rails is a bold new vision for Ruby on Rails. It is based on an old concept from the early days of computing, dating back to the 1970s, called “dumb terminals.” This means that the computer screen you use is for display only. In the ‘dumb terminal’ world, the majority of the computing will happen in the cloud and the terminal you use will be ‘dumb,’ or not contain a lot of heavy processing logic.
Turbo-Rails is the opposite of that idea. In Turbo-Rails, you’ll keep your business and display logic on the server, and treat the browser as a terminal that is there to display your UI only— it is ‘dumb.’ Whether or not Turbo-Rails will rival the new kids on the block will remain to be seen, but it sure is fast.
These days, I think most of the process of building a great app involves user feedback, product-market fit, and iterating to make sure your users actually want what you’re building. The power of Rails lies in ActiveRecord and migrations, and thus it is an ideal tool for putting together prototypes quickly. The problem is, Rails has its own idiosyncratic syntaxes that make getting started challenging for those curious about this old framework. Do I start with Turbolinks or Turbo Rails or just plain page reload interactions? How about I treat Rails as the API-only and build my own frontend? Should I use ActiveRecord’s relationships, even knowing that instantiating (loading into memory) a lot of Rails objects can be slow? Will Ruby 3 really be 3 times as fast as Matz promised?
The problem presented is that there are almost too many choices for people who just want to build a basic app today.
As the CEO, entrepreneur, product owner, or visionary, your job is to map your users’ mental models. From there, the programmer will take those user mental models and map them onto code, objects, interfaces, or tuples (database records). Then comes the marriage of these to the interfaces, screens, and interactions that will happen for your app. Perhaps you start in Rails quickly and get lost in specific syntax, style, or architecture decisions to do basic things. Frustratingly, you are attracted to Rails’ simplicity but have a hard time with its recherché parts.
MEET HOT GLUE
This gem, Hot Glue, is a rapid application prototype builder for Rails. It will take your existing models and build you quick dashboards using Turbo Rails. It assumes you know the basics of Rails — MVC, routes, etc — and want to build a Create-Read-Update-Delete (CRUD) set of operations on an object in your database. It handily comes with a LIST page with pagination and does all of its operations as Edit-in-Place. This means the user never leaves the page. It gives you a simple, lego-like set of building blocks to formulate standard-looking dashboards. It stays within those bounds and tries to do what it does well and nothing else.
This tutorial will introduce you to Hot Glue by walking you through five separate examples. Each of the examples demonstrates a different part of Hot Glue, and by the end, you should have an understanding of how to use it.
If you are not yet familiar with Rails MVC (Model-View-Controller) or Rails routes, you should start with a basic Rails tutorial or the Rails guides.
Hot Glue has only 1 page of documentation — the README itself — which is the same as its Github home, here.
For this tutorial, you will need to scroll to the section marked “Getting Started” in the this README document, and follow allow there.
I will reference those steps in the next section "The Setup"
Ok let’s dive in.
Videos in this tutorial are short-form only, and will be supplemental to the text, pictures and animated GIFs. You can skip them if you want, or come back to them later. Above every video, a short summary like this one will explain the purpose of the video.
Because there are several smaller videos within each page, when taking this Teachable course, make sure to turn off Autoplay in your settings above.
Please do this now before continuing or else the videos in the next section may all begin playing at once.