Steve Holzner Ph.D.9780470069158, 0470069155
Table of contents :
About the Author……Page 8
Credits……Page 10
Acknowledgments……Page 12
Contents……Page 14
How This Book Is Structured……Page 20
Conventions……Page 21
Source Code……Page 22
p2p.wrox.com……Page 23
Installing Ruby and Rails……Page 24
Creating a First Web Application……Page 26
Getting Started with Ruby……Page 30
Checking the Ruby Documentation……Page 32
Working with Numbers in Ruby……Page 33
Working with Strings in Ruby……Page 34
Storing Data in Variables……Page 36
Interpolating Variables in Double-Quoted Strings……Page 38
Reading Text on the Command Line……Page 39
Working with Operators……Page 41
Working with Arrays……Page 44
Using Two Array Indices……Page 47
Working with Hashes……Page 50
Working with Ranges……Page 52
Summary……Page 54
Exercises……Page 55
It’s All about Making Choices: the if Statement……Page 56
Using the case Statement……Page 62
Using Loops……Page 64
Creating and Calling a Method……Page 74
Making Use of Scope……Page 80
Working with Blocks……Page 81
Summary……Page 84
Exercises……Page 85
All about Encapsulation……Page 86
Creating a Class……Page 87
Creating an Object……Page 89
Basing One Class on Another……Page 95
Understanding Ruby’s Object Access……Page 98
Overriding Methods……Page 102
Creating Class Variables……Page 103
Creating Class Methods……Page 105
Creating Modules……Page 106
Creating Mixins……Page 108
Exercises……Page 110
Putting Ruby on Rails……Page 112
Introducing Model-View-Controller Architecture……Page 123
Giving the View Something to Do……Page 125
Mixing Ruby Code and HTML Inside the View……Page 128
Passing Data from an Action to a View……Page 131
Escaping Sensitive Text……Page 134
Adding a Second Action……Page 136
Summary……Page 143
Exercises……Page 144
Accessing Data the User Provides……Page 146
Using Rails Shortcuts for HTML Controls……Page 160
Working with Models……Page 166
Tying Controls to Models……Page 168
Initializing Data in Controls……Page 174
Storing Data in Sessions……Page 176
Exercises……Page 180
Tutorial on Databases……Page 182
Creating the Database……Page 185
Running the store Application……Page 192
Adding Another Record……Page 203
Beautifying the Display……Page 210
Exercises……Page 212
Displaying Items to the Customer……Page 214
Creating a Shopping Cart……Page 220
Combining Purchases in the Cart……Page 236
Clearing the Cart……Page 239
Letting the User View the Cart Anytime……Page 242
Summary……Page 244
Exercises……Page 245
Validating the Presence of Data……Page 246
Validating if Data Is Numeric……Page 249
Validating if Data Is Unique……Page 252
Creating the Validator Application……Page 254
Writing Your Own Validate Method……Page 269
Testing Your Model……Page 271
Testing Your Controller……Page 279
Exercises……Page 282
Routing Refinements……Page 284
Creating Cookies……Page 289
Creating a Filter……Page 296
Logging in with Filters……Page 301
Using After Filters……Page 308
Rendering Text Directly……Page 313
Caching……Page 315
Summary……Page 316
Exercises……Page 317
Creating XML……Page 318
Creating XML Attributes……Page 323
Using View Helpers……Page 326
Using View Pagination……Page 332
Using Partial Templates……Page 338
Passing Data to Partial Templates……Page 340
Exercises……Page 343
Using Ajax……Page 344
Getting Access to Ajax Data……Page 348
Using XML and Ajax……Page 352
Using HTML Controls and Ajax……Page 357
Performing Ajax Searches……Page 361
Performing Visual Effects……Page 365
Summary……Page 367
Exercises……Page 368
Answers to Exercises……Page 370
SYMBOLS AND NUMERICS……Page 388
A……Page 389
C……Page 390
D……Page 391
E……Page 392
F……Page 393
J……Page 394
M……Page 395
O……Page 396
P……Page 397
R……Page 398
S……Page 399
T……Page 400
U……Page 401
W……Page 402
Y……Page 403
Reviews
There are no reviews yet.