Agile web development with Rails: [covers Rails 2]
Gespeichert in:
Vorheriger Titel: | Thomas, David Agile web development with Rails |
---|---|
Hauptverfasser: | , , |
Format: | Buch |
Sprache: | English |
Veröffentlicht: |
Raleigh, NC [u.a.]
Pragmatic Bookshelf
2009
|
Ausgabe: | 3. ed. |
Schriftenreihe: | The pragmatic programmers
The facets of Ruby series |
Schlagworte: | |
Online-Zugang: | Inhaltsverzeichnis |
Beschreibung: | XV, 767 S. Ill. |
ISBN: | 1934356166 9781934356166 |
Internformat
MARC
LEADER | 00000nam a2200000 c 4500 | ||
---|---|---|---|
001 | BV035588347 | ||
003 | DE-604 | ||
005 | 20090922 | ||
007 | t | ||
008 | 090629s2009 a||| |||| 00||| eng d | ||
020 | |a 1934356166 |9 1-934356-16-6 | ||
020 | |a 9781934356166 |9 978-1-9343561-6-6 | ||
024 | 3 | |a 9781934356166 | |
035 | |a (OCoLC)551823357 | ||
035 | |a (DE-599)BSZ305145452 | ||
040 | |a DE-604 |b ger | ||
041 | 0 | |a eng | |
049 | |a DE-384 | ||
084 | |a ST 253 |0 (DE-625)143628: |2 rvk | ||
100 | 1 | |a Ruby, Sam |e Verfasser |0 (DE-588)133585425 |4 aut | |
245 | 1 | 0 | |a Agile web development with Rails |b [covers Rails 2] |c Sam Ruby ; Dave Thomas ; David Heinemeier Hansson |
250 | |a 3. ed. | ||
264 | 1 | |a Raleigh, NC [u.a.] |b Pragmatic Bookshelf |c 2009 | |
300 | |a XV, 767 S. |b Ill. | ||
336 | |b txt |2 rdacontent | ||
337 | |b n |2 rdamedia | ||
338 | |b nc |2 rdacarrier | ||
490 | 0 | |a The pragmatic programmers | |
490 | 0 | |a The facets of Ruby series | |
650 | 0 | 7 | |a Softwareentwicklung |0 (DE-588)4116522-6 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a Internet |0 (DE-588)4308416-3 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a Ruby on Rails |0 (DE-588)7516633-1 |2 gnd |9 rswk-swf |
689 | 0 | 0 | |a Ruby on Rails |0 (DE-588)7516633-1 |D s |
689 | 0 | |5 DE-604 | |
689 | 1 | 0 | |a Internet |0 (DE-588)4308416-3 |D s |
689 | 1 | 1 | |a Softwareentwicklung |0 (DE-588)4116522-6 |D s |
689 | 1 | |8 1\p |5 DE-604 | |
700 | 1 | |a Thomas, Dave |e Verfasser |4 aut | |
700 | 1 | |a Heinemeier Hansson, David |e Verfasser |4 aut | |
780 | 0 | 0 | |i Früher u. d. T. |a Thomas, David |t Agile web development with Rails |
856 | 4 | 2 | |m HBZ Datenaustausch |q application/pdf |u http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=017643609&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |3 Inhaltsverzeichnis |
999 | |a oai:aleph.bib-bvb.de:BVB01-017643609 | ||
883 | 1 | |8 1\p |a cgwrk |d 20201028 |q DE-101 |u https://d-nb.info/provenance/plan#cgwrk |
Datensatz im Suchindex
_version_ | 1804139249525587968 |
---|---|
adam_text | Titel: Agile web development with rails
Autor: Ruby, Sam
Jahr: 2009
Contents
Preface to the Second Edition xiii
Preface to the Third Edition xv
1 Introduction 1
1.1 Rails Is Agile............................. 3
1.2 Finding Your Way Around ..................... 4
1.3 Acknowledgments.......................... 6
Part I—Getting Started 9
2 The Architecture of Rails Applications 11
2.1 Models, Views, and Controllers.................. 11
2.2 Active Record: Rails Model Support................ 14
2.3 Action Pack: The View and Controller............... 18
3 Installing Rails 21
3.1 Your Shopping List.......................... 21
3.2 Installing on Windows........................ 21
3.3 Installing on Mac OS X....................... 23
3.4 Installing on Linux.......................... 24
3.5 Choosing a Rails Version...................... 26
3.6 Development Environments.................... 26
3.7 Rails and Databases......................... 30
3.8 Keeping Up-to-Date......................... 32
3.9 Rails and ISPs............................ 32
4 Instant Gratification 35
4.1 Creating a New Application................... l . 35
4.2 Hello, Rails!.............................. 37
4.3 Linking Pages Together....................... 48
4.4 What We Just Did.......................... 52
viü ? CONTENTS
Part II—Building an Application 53
5 The Depot Application 55
5.1 Incremental Development...................... 55
5.2 What Depot Does........................... 56
5.3 Let s Code............................... 60
6 Task A: Product Maintenance 61
6.1 Iteration Al: Getting Something Running............ 61
6.2 Creating the Products Model and Maintenance Application . . 67
6.3 Iteration A2: Adding a Missing Column.............. 71
6.4 Iteration A3: Validating!....................... 77
6.5 Iteration A4: Making Prettier Listings............... 81
7 Task B: Catalog Display 87
7.1 Iteration Bl: Creating the Catalog Listing ............ 87
7.2 Iteration B2: Adding a Page Layout................ 91
7.3 Iteration B3: Using a Helper to Format the Price........ 93
7.4 Iteration B4: Linking to the Cart.................. 94
8 Task C: Cart Creation 97
8.1 Sessions................................ 97
8.2 Iteration Cl: Creating a Cart.................... 101
8.3 Iteration C2: Creating a Smarter Cart .............. 104
8.4 Iteration C3: Handling Errors.......... . . ....... 107
8.5 Iteration C4: Finishing the Cart.................. 112
9 Task D: Add a Dash of Ajax 117
9.1 Iteration Dl: Moving the Cart................... 118
9.2 Iteration D2: Creating an Ajax-Based Cart.......:..... 123
9.3 Iteration D3: Highlighting Changes................ 126
9.4 Iteration D4: Hiding an Empty Cart................ 129
9.5 Iteration D5: Degrading If Javascript Is Disabled........ 132
9.6 What We Just Did.......................... 133
10 Task E: Check Out! 135
10.1 Iteration El: Capturing an Order................. 135
11 Task F: Administration 153
11.1 Iteration Fl: Adding Users..................... 153
11.2 Iteration F2: Logging In....................... 162
11.3 Iteration F3: Limiting Access.................... 165
11.4 Iteration F4: Adding a Sidebar, More Administration...... 168
lx
12 Task G: One Last Wafer-Thin Change 175
12.1 Generating the XML Feed...................... 175
12.2 Finishing Up............................. 185
13 Task I: Internationalization 187
13.1 Iteration II: Enabling Translation................. 187
13.2 Iteration 12: Exploring Strategies for Content.......... 201
14 Task T: Testing 205
14.1 Tests Baked Right In......................... 205
14.2 Unit Testing of Models........................ 206
14.3 Functional Testing of Controllers................. 219
14.4 Integration Testing of Applications................ 235
14.5 Performance Testing......................... 244
14.6 Using Mock Objects.......................... 248
Part III—Working with the Rails Framework 251
15 Rails in Depth 253
15.1 So, Where s Rails?.......................... 253
15.2 Directory Structure......................... 253
15.3 Rails Configuration ......................... 260
15.4 Naming Conventions......................... 264
15.5 Logging in Rails ........................... 268
15.6 Debugging Hints........................... 268
15.7 What s Next.............................. 270
16 Active Support 271
16.1 Generally Available Extensions .................. 271
16.2 Enumerations and Arrays ..................... 272
16.3 Hashes................................. 274
16.4 String Extensions.......................... 274
16.5 Extensions to Numbers....................... 277
16.6 Time and Date Extensions..................... 278
16.7 An Extension to Ruby Symbols.................. 280
16.8 with_options ............................. 280
16.9 Unicode Support............ . . ............. 281
17 Migrations 287
17.1 Creating and Running Migrations................. 289
17.2 Anatomy of a Migration....................... 291
17.3 Managing Tables........................... 295
17.4 Data Migrations........................... 300
CONTENTS
17.5 Advanced Migrations ........................ 303
17.6 When Migrations Go Bad...................... 307
17.7 Schema Manipulation Outside Migrations............ 308
17.8 Managing Migrations ........................ 309
18 Active Record: The Basics 311
18.1 Tables and Classes .......................... 312
18.2 Columns and Attributes ...................... 312
18.3 Primary Keys and ids........................ 316
18.4 Connecting to the Database.................... 318
18.5 Create, Read, Update, Delete (CRUD)............... 323
18.6 Aggregation and Structured Data............: .... 342
18.7 Miscellany............................... 349
19 Active Record: Relationships Between Tables 353
19.1 Creating Foreign Keys........................ 354
19.2 Specifying Relationships in Models................ 356
19.3 belongs_to and has_xxx Declarations.............. ¦ 358
19.4 Joining to Multiple Tables..................... 373
19.5 Self-referentialJoins......................... 383
19.6 Acts As................................. 384
19.7 When Things Get Saved........................ 388
19.8 Preloading Child Rows....................... 390
19.9 Counters................................ 391
20 Active Record: Object Life Cycle 393
20.1 Validation........................ ....... 393
20.2 Callbacks............................... 403
20.3 Advanced Attributes......................... 410
20.4 Transactions.......... . .................. 414
21 Action Controller: Routing and URLs 421
21.1 The Basics............................... 421
21.2 Routing Requests.......................... 422
21.3 Resource-Based Routing . . .................... 437
21.4 Testing Routing............................ 454
22 Action Controller and Rails 457
22.1 Action Methods............................ 457
22.2 Cookies and Sessions........................ 469
22.3 Flash: Communicating Between Actions............. 482
22.4 Filters and Verification....................... 484
22.5 Caching, Part One.......................... 492
22.6 The Problem with GET Requests . ................. 501
xi
23 Action View 505
23.1 Templates............................... 505
23.2 Using Helpers............................. 511
23.3 Helpers for Formatting, Linking, and Pagination........ 512
23.4 How Forms Work........................... 520
23.5 Forms That Wrap Model Objects.................. 521
23.6 Custom Form Builders....................... 534
23.7 Working with Nonmodel Fields................... 538
23.8 Uploading Files to Rails Applications............... 541
23.9 Layouts and Components...................... 545
23.10 Caching, Part Two.......................... 552
23.11 Adding New Templating Systems................. 557
24 The Web, v2.0 561
24.1 Prototype............................... 561
24.2 Script, aculo, us............................ 581
24.3 RJS Templates............................ 598
24.4 Conclusion.............................. 605
25 Action Mailer 607
25.1 Sending E-mail............................ 607
25.2 Receiving E-mail........................... 618
25.3 Testing E-mail............................ 620
26 Active Resources 623
26.1 Alternatives to Active Resource.................. 623
26.2 Show Me the Code!.......................... 626
26.3 Relationships and Collections................... 629
26.4 Pulling It All Together........................ 632
Part IV—Securing and Deploying Your Application 635
27 Securing Your Rails Application 637
27.1 SQL Injection............................. 637
27.2 Creating Records Directly from Form Parameters ....... 640
27.3 Don t Trust id Parameters..................... 641
27.4 Don t Expose Controller Methods.............. . . . 642
27.5 Cross-Site Scripting (CSS/XSS).................. 643
27.6 Avoid Session Fixation Attacks .................. 646
27.7 File Uploads.............................. 646
27.8 Don t Store Sensitive Information in the Clear......... 647
27.9 Use SSL to Transmit Sensitive Information........... 648
27.10 Don t Cache Authenticated Pages................. 650
27.11 Knowing That It Works....................... 650
xü ? CONTENTS
28 Deployment and Production 651
28.1 Starting Early............................. 651
28.2 How a Production Server Works.................. 652
28.3 Installing Passenger......................... 655
28.4 Worry-Free Deployment with Capistrano............. 657
28.5 Checking Up on a Deployed Application............. 661
28.6 Production Application Chores................... 662
28.7 Moving On to Launch and Beyond ................ 664
Part V—Appendixes 665
A Introduction to Ruby 667
A. 1 Ruby Is an Object-Oriented Language.............. 667
A.2 Ruby Names ............................. 668
A.3 Methods................................ 669
A.4 Classes................................. 671
A.5 Modules................................ 673
A.6 Arrays and Hashes.......................... 674
A.7 Control Structures.......................... 675
A.8 Regular Expressions......................... 676
A.9 Blocks and Iterators......................... 676
A. 10 Exceptions .............................. 677
A. 11 Marshaling Objects......................... 678
A. 12 Interactive Ruby........................... 678
A. 13 Ruby Idioms............................. 678
A. 14 RDoc Documentation........................ 680
B Configuration Parameters 681
B.I Top-Level Configuration....................... 681
B.2 Active Record Configuration.................... 683
B.3 Action Controller Configuration.................. 685
B.4 Action View Configuration..................... 687
B.5 Action Mailer Configuration.................... 687
B.6 Test Case Configuration....................... 689
C Source Code 691
C.I The Full Depot Application..................... 691
D Resources 729
D. 1 Online Resources .......................... 729
Index 731
|
any_adam_object | 1 |
author | Ruby, Sam Thomas, Dave Heinemeier Hansson, David |
author_GND | (DE-588)133585425 |
author_facet | Ruby, Sam Thomas, Dave Heinemeier Hansson, David |
author_role | aut aut aut |
author_sort | Ruby, Sam |
author_variant | s r sr d t dt h d h hd hdh |
building | Verbundindex |
bvnumber | BV035588347 |
classification_rvk | ST 253 |
ctrlnum | (OCoLC)551823357 (DE-599)BSZ305145452 |
discipline | Informatik |
edition | 3. ed. |
format | Book |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>01922nam a2200481 c 4500</leader><controlfield tag="001">BV035588347</controlfield><controlfield tag="003">DE-604</controlfield><controlfield tag="005">20090922 </controlfield><controlfield tag="007">t</controlfield><controlfield tag="008">090629s2009 a||| |||| 00||| eng d</controlfield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">1934356166</subfield><subfield code="9">1-934356-16-6</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9781934356166</subfield><subfield code="9">978-1-9343561-6-6</subfield></datafield><datafield tag="024" ind1="3" ind2=" "><subfield code="a">9781934356166</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)551823357</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(DE-599)BSZ305145452</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DE-604</subfield><subfield code="b">ger</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">eng</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-384</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 253</subfield><subfield code="0">(DE-625)143628:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Ruby, Sam</subfield><subfield code="e">Verfasser</subfield><subfield code="0">(DE-588)133585425</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Agile web development with Rails</subfield><subfield code="b">[covers Rails 2]</subfield><subfield code="c">Sam Ruby ; Dave Thomas ; David Heinemeier Hansson</subfield></datafield><datafield tag="250" ind1=" " ind2=" "><subfield code="a">3. ed.</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Raleigh, NC [u.a.]</subfield><subfield code="b">Pragmatic Bookshelf</subfield><subfield code="c">2009</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">XV, 767 S.</subfield><subfield code="b">Ill.</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="b">n</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="b">nc</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="490" ind1="0" ind2=" "><subfield code="a">The pragmatic programmers</subfield></datafield><datafield tag="490" ind1="0" ind2=" "><subfield code="a">The facets of Ruby series</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Softwareentwicklung</subfield><subfield code="0">(DE-588)4116522-6</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Internet</subfield><subfield code="0">(DE-588)4308416-3</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Ruby on Rails</subfield><subfield code="0">(DE-588)7516633-1</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="689" ind1="0" ind2="0"><subfield code="a">Ruby on Rails</subfield><subfield code="0">(DE-588)7516633-1</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="689" ind1="1" ind2="0"><subfield code="a">Internet</subfield><subfield code="0">(DE-588)4308416-3</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="1" ind2="1"><subfield code="a">Softwareentwicklung</subfield><subfield code="0">(DE-588)4116522-6</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="1" ind2=" "><subfield code="8">1\p</subfield><subfield code="5">DE-604</subfield></datafield><datafield tag="700" ind1="1" ind2=" "><subfield code="a">Thomas, Dave</subfield><subfield code="e">Verfasser</subfield><subfield code="4">aut</subfield></datafield><datafield tag="700" ind1="1" ind2=" "><subfield code="a">Heinemeier Hansson, David</subfield><subfield code="e">Verfasser</subfield><subfield code="4">aut</subfield></datafield><datafield tag="780" ind1="0" ind2="0"><subfield code="i">Früher u. d. T.</subfield><subfield code="a">Thomas, David</subfield><subfield code="t">Agile web development with Rails</subfield></datafield><datafield tag="856" ind1="4" ind2="2"><subfield code="m">HBZ Datenaustausch</subfield><subfield code="q">application/pdf</subfield><subfield code="u">http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=017643609&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA</subfield><subfield code="3">Inhaltsverzeichnis</subfield></datafield><datafield tag="999" ind1=" " ind2=" "><subfield code="a">oai:aleph.bib-bvb.de:BVB01-017643609</subfield></datafield><datafield tag="883" ind1="1" ind2=" "><subfield code="8">1\p</subfield><subfield code="a">cgwrk</subfield><subfield code="d">20201028</subfield><subfield code="q">DE-101</subfield><subfield code="u">https://d-nb.info/provenance/plan#cgwrk</subfield></datafield></record></collection> |
id | DE-604.BV035588347 |
illustrated | Illustrated |
indexdate | 2024-07-09T21:41:05Z |
institution | BVB |
isbn | 1934356166 9781934356166 |
language | English |
oai_aleph_id | oai:aleph.bib-bvb.de:BVB01-017643609 |
oclc_num | 551823357 |
open_access_boolean | |
owner | DE-384 |
owner_facet | DE-384 |
physical | XV, 767 S. Ill. |
publishDate | 2009 |
publishDateSearch | 2009 |
publishDateSort | 2009 |
publisher | Pragmatic Bookshelf |
record_format | marc |
series2 | The pragmatic programmers The facets of Ruby series |
spelling | Ruby, Sam Verfasser (DE-588)133585425 aut Agile web development with Rails [covers Rails 2] Sam Ruby ; Dave Thomas ; David Heinemeier Hansson 3. ed. Raleigh, NC [u.a.] Pragmatic Bookshelf 2009 XV, 767 S. Ill. txt rdacontent n rdamedia nc rdacarrier The pragmatic programmers The facets of Ruby series Softwareentwicklung (DE-588)4116522-6 gnd rswk-swf Internet (DE-588)4308416-3 gnd rswk-swf Ruby on Rails (DE-588)7516633-1 gnd rswk-swf Ruby on Rails (DE-588)7516633-1 s DE-604 Internet (DE-588)4308416-3 s Softwareentwicklung (DE-588)4116522-6 s 1\p DE-604 Thomas, Dave Verfasser aut Heinemeier Hansson, David Verfasser aut Früher u. d. T. Thomas, David Agile web development with Rails HBZ Datenaustausch application/pdf http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=017643609&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA Inhaltsverzeichnis 1\p cgwrk 20201028 DE-101 https://d-nb.info/provenance/plan#cgwrk |
spellingShingle | Ruby, Sam Thomas, Dave Heinemeier Hansson, David Agile web development with Rails [covers Rails 2] Softwareentwicklung (DE-588)4116522-6 gnd Internet (DE-588)4308416-3 gnd Ruby on Rails (DE-588)7516633-1 gnd |
subject_GND | (DE-588)4116522-6 (DE-588)4308416-3 (DE-588)7516633-1 |
title | Agile web development with Rails [covers Rails 2] |
title_auth | Agile web development with Rails [covers Rails 2] |
title_exact_search | Agile web development with Rails [covers Rails 2] |
title_full | Agile web development with Rails [covers Rails 2] Sam Ruby ; Dave Thomas ; David Heinemeier Hansson |
title_fullStr | Agile web development with Rails [covers Rails 2] Sam Ruby ; Dave Thomas ; David Heinemeier Hansson |
title_full_unstemmed | Agile web development with Rails [covers Rails 2] Sam Ruby ; Dave Thomas ; David Heinemeier Hansson |
title_old | Thomas, David Agile web development with Rails |
title_short | Agile web development with Rails |
title_sort | agile web development with rails covers rails 2 |
title_sub | [covers Rails 2] |
topic | Softwareentwicklung (DE-588)4116522-6 gnd Internet (DE-588)4308416-3 gnd Ruby on Rails (DE-588)7516633-1 gnd |
topic_facet | Softwareentwicklung Internet Ruby on Rails |
url | http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=017643609&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |
work_keys_str_mv | AT rubysam agilewebdevelopmentwithrailscoversrails2 AT thomasdave agilewebdevelopmentwithrailscoversrails2 AT heinemeierhanssondavid agilewebdevelopmentwithrailscoversrails2 |