Learning Rails 3. Rails from the Outside In - Helion
ISBN: 978-14-493-4343-9
stron: 414, Format: ebook
Data wydania: 2012-07-17
Księgarnia: Helion
Cena książki: 109,65 zł (poprzednio: 127,50 zł)
Oszczędzasz: 14% (-17,85 zł)
If you’re a web developer or designer ready to learn Rails, this unique book is the ideal way to start.
Rather than throw you into the middle of the framework’s Model-View-Controller architecture, Learning Rails 3 works from the outside in. You’ll begin with the foundations of the Web you already know, and learn how to create something visible with Rails’ view layer. Then you’ll tackle the more difficult inner layers: the database models and controller code.
All you need to get started is HTML experience. Each chapter includes exercises and review questions to test your understanding as you go.
- Present content by building an application with a basic view and a simple controller
- Build forms and process their results, progressing from simple to more complex
- Connect forms to models by setting up a database, and create code that maps to database structures
- Use Rails scaffolding to build applications from a view-centric perspective
- Add common web application elements such as sessions, cookies, and authentication
- Build applications that combine data from multiple tables
- Send and receive email messages from your applications
"Learning Rails 3 feels like a brisk pair programming session with professionals who know how to use Ruby on Rails to get things done, and get them done well."
-Alan Harris, author of Sinatra: Up and Running
Osoby które kupowały "Learning Rails 3. Rails from the Outside In", wybierały także:
- Ruby on Rails. Ćwiczenia 18,75 zł, (3,00 zł -84%)
- Ruby on Rails. Od podstaw 49,00 zł, (26,95 zł -45%)
- Rails. Receptury 66,98 zł, (36,84 zł -45%)
- Programowanie w języku Ruby. Mikrousługi i konteneryzacja 57,95 zł, (32,45 zł -44%)
- Rails. Sztuka programowania 57,95 zł, (32,45 zł -44%)
Spis treści
Learning Rails 3. Rails from the Outside In eBook -- spis treści
- Learning Rails 3
- A Note Regarding Supplemental Files
- Preface
- Who This Book Is For
- Who This Book Is Not For
- What Youll Learn
- Ruby and Rails Style
- Other Options
- Rails Versions
- If You Have Problems Making Examples Work
- If You Like (or Dont Like) This Book
- Conventions Used in This Book
- Using Code Examples
- Safari Books Online
- How to Contact Us
- Acknowledgments
- 1. Starting Up Ruby on Rails
- If You Run Windows, Youre Lucky
- Getting Started at the Command Line
- Starting Up Rails
- Test Your Knowledge
- Quiz
- Answers
- 2. Rails on the Web
- Creating Your Own View
- What Are All Those Folders?
- Adding Some Data
- How Hello World Works
- Adding Logic to the View
- Test Your Knowledge
- Quiz
- Answers
- 3. Adding Web Style
- I Want My CSS!
- Specifying Stylesheets
- Creating a Layout for a Controller
- Choosing a Layout from a Controller
- Sharing Template Data with the Layout
- Setting a Default Page
- Test Your Knowledge
- Quiz
- Answers
- 4. Managing Data Flow: Controllers and Models
- Getting Started, Greeting Guests
- Application Flow
- Keeping Track: A Simple Guestbook
- Connecting to a Database Through a Model
- Connecting the Controller to the Model
- Storing data using the model
- Retrieving data from the model and showing it
- Finding Data with ActiveRecord
- Test Your Knowledge
- Quiz
- Answers
- 5. Accelerating Development with Scaffolding and REST
- A First Look at Scaffolding
- REST and Controller Best Practices
- Websites and Web Applications
- Toward a Cleaner Approach
- Examining a RESTful Controller
- Index: An Overview of Data
- Show: Just One Row of Data
- New: A Blank Set of Data Fields
- Edit: Hand Me That Data, Please
- Create: Save Something New
- Put This Updated Record In
- Destroy It
- Escaping the REST Prison
- Test Your Knowledge
- Quiz
- Answers
- 6. Presenting Models with Forms
- More Than a Name on a Form
- Generating HTML Forms with Scaffolding
- Form as a Wrapper
- Creating Text Fields and Text Areas
- Labels
- Creating Checkboxes
- Creating Radio Buttons
- Creating Selection Lists
- Dates and Times
- Creating Helper Methods
- Test Your Knowledge
- Quiz
- Answers
- 7. Strengthening Models with Validation
- Without Validation
- The Original Model
- The Power of Declarative Validation
- Managing Secrets
- Customizing the Message
- Limiting Choices
- Testing Format with Regular Expressions
- Seen It All Before
- Numbers Only
- A Place on the Calendar
- Testing for Presence
- Beyond Simple Declarations
- Test It Only If
- Do It Yourself
- Test Your Knowledge
- Quiz
- Answers
- 8. Improving Forms
- Adding a Picture by Uploading a File
- File Upload Forms
- Model and Migration Changes
- A migration for an extension
- attr_accessible, again
- Extending a model beyond the database
- Showing it off
- Results
- Standardizing Your Look with Form Builders
- Supporting Your Own Field Types
- Adding Automation
- Integrating Form Builders and Styles
- Test Your Knowledge
- Quiz
- Answers
- Adding a Picture by Uploading a File
- 9. Developing Model Relationships
- Connecting Awards to Students
- Establishing the Relationship
- Supporting the Relationship
- Guaranteeing a Relationship
- Connecting Students to Awards
- Removing Awards When Students Disappear
- Counting Awards for Students
- Nesting Awards in Students
- Changing the Routing
- Changing the Controller
- Changing the Award Views
- Connecting the Student Views
- Is Nesting Worth It?
- Many-to-Many: Connecting Students to Courses
- Creating Tables
- Connecting the Models
- Adding to the Controllers
- Adding Routing
- Supporting the Relationship Through Views
- Establishing navigation
- Showing counts
- Enrolling students in courses
- Whats Missing?
- Test Your Knowledge
- Quiz
- Answers
- Connecting Awards to Students
- 10. Managing Databases with Migrations
- What Migrations Offer You
- Migration Basics
- Migration Files
- Running Migrations Forward and Backward
- Inside Migrations
- Working with Tables
- Data Types
- Working with Columns
- Indexes
- Other Opportunities
- Test Your Knowledge
- Quiz
- Answers
- 11. Debugging
- Creating Your Own Debugging Messages
- Raising Exceptions
- Logging
- Working with Rails from the Console
- The Ruby Debugger
- Test Your Knowledge
- Quiz
- Answers
- 12. Testing
- Test Mode
- Setting Up a Test Database with Fixtures
- Unit Testing
- Functional Testing
- Calling Controllers
- Testing Responses
- Dealing with Nested Resources
- Integration Testing
- Beyond the Basics
- Test Your Knowledge
- Quiz
- Answers
- 13. Sessions and Cookies
- Getting Into and Out of Cookies
- Storing Data Between Sessions
- Test Your Knowledge
- Quiz
- Answers
- 14. Users and Authentication
- Installation
- Storing Identities
- Storing User Data
- Wiring OmniAuth into the Application
- Classifying Users
- More Options
- Test Your Knowledge
- Quiz
- Answers
- 15. Routing
- Creating Routes to Interpret URIs
- Specifying Routes with match
- Globbing
- Regular Expressions and Routing
- A Domain Default with root
- Named Routes
- Mapping Resources
- Nesting Resources
- Route Order and Priority
- Checking the Map
- Generating URIs from Views and Controllers
- Pointing url_for in the Right Direction
- Adding Options
- Infinite Possibilities
- Test Your Knowledge
- Quiz
- Answers
- Creating Routes to Interpret URIs
- 16. From CSS to SASS
- Getting Started
- Sassy Style
- Variables
- Mixins
- Nesting
- Making Everything Work Together
- Becoming Sassier
- Test Your Knowledge
- Quiz
- Answers
- 17. Managing Assets and Bundles
- The Junk Drawer
- Sprockets
- Dissecting The Pipeline
- Putting It All Together
- Bundler
- Test Your Knowledge
- Quiz
- Answers
- The Junk Drawer
- 18. Sending Code to the Browser: JavaScript and CoffeeScript
- Sending JavaScript to the Browser
- Simplifying with CoffeeScript
- Have Some Sugar with your CoffeeScript
- Converting to CoffeeScript
- Test Your Knowledge
- Quiz
- Answers
- 19. Mail in Rails
- Sending Mail Messages
- Receiving Mail
- Setup
- Processing Messages
- Test Your Knowledge
- Quiz
- Answers
- 20. Pushing Further into Rails
- Changing to Production Mode
- Deploying Is Much More Than Programming
- Joining the Rails Ecosystem
- Keep Up with Rails
- Ruby
- Working With and Around Rails
- Keep Exploring
- A. An Incredibly Brief Introduction to Ruby
- How Ruby Works
- How Rails Works
- Getting Started with Classes and Objects
- Comments
- Variables, Methods, and Attributes
- Variables
- Arrays and hashes
- Symbols
- Methods
- Privacy, please
- super
- Calling methods: advanced options
- Attributes
- Variables
- Logic and Conditionals
- Operators
- if, else, unless, and elsif
- ?:
- case and when
- Loops
- while and until
- Just Counting
- for
- Many More Possibilities
- B. An Incredibly Brief Introduction to Relational Databases
- Tables of Data
- Connecting Tables
- Using Tables to Connect Tables
- Granularity
- Databases, Tables, and Rails
- Tables of Data
- C. An Incredibly Brief Guide to Regular Expressions
- What Regular Expressions Do
- Starting Small
- The Simplest Expressions: Literal Strings
- Character Classes
- Escaping
- Modifiers
- Anchors
- Sequences, Repetition, Groups, and Choices
- Greed
- More Possibilities
- D. Glossary
- Speaking in Rails
- Index
- About the Authors
- Colophon
- Copyright