cta quote button

Best Books to Help You Learn Sinatra

Read More

How Much Does It Cost to Hire Web Developers in Ukraine?

Our pricing is completely transparent: you pay your engineers’ salaries and a flat monthly fee for our services. No hidden charges.

Read More

1. Sinatra: Up and Running: Ruby for the Web, Simply (2011)

Take advantage of Sinatra, the Ruby-based web application library and domain-specific language used by GitHub, LinkedIn, Engine Yard, and other prominent organizations. With this concise book, you will quickly gain working knowledge of Sinatra and its minimalist approach to building both standalone and modular web applications.

Sinatra serves as a lightweight wrapper around Rack middleware, with syntax that maps closely to functions exposed by HTTP verbs, which makes it ideal for web services and APIs. If you have experience building applications with Ruby, you’ll quickly learn language fundamentals and see under-the-hood techniques, with the help of several practical examples. Then you’ll get hands-on experience with Sinatra by building your own blog engine.

  • Learn Sinatra’s core concepts, and get started by building a simple application
  • Create views, manage sessions, and work with Sinatra route definitions
  • Become familiar with the language’s internals, and take a closer look at Rack
  • Use different subclass methods for building flexible and robust architectures
  • Put Sinatra to work: build a blog that takes advantage of service hooks provided by the GitHub API

Author(s): Alan Harris, Konstantin Haase

2. Express in Action: Writing, building, and testing Node.js applications (2016)

Summary

Express in Action is a carefully designed tutorial that teaches you how to build web applications using Node and Express.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the Technology

Express.js is a web application framework for Node.js. Express organizes your server-side JavaScript into testable, maintainable modules. It provides a powerful set of features to efficiently manage routes, requests, and views along with beautiful boilerplate for your web applications. Express helps you concentrate on what your application does instead of managing time-consuming technical details.

About the Book

Express in Action teaches you how to build web applications using Node and Express. It starts by introducing Node’s powerful traits and shows you how they map to the features of Express. You’ll explore key development techniques, meet the rich ecosystem of companion tools and libraries, and get a glimpse into its inner workings. By the end of the book, you’ll be able to use Express to build a Node app and know how to test it, hook it up to a database, and automate the dev process.

What’s Inside

  • Simplify Node app setup with Express
  • Testing Express applications
  • Use Express for easy access to Node features
  • Data storage with MongoDB
  • Covers Express 4 and Express 5 alpha

About the Reader

To get the most out of this book, you’ll need to know the basics of web application design and be proficient with JavaScript.

About the Author

Evan Hahn is an active member of the Node and Express community and contributes to many open source JavaScript projects.

Table of Contents

    PART 1 INTRO

  1. What is Express?
  2. The basics of Node.js
  3. Foundations of Express
  4. PART 2 CORE

  5. Middleware
  6. Routing
  7. Building APIs
  8. Views and templates: Pug and EJS
  9. PART 3 EXPRESS IN CONTEXT

  10. Persisting your data with MongoDB
  11. Testing Express applications
  12. Security
  13. Deployment: assets and Heroku
  14. Best practices

Author(s): Evan Hahn

3. Learning Sinatra (2016)

Key Features

  • Exploit Sinatra to design a web application
  • Integrate external, internal, and inline CSS and use some popular CSS frameworks
  • Deploy an application onto your own server or on a cloud application platform

Book Description

Sinatra is a Ruby framework that is widely used in the Industry. You can use it to make a single-page web app or a large-scale one. With the increased online footprint, you can create and deploy your own application.

Whether you are brand-new to online learning or a seasoned expert, this book will provide you with the skills you need to successfully create, customize, and deploy a Sinatra application. Starting from the beginning, this book will cover how to install Ruby and Sinatra, construct the back-end, design and customize the front-end layout, and utilize the innovative and user-friendly features of ORMs. By sequentially working through the steps in each chapter, you will quickly master Sinatra’s features to create your own application.

