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
Sinatra: Up and Running
โ Scribed by Harris, Alan, Haase, Konstantin
- Publisher
- O'Reilly Media
- Year
- 2012
- Tongue
- English
- Leaves
- 103
- Category
- Library
No coin nor oath required. For personal study only.
โฆ Synopsis
Sinatra gives developers a small but powerful and scalable framework for building web applications with Ruby. This introduction gets readers started, helping them to build, install, and polish a first application. It also explores how Sinatra fits in the web application ecosystem, especially in comparison to its far larger cousin, Ruby on Rails.
Abstract: Sinatra gives developers a small but powerful and scalable framework for building web applications with Ruby. This introduction gets readers started, helping them to build, install, and polish a first application. It also explores how Sinatra fits in the web application ecosystem, especially in comparison to its far larger cousin, Ruby on Rails
โฆ Table of Contents
Content: Table of Contents
Preface
Who This Book Is For
How This Book Is Organized
The Basics
Digging Deeper
Hands On
Conventions Used in This Book
Using Code Examples
Safariยฎ Books Online
How to Contact Us
Chapter 1. Taking the Stage
Characteristics of Sinatra
Is It a Framework?
Does It Implement MVC?
Who's Using It?
What Does a Production Project Look Like?
What's the Catch?
Are These Skills Transferrable?
Installation
Thin
Up and Running
Breaking Down the Syntax
Testing with Telnet
Rock, Paper, Scissors or "The Shape of Things to Come"
Summary
Chapter 2. Fundamentals. RoutingHypertext Transfer Protocol
Verbs
Common Route Definition
Many URLs, Similar Behaviors
Routes with Parameters
Routes with Query String Parameters
Routes with Wildcards
The First Sufficient Match Wins
Routes with Regular Expressions
Halting a Request
Passing a Request
Redirecting a Request
Static Files
Views
Inline Templates
External View Files
External Views in Subfolders
Passing Data into Views
Filters
Handling Errors
404 Not Found
500 Internal Server Error
Configuration
HTTP Headers
The headers Method
Exploring the request Object
Caching. Setting Headers ManuallySettings Headers via expires
ETags
Generating ETags
Weak ETags
Sessions
Destroying a Session
Cookies
Attachments
Streaming
Keeping the Connection Open
Finite Streaming
Summary
Chapter 3. A Peek Behind the Curtain
Application and Delegation
The Inner Self
Where Does get Come From?
Exploring the Implementation
Helpers and Extensions
Creating Sinatra Extensions
Helpers
Helpers Without Modules
Combining Helpers and Extensions
Request and Response
Rack
Sinatra Without Sinatra
Rack It Up
Middleware
Sinatra and Middleware
Dispatching. Dispatching ReduxChanging Bindings
Summary
Chapter 4. Modular Applications
Subclassing Sinatra
Running Modular Applications
Using run!
With rackup
About Settings
Settings and Classes
Subclassing Subclasses
Route Inheritance
Architecture
Dynamic Subclass Generation
Better Rack Citizenship
Chaining Classes
Middleware Chain
Cascade
With a Router
On Return Values
Using Sinatra as Router
Extensions and Modular Applications
Helpers
Extensions
Summary
Chapter 5. Hands On: Your Own Blog Engine
Workflow Concept
File-Based Posts
Git for Distribution
Semistatic Pages. The ImplementationDisplaying Blog Posts
Rendering Markdown
Generating articles
Adding an index
Adding a basic layout
Git Integration
Regenerating content
Pulling changes
Proper cache headers
Glueing Everything Together
Rack It Up!
Setting it up on GitHub
Setting it up on Bitbucket
Using a post-receive hook
What about Heroku?
Summary.
โฆ Subjects
Ruby (Computer program language);Web site development;Application software;Development
๐ SIMILAR VOLUMES
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
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
<div>If you're thinking about migrating to the PostgreSQL open source database system, this guide provides a concise overview to help you quickly understand and use PostgreSQL's unique features. Not only will you learn about the enterprise class features in the 9.2 release, you'll also discover tha
<div>If you're thinking about migrating to the PostgreSQL open source database system, this guide provides a concise overview to help you quickly understand and use PostgreSQL's unique features. Not only will you learn about the enterprise class features in the 9.2 release, you'll also discover tha