Learning with Ruby on Sinatra

If you’ve been studying web development, you may have worked with a params hash, a session cookie, or routing based on HTTP request methods. If you’ve ever thought “I’d really like to know how this works, but I’ll look into it later,” now is the time for you to follow up.

Sinatra is a lightweight domain-specific language (DSL) for creating web apps in Ruby. This week, I used Sinatra to build multiple projects, and the practice was enlightening.

Like many, I have completed Michael Hartl’s Ruby on Rails Tutorial, which I recommend. Still, at times I was left wondering how certain features were implemented. Because Rails abstracts away many low-level details, it can be difficult to learn about how something works behind the scenes. Sinatra puts many of the features that Rails abstracts away onto center stage, providing a great environment for building familiarity with the aforementioned core web app features.

If you’re interested in learning and up for some coding, I would highly encourage you to use Sinatra to create a few apps. I even created a github repo with the basic structure for a Sinatra app to help you get started.

While the following resource isn’t necessarily related to Sinatra, Rails, or Ruby, I wanted to take the opportunity to mention it because it helped me develop an understanding of the web’s architecture. Thus, I recommend Roy Fielding’s Dissertation, in particular, Chapter 5, Representational State Transfer. I hope you’ll find it as enlightening as I did.

Resources, References, and Study Materials

  1. Sinatra
  2. Micahel Hartl’s Ruby on Rails Tutorial
  3. Basic Sinatra Setup Repo
  4. Roy Fielding’s Dissertation
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.