With ample screenshots and code that offers a play-by-play account of how to build an application, Learning Sinatra will ensure your success with this cutting-edge framework.

What you will learn

  • Install and set up Ruby and Sinatra
  • Work with layouts and template routes
  • Extend the code to include CSS in different ways
  • Create projects and understand MVC
  • Design the front-end with Twitter Bootstrap
  • Use the MySQL/SQLite gem to communicate with databases
  • Implement sessions that can be used across multiple pages
  • Utilize the innovative and user-friendly features of ORMs

About the Author

Sudeep Agarwal is a site reliability engineer at Inmobi with a total of four years of experience in the industry. He was with Directi for 3 years right after finishing his education from NIT Trichy. At Directi, he was a part of the team that wrote one of the most widely used in-house web-based applications; this is where his interest in Sinatra started and he used it to write some of his personal projects. Although he is not writing a lot of web applications at Inmobi, he is still contributing to one of the ORMs―Ruby Object Mapper.

Manoj Sehrawat is an enthusiastic software developer who loves coding and learning new things. He has around 5 years of experience in software development. Manoj holds an MCA from KIIT, Gurgaon and a BCA from IGNOU. Currently, he is the associate technical lead at TravelTriangle. TravelTriangle is India’s first full stack holiday marketplace that connects travelers with verified travel agents. Before joining TravelTriangle, Manoj was working with StudyPad and Fizzy Software Pvt Ltd as a senior software developer. His primary focus is the design and construction of scalable and optimized web applications and APIs using a Ruby-based development stack with frameworks such as Ruby on Rails, Sinatra, and others. He is passionate about refactoring, optimizing code, and building scalable solutions with simplicity.

Table of Contents

  1. Introduction to Sinatra
  2. Introduction to Ruby
  3. Hello World
  4. Modeling the Backend
  5. Handling HTTP Requests
  6. Designing the Frontend Layout
  7. Handling User Data
  8. Connecting to a Database
  9. Authentication and Authorization
  10. Deploying the App

Author(s): Sudeep Agarwal, Manoj Sehrawat

4. Jump Start Sinatra: Get Up to Speed With Sinatra in a Weekend (2013)

This short SitePoint book provides readers with a fun and yet practical introduction to Sinatra, a framework that makes web development with Ruby extremely simple. It’s not intended to be a completely comprehensive guide to the framework or an in-depth Ruby tutorial, but will quickly get you up to speed with Sinatra and give you the confidence to start experimenting on your own.

The book is built around a real-life example project: a content management system. It’s a fun and easily understandable project that is used to demonstrate the concepts outlined in the book in a practical way.

This is a clear, approachable and very easy-to-follow book that will get you to to speed with Sinatra in no time.

Author(s): Darren Jones

5. Beginning Ruby: From Novice to Professional (Beginning From Novice to Professional) (2011)

Based on the bestselling first edition, Beginning Ruby: From Novice to Professional, Second Edition is the leading guide for every type of reader who wants to learn Ruby from the ground up.

The new edition of this book provides the same excellent introduction to Ruby as the first edition plus updates for the newest version of Ruby, including the addition of the Sinatra and Ramaze web application frameworks and a chapter on GUI development so developers can take advantage of these new trends.

Beginning Ruby starts by explaining the principles behind object-oriented programming and within a few chapters builds toward creating a full Ruby application. By the end of the book, in addition to in-depth knowledge of Ruby, you’ll also have basic understanding of many ancillary technologies such as SQL, XML, web frameworks, and networking.

  • Introduces readers to the Ruby programming language
  • Takes readers from basic programming skills to web development with topics like Ruby-based frameworks and GUI programming
  • Covers many ancillary technologies in order to provide a broader picture (e.g., databases, XML, network daemons)

Author(s): Peter Cooper

6. Instant Sinatra Starter (2013)

Your practical guide to getting started with Sinatra to quickly create simple web applications

