Learning Sinatra
2h 10mIntermediate2017-03-22
Authors

Kevin Skoglund
Founder of NovaFabrica
Course details
Sinatra is a lightweight web application library and domain-specific language that provides a faster and simpler alternative to Ruby frameworks such as Ruby on Rails. In this course, discover how to quickly build web applications with Sinatra. Kevin Skoglund walks through how to define routes, render templates containing dynamic data, and use partial templates and layouts to create reusable code. Plus, he explains how to use cookies, sessions, and filters, and shares useful techniques which you can leverage in your own Sinatra projects.
Learning objectives
Installing Sinatra
Launching the server
Defining routes
Using route patterns and parameters
Redirecting requests
Rendering dynamic templates
Using partial templates and layouts
Defining custom helpers
Learning objectives
Installing Sinatra
Launching the server
Defining routes
Using route patterns and parameters
Redirecting requests
Rendering dynamic templates
Using partial templates and layouts
Defining custom helpers
Skills covered
SinatraRubyProgramming LanguagesOpen SourceSoftware Development
Concepts
0. Introduction
- 01 - Welcome
- 02 - How to use the exercise files
- 03 - What is Sinatra
- 04 - Install Sinatra
1. Routes
- 05 - Launch the server
- 06 - Define routes
- 07 - Route HTTP methods
- 08 - Route patterns
- 09 - Route parameters
- 10 - Redirect requests
2. Templates
- 11 - Configure file paths
- 12 - Render static files
- 13 - Render templates
- 14 - Add code to a template
- 15 - Template variables
- 16 - Render partial templates
- 17 - Layouts
- 18 - Challenge - Templates
- 19 - Solution - Templates
3. Helpers and Filters
- 20 - Define custom helpers
- 21 - Escape HTML
- 22 - Cookies
- 23 - Sessions
- 24 - Filters
4. Useful Techniques
- 25 - Classes
- 26 - Form parameter array
- 27 - Databases
Conclusion
- 28 - Next steps
Related courses
- Linux Performance Tuning
- Learning MongoDB
- Microsoft Entra ID for Developers: A Beginner's Guide (2023)
- Introduction to SQLite
- Learning BIM 360 Building Ops
- Learning Power Automate Desktop for Non-Developers
- The OWASP API Security Top 10: An Overview
- Azure VMware Solution: Planning and Troubleshooting Basics