
Sinatra: Up and Running
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
More details
Other editions
Additional editions

Content
- Intro
- 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
- Routing
- Hypertext 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 Manually
- Settings 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 Redux
- Changing 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 Implementation
- Displaying 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
System requirements
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.