Ruby on Rails 基础 Beginning Ruby on Rails

分類: 图书,进口原版书,科学与技术 Science & Techology ,
作者: Steve Holzner 著
出 版 社: John Wiley & Sons
出版时间: 2007-7-1字数:版次: 1页数: 380印刷时间: 2006/12/01开本:印次:纸张: 胶版纸I S B N : 9780470069158包装: 平装内容简介
Ruby on Rails is the revolutionary online programming tool that makes creating functional e-commerce web sites faster and easier than ever. With the intuitive, straightforward nature of Ruby and the development platform provided by Rails, you can put together full-fledged web applications quickly, even if you're new to web programming.
You will find a thorough introduction to both Ruby and Rails in this book. You'll get the easy instructions for acquiring and installing both; understand the nature of conditionals, loops, methods, and blocks; and become familiar with Ruby's classes and objects. You'll learn to build Rails applications, connect to databases, perform necessary testing, and put the whole thing together to create real-world applications such as shopping carts and online catalogs--apps you can actually use right away.
作者简介
Steven Holzner is the award-winning author of more than 100 programming books. He’s been involved in Ruby on Rails for a long time, and does commercial Rails development. He’s also been on the faculty of Cornell University and MIT, as well as having been a contributing editor for PC Magazine.
目录
Acknowledgments
Introduction
Chapter 1: Welcome to Ruby
Creating a First Web Application
Getting Started with Ruby
Checking the Ruby Documentation
Working with Numbers in Ruby
Working with Strings in Ruby
Storing Data in Variables
Creating Constants
Interpolating Variables in Double-Quoted Strings
Reading Text on the Command Line
Creating Symbols in Ruby
Working with Operators
Handling Operator Precedence
Working with Arrays
Using Two Array Indices
Working with Hashes
Working with Ranges
Chapter 2: Conditionals, Loops, Methods, and Blocks
It’s All about Making Choices: the if Statement
Using the case Statement
Using Loops
Creating and Calling a Method
Making Use of Scope
Working with Blocks
Chapter 3: Classes and Objects
All about Encapsulation
Creating a Class
Creating an Object
Basing One Class on Another
Understanding Ruby’s Object Access
Overriding Methods
Creating Class Variables
Creating Class Methods
Creating Modules
Creating Mixins
Chapter 4: Welcome to Rails
Putting Ruby on Rails
Introducing Model-View-Controller Architecture
Giving the View Something to Do
Mixing Ruby Code and HTML Inside the View
Passing Data from an Action to a View
Escaping Sensitive Text
Adding a Second Action
Chapter 5: Building Simple Rails Applications
Accessing Data the User Provides
Using Rails Shortcuts for HTML Controls
Working with Models
Tying Controls to Models
Initializing Data in Controls
Storing Data in Sessions
Chapter 6: Connecting to Databases
Chapter 7: Working with Databases
Chapter 8: Validating and Testing
Chapter 9: Controlling the Action with the Action Controller
Chapter 10: Getting the Big Picture with Views
Chapter 11: Ajax and Rails
Appendix A: Answers to Exercises
Index