Overview

  • Learn something new in an Instant! A short, fast, focused guide delivering immediate results
  • Set up a Sinatra project
  • Deploy your project to the Web
  • Learn about the advanced features of Sinatra

In Detail

Sinatra is a free and open source software web application library and domain-specific language written in Ruby. It provides both the beginner and the experienced professional with a tool for creating simple, yet powerful web applications.

Instant Sinatra Starter is a practical, hands-on guide that provides you with the necessary knowledge to get started from scratch.Including all the necessary steps to put together a Sinatra application and get it online, we will also learn all that you need to know to make your application all it can and should be.

We’ll learn how a web request is received, pre-processed by Rack and Sinatra middleware, then handed to the application. Learn how to build a response via templates, then hand the response back to be sent to the client.

Later we will learn to configure your application for your specific needs and handle more complex requests and responses. With Instant Sinatra Starter, we’ll explore the essentials to get our first Sinatra application online.

What you will learn from this book

  • Set up a development environment for Sinatra
  • Set up a Sinatra project
  • Create a Git repository for a Sinatra project
  • Create HTML templates with Slim
  • Deploy a Sinatra project to Heroku
  • Handle requests for different formats (HTML and JSON)
  • Receive file uploads and store them
  • Keep your application secure from common attacks

Approach

Get to grips with a new technology, understand what it is and what it can do for you, and then get to work with the most important features and tasks. Written as a practical guide, Instant Sinatra Starter will help you create a simple web app in no time at all.

Who this book is written for

Instant Sinatra Starter is great if you are looking to get started with Sinatra for web development. Some previous experience with Ruby would be beneficial though not necessary for this step-by-step exploration of Sinatra and the world of web development.

Author(s): Joe Yates

7. Scalatra in Action (2016)

Summary

Scalatra in Actionintroduces the Scalatra framework and the Sinatra model. It covers the framework in its entirety, starting with concepts like request routing, input handling, actions, and HTTP responses, then proceeds to more advanced topics, such as data access, handling heavy load, asynchronicity, securing applications, designing and documenting RESTful APIs, and real-time web programming.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the Technology

Scalatra is a lightweight Scala web framework similar to the popular Ruby-based Sinatra. It’s perfect for running real-time applications on multicore servers, and is a fast way to spin up web apps and build HTTP APIs for mobile, Backbone.js, and AngularJS apps.

About the Book

Scalatra in Actioncovers the Scalatra framework in its entirety, starting with concepts such as request routing, input handling, actions, and HTTP responses. For readers who don’t already know Scala, the book introduces the Scala language and sbt, the Simple Build Tool. You’ll learn how to use Scalatra’s powerful templating engine, Scalate. It also covers advanced topics such as data access, handling heavy load, asynchronicity, securing your application, designing RESTful APIs, and real-time web programming.

What’s Inside

  • Make clean templates using Scalate
  • Integrate with libraries that supplement Scalatra
  • Write tests using Specs2
  • Integrate Scalatra with databases

About the Reader

Readers should be familiar with the basics of HTTP, REST, and web applications. No experience with Scalatra, Sinatra, or Scala is required.

About the Authors

Dave Hrycyszyn is technical director for a London-based agency specializing in agile software design and development. Stefan Ollinger is an active Scalatra contributor. Ross A. Baker is a Senior Cloud Engineer, a Scalate commiter, and organizer of the Indy Scala meetup.

Table of Contents

    PART 1 INTRODUCTION TO SCALATRA

  1. Introduction
  2. A taste of Scalatra
  3. Routing
  4. Working with user input
  5. PART 2 COMMON DEVELOPMENT TASKS

  6. Handling JSON
  7. Handling files
  8. Server-side templating
  9. Testing
  10. Configuration, build, and deployment
  11. Working with a database
  12. PART 3 ADVANCED TOPICS

  13. Authentication
  14. Asynchronous programming
  15. Creating a RESTful JSON API with Swagger

    Author(s): Dave Hrycyszyn, Stefan Ollinger