<DIV><p>Get ready to see Rails as you've never seen it before. Learn how to extend the framework, change its behavior, and replace whole components to bend it to your will. Eight different test-driven tutorials will help you understand Rails' inner workings and prepare you to tackle complicated proj
Crafting Rails 4 applications: expert practices for everyday Rails development
โ Scribed by Josรฉ Valim
- Publisher
- Pragmatic Bookshelf
- Year
- 2013
- Tongue
- English
- Leaves
- 192
- Edition
- 2
- Category
- Library
No coin nor oath required. For personal study only.
โฆ Synopsis
Get ready to see Rails as you've never seen it before. Learn how to extend the framework, change its behavior, and replace whole components to bend it to your will. Eight different test-driven tutorials will help you understand Rails' inner workings and prepare you to tackle complicated projects with solutions that are well-tested, modular, and easy to maintain.
This second edition of the bestselling Crafting Rails Applications has been updated to Rails 4 and discusses new topics such as streaming, mountable engines, and thread safety.
Rails is one of the most extensible frameworks out there. This pioneering book deep-dives into the Rails plugin APIs and shows you, the intermediate Rails developer, how to use them to write better web applications and make your day-to-day work with Rails more productive.
Rails Core developer Jose Valim guides you through eight different tutorials, each using test-driven development to build a new Rails plugin or application that solves common problems with these APIs. You'll learn how the Rails rendering stack works and customize it to read templates from the database while you discover how to mimic Active Record behavior, such as validations, in any other object. You'll find out how Rails integrates with Rack, the different ways to stream data from your web application, and how to mix Rails engines and Sinatra applications into your Rails apps, so you can choose the most appropriate tool for the job. In addition, you'll improve your productivity by customizing generators and responders.
This book will help you understand Rails' inner workings, including generators, template handlers, internationalization, routing, and responders. With the knowledge you'll gain, you'll create well-tested, modular, and robust solutions for your next project.
โฆ Table of Contents
Cover......Page 1
Table of Contents......Page 5
Beta 2 - June 21st, 2013......Page 7
Who Should Read This Book?......Page 8
What Is in the Book?......Page 9
Online Resources......Page 11
1. Creating Our Own Renderer......Page 12
Creating your first Rails Plugin......Page 13
Writing the Renderer......Page 16
Understanding The Rails Rendering Stack......Page 20
Taking It to the Next Level......Page 26
Wrapping Up......Page 27
Creating Our Model......Page 28
Integration tests with Capybara......Page 39
Taking It to the Next Level......Page 43
Wrapping Up......Page 48
Revisiting the Rendering Stack......Page 49
Setting Up a SqlResolver......Page 51
Configuring Our Resolver for Production......Page 58
Serving Templates with Metal......Page 66
Wrapping Up......Page 70
4. Sending Multipart Emails Using Template Handlers......Page 71
Playing with the Template Handler API......Page 73
Building a Template Handler with Markdown + ERB......Page 77
Customizing Rails Generators......Page 81
Extending Rails with Railties......Page 90
Wrapping Up......Page 92
5. Streaming Server Events to Clients Asynchronously......Page 94
Extending Rails with Engines......Page 95
Live Streaming......Page 98
File system notifications with Threads......Page 104
Code loading techniques......Page 112
Wrapping up......Page 116
6. Writing DRY Controllers with Responders......Page 117
Understanding Responders......Page 118
Exploring ActionController::Responder......Page 122
The Flash Responder......Page 127
HTTP Cache Responder......Page 132
More Ways to Customize Generators......Page 136
Wrapping Up......Page 142
Mountable and Isolated Engines......Page 144
Storing Notifications in the Database......Page 146
Rails and Rack......Page 153
Middleware Stacks......Page 156
Streaming with Rack......Page 164
Wrapping Up......Page 168
8. Translating Applications Using Key-Value Backends......Page 169
Revisiting Rails::Application......Page 170
I18n Backends and Extensions......Page 174
Rails and Sinatra......Page 177
Taking It to the Next Level with Devise and Capybara......Page 183
Wrapping Up......Page 190
๐ SIMILAR VOLUMES
Creating our own renderer -- Building models with active models -- Retrieving view templates from custom stores -- Sending multipart emails using template handlers -- Streaming server events to clients asynchronously -- Writing DRY controllers with responders -- Managing application events with moun
Rails is one of the most extensible frameworks out there. This pioneering book deep-dives into the Rails plugin APIs and shows you, the intermediate Rails developer, how to use them to write better web applications and make your day-to-day work with Rails more productive.
Rails is one of the most extensible frameworks out there. This pioneering book deep-dives into the Rails plugin APIs and shows you, the intermediate Rails developer, how to use them to write better web applications and make your day-to-day work with Rails more productive. Rails Core developer Jose
Rails Core developer Jose Valim guides you through seven different tutorials, each of them using test-driven development to build a new Rails extension or application that solves common problems with these new APIs. You will understand how the Rails rendering stack works and customize it to read tem
Rails Core developer Jose Valim guides you through seven different tutorials, each of them using test-driven development to build a new Rails extension or application that solves common problems with these new APIs. You will understand how the Rails rendering stack works and customize it to read tem