Chapter 10

A Live Web Application

In this final chapter, we reach the culmination of this Ruby tutorial: a dynamic web application. Our app will put the custom Ruby gem developed in Chapter 8 to good use through the development of a web-based palindrome detector. Along the way, we’ll learn how to create dynamic content using embedded Ruby (ERB).

Detecting palindromes from the Web requires using a back-end web application to handle form submission, and our tool of choice is Sinatra, the micro-framework we met in Section 1.5 and applied further in Section 5.2. Although simple, Sinatra is not a toy—it’s a production-ready web framework used by companies like Stripe, Apple, and Disney.1

1 As of a few years ago, when I talked with a friend working ...

Get Learn Enough Ruby to Be Dangerous: Write Programs, Publish Gems, and Develop Sinatra Web Apps with Ruby now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.