Ajax on Rails. Build Dynamic Web Applications with Ruby - Helion
ebook
Autor: Scott RaymondISBN: 978-05-965-5463-7
stron: 352, Format: ebook
Data wydania: 2007-01-03
Księgarnia: Helion
Cena książki: 139,00 zł
Learn to build dynamic, interactive web applications using the two most important approaches to web development today: Ajax and the phenomenally efficient Ruby on Rails platform. This book teaches intermediate to advanced web developers how to use both Ajax and Rails to quickly build high-performance, scalable applications without being overwhelmed with thousands of lines of JavaScript code. More than just recipes, you also get a thorough, low-level understanding of what's happening under the hood.
- Ajax on Rails includes three fully worked out Rails/Ajax applications, and quick reference sections for Prototype and script.aculo.us.
- Testing lessons show you how to eliminate cross-browser JavaScript errors and DOM debugging nightmares using a combination of Firebug, and Venkman.
- Advanced material explains the most current design practices for Ajax usability. You'll learn to avoid user experience mistakes with proven design patterns.
Osoby które kupowały "Ajax on Rails. Build Dynamic Web Applications with Ruby", wybierały także:
- ASP.NET MVC. Kompletny przewodnik dla programistów interaktywnych aplikacji internetowych w Visual Studio 86,77 zł, (26,90 zł -69%)
- JavaScript Masterclass 88,41 zł, (38,90 zł -56%)
- TypeScript Crash Course 88,41 zł, (38,90 zł -56%)
- React Development using TypeScript 88,41 zł, (38,90 zł -56%)
- Ajax. Implementacje 49,00 zł, (26,95 zł -45%)
Spis treści
Ajax on Rails. Build Dynamic Web Applications with Ruby eBook -- spis treści
- Ajax on Rails
- SPECIAL OFFER: Upgrade this ebook with OReilly
- A Note Regarding Supplemental Files
- Preface
- Assumptions This Book Makes
- Contents of This Book
- Conventions Used in This Book
- Using Code Examples
- Wed Like to Hear from You
- Safari Enabled
- Acknowledgments
- 1. Introduction
- Who This Book Is For
- What Ajax Is
- The Traditional Model
- The Ajax Model
- Its Actually Pretty Easy
- The Eras of Web Development
- History of Ajax
- Ajax: Neither Asynchronous nor XML. Discuss.
- What Rails Is
- Rails Mantras
- You Got Your Ajax in My Rails!
- Getting Up to Speed
- Starting Ruby
- Getting on the Rails
- Other Things Youll Want
- Hello, Rails
- Rails Writ Large
- Summary
- 2. Getting Our Feet Wet
- The Old-Fashioned Way
- Starting a Project
- JavaScript Libraries and Prototype
- Bringing Rails into the Picture
- ERb Basics
- Layouts
- Partials
- Helpers
- Back to Ajax
- Summary
- The Old-Fashioned Way
- 3. Introducing Prototype
- Setting the Stage
- Ajax Links
- Callbacks
- Other Options
- Linking to an arbitrary function
- Forms
- Form Tag Helpers
- Form Helpers
- Using form_for
- Ajax Forms
- Buttons
- Buttons for Arbitrary Functions
- Custom Helpers
- Form Observers
- Observing an Entire Form
- Summary
- 4. Introducing script.aculo.us
- Visual Effects
- Toggling
- Options
- Queues
- Callbacks
- Transitions
- Visual Effect Helper
- Drag and Drop
- Draggables
- Draggable options
- Droppables
- Droppable options
- Droppables with Ajax
- Sortables
- Ajax-enabled sortables
- Draggables
- Summary
- Visual Effects
- 5. RJS
- Instructions Instead of Data
- Putting the R in RJS
- Diving In
- Rendering JavaScript Without RJS
- RJS: Generating JavaScript with Ruby
- Using .rjs files
- Testing and debugging RJS
- Element Proxies
- Custom methods with element proxies
- Updating content with element proxies
- replace_html and replace
- reload
- Collection Proxies
- each
- invoke
- pluck
- collect/map
- detect/find
- select/find_all
- reject
- partition
- min and max
- all and any
- inject
- zip
- sort_by
- JavaScriptGenerator Methods
- Manipulating DOM elements
- Inserting content
- Redirecting
- Delaying execution
- Creating drag-and-drop elements
- Generating arbitrary JavaScript
- Class proxies
- RJS Helpers
- RJS Without Ajax
- A Real-World Example
- The Old Way
- The RJS Way
- Summary
- 6. Ajax Usability
- Principles of Usability
- Personal Assistant: Defending Attention
- Tour Guide: Manage Expectations
- User models and program models
- Example: Windows versus Mac program models
- Set accurate expectations
- Mentor: Design Not Just for Usability, but Learnability
- Teach with affordances
- Trainer: Provide Immediate Feedback
- Direct manipulation
- Work with the mind
- Use color appropriately
- The Context of the Web
- HTTP
- The Page
- Usability on the Web
- Know When to Use Ajaxand When Not To
- Dont break the back button
- Dont use Ajax for navigation
- Keep Page Elements Consistent
- Key Commands
- Increasing Responsiveness with Ajax (Its Too Slow!)
- Consequences of Increased Responsiveness (Its Too Fast!)
- Blank Slates, Coach Content, and Help Nuggets
- Blank slates
- Coach content
- Help nuggets
- Know When to Use Ajaxand When Not To
- Cross-Platform Development
- Realities of Platforms
- What makes a platform
- It isnt all bad
- Dealing with platform differences
- The Rails Way
- Know your audience
- Graceful Degradation and Progressive Enhancement
- Realities of Platforms
- Summary
- Principles of Usability
- 7. Testing and Debugging
- Debugging
- Understanding Rails Exceptions
- Using the Development Log
- Interactive Consoles
- Using Irb
- Using the Rails console with ActiveRecord
- Using the Rails console with ActionPack
- Rails breakpoints
- Inspectors
- Using the debug helper
- RJS debugging mode
- Routing Navigator
- FireBug
- Testing
- Functional Tests
- Testing RJS
- Testing HTML Validity
- Integration Tests
- JavaScript Unit Testing
- Summary
- Debugging
- 8. Security
- Healthy Skepticism: Dont Trust User Input
- Using Scoped Queries
- Record IDs in URLs
- Mass Assignment
- Form Validation
- SQL Injection
- Session Fixation
- Cross-Site Scripting
- Hashing Passwords
- Silencing Logs
- The Same-Origin Policy
- Creating an Ajax Proxy
- Bypassing XMLHttpRequest for Cross-Domain Requests
- The Use and Abuse of HTTP Methods
- Encryption and Secure Certificates
- Ajax over SSL
- The Rails Security Mailing List
- Summary
- Healthy Skepticism: Dont Trust User Input
- 9. Performance
- Development and Production Environments
- Session Stores
- ActiveRecordStore
- SQLSessionStore
- memcached
- Turning Sessions Off
- Output Caching
- Page Caching
- Action Caching
- Fragment Caching
- Expiring Output Caches
- Asset Packaging
- Dealing with Long-Running Tasks
- Summary
- 10. Prototype Reference
- Ajax Support
- Base Objects
- Ajax Requests
- Ajax.Request options
- Examples
- Ajax Updaters
- Ajax.Updater options
- Examples
- Periodical Ajax Updaters
- Ajax.PeriodicalUpdater options
- Example
- Global Responders
- Example
- DOM Manipulation
- $()
- $F()
- Selectors
- Examples
- document.getElementsByClassName(className [, parentElement])
- Element Methods
- class Element.ClassNames
- Inserting Content
- class Insertion.Before
- class Insertion.Top
- class Insertion.Bottom
- class Insertion.After
- Examples
- Element Positioning
- Form Observers
- Core Extensions
- Array Extensions
- Hashes
- Ranges
- Example
- Enumerable
- String Extensions
- String Templates
- Number Extensions
- Events
- Function Extensions
- Example
- Object Extensions
- Classes
- PeriodicalExecuter
- Example
- Try.these()
- Prototype
- Ajax Support
- 11. script.aculo.us Reference
- Visual Effects
- Core Effects
- Combination Effects
- Effect Options
- Effect Instance Methods and Properties
- Effect Transitions
- Effect Callbacks
- Effect Queues
- Static Effect Methods
- Drag and Drop
- class Draggable
- Examples
- Instance methods and properties
- Draggables
- Droppable Elements
- Sortable Elements
- class Draggable
- Controls
- Auto-Completion
- Standard options
- Local auto-completing
- Example
- Ajax auto-completion
- Example
- In-Place Editors
- Options
- Examples
- Instance methods
- Sliders
- Examples
- Instance methods
- Auto-Completion
- Element Extensions
- DOM Builder
- JavaScript Unit Testing
- Assertions
- Utility Methods
- Visual Effects
- 12. Review Quiz
- 13. Photo Gallery
- 14. Intranet Workgroup Collaboration
- Index
- About the Author
- Colophon
- SPECIAL OFFER: Upgrade this ebook with OReilly