Sinatra: Up and Running. Ruby for the Web, Simply - Helion
ISBN: 978-14-493-2397-4
stron: 122, Format: ebook
Data wydania: 2011-11-21
Księgarnia: Helion
Cena książki: 29,90 zł (poprzednio: 59,80 zł)
Oszczędzasz: 50% (-29,90 zł)
Take advantage of Sinatra, the Ruby-based web application library and domain-specific language used by Heroku, GitHub, Apple, 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
Osoby które kupowały "Sinatra: Up and Running. Ruby for the Web, Simply", wybierały także:
- Cisco CCNA 200-301. Kurs video. Administrowanie bezpieczeństwem sieci. Część 3 665,00 zł, (39,90 zł -94%)
- Cisco CCNA 200-301. Kurs video. Administrowanie urządzeniami Cisco. Część 2 665,00 zł, (39,90 zł -94%)
- Cisco CCNA 200-301. Kurs video. Podstawy sieci komputerowych i konfiguracji. Część 1 665,00 zł, (39,90 zł -94%)
- Impact of P2P and Free Distribution on Book Sales 427,14 zł, (29,90 zł -93%)
- Cisco CCNP Enterprise 350-401 ENCOR. Kurs video. Programowanie i automatyzacja sieci 443,33 zł, (39,90 zł -91%)
Spis treści
Sinatra: Up and Running. Ruby for the Web, Simply eBook -- spis treści
- Sinatra: Up and Running
- SPECIAL OFFER: Upgrade this ebook with OReilly
- 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
- 1. Taking the Stage
- Characteristics of Sinatra
- Is It a Framework?
- Does It Implement MVC?
- Whos Using It?
- What Does a Production Project Look Like?
- Whats 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
- Characteristics of Sinatra
- 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
- Routing
- 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
- Application and Delegation
- 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
- Running Modular Applications
- Better Rack Citizenship
- Chaining Classes
- Middleware Chain
- Cascade
- With a Router
- On Return Values
- Using Sinatra as Router
- Chaining Classes
- Extensions and Modular Applications
- Helpers
- Extensions
- Summary
- Subclassing Sinatra
- 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?
- Displaying Blog Posts
- Summary
- Workflow Concept
- About the Authors
- SPECIAL OFFER: Upgrade this ebook with OReilly
- Copyright