Agile Web Development with Rails Does an Excellent Job of Making the Rails Environment Accessible in an Enjoyable and Memorable Way

Total Page:16

File Type:pdf, Size:1020Kb

Agile Web Development with Rails Does an Excellent Job of Making the Rails Environment Accessible in an Enjoyable and Memorable Way Important Information About Rails Versions This book is written for Rails 3. The Rails core team is continuing to work on Rails. From time to time, new releases may introduce incompatibilities for applications written for prior versions of Rails, including the code in this book. To run the examples provided in this book, it is important that you install the correct version of Rails, as described in Chapter 1, Installing Rails, on page 24 To determine the version of Rails that you are running, you can issue rails -v at a command prompt. Information on changes to Rails that affect this book can be found at http:// www.pragprog.com/wikis/wiki/ChangesToRails. Sam, Dave, and David When I started learning Ruby on Rails, I read the first edition of this book. Its holistic view of the Rails framework and community provides any new developer the kick start they need to a highly successful career. After reading through the latest edition cover to cover, I can happily say that it continues that trend and remains the first book I recommend to any new Rails devel- oper. Mikel Lindsaar Rails core commit team, creator of the Ruby Mail library, and director, RubyX Agile Web Development with Rails does an excellent job of making the Rails environment accessible in an enjoyable and memorable way. In addition, this book is the first I’ve seen that provides a sensible and coherent explanation of the MVC pattern, and it does so in a natural progression using examples that completely remove any mystery. Ken Coar Author, open software evangelist, and Apache developer Agile Web Development with Rails successfully straddles a fine line between being a fun-to-read introduction to Rails (and Ruby) and a straightforward guide to some advanced features of the platform, nicely supplanting the ever- changing online documentation. Glen Daniels Independent technologist and consultant I’ve never read a programming book as successful as Agile Web Development with Rails. Sam made learning Ruby on Rails easy, comprehensive, and fun. Keith Ballinger Chairman of WS-I’s first Basic Profile working group; author; and key contributor to the .NET and Visual Studio .NET frameworks Agile Web Development with Rails Fourth Edition Sam Ruby Dave Thomas David Heinemeier Hansson with Leon Breedt Mike Clark James Duncan Davidson Justin Gehtland Andreas Schwarz The Pragmatic Bookshelf Raleigh, North Carolina Dallas, Texas Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and The Pragmatic Program- mers, LLC was aware of a trademark claim, the designations have been printed in initial capital letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Programmer, Pragmatic Program- ming, Pragmatic Bookshelf and the linking g device are trademarks of The Pragmatic Programmers, LLC. Every precaution was taken in the preparation of this book. However, the publisher assumes no responsibility for errors or omissions, or for damages that may result from the use of information (including program listings) contained herein. Our Pragmatic courses, workshops, and other products can help you and your team create better software and have more fun. For more information, as well as the latest Pragmatic titles, please visit us at http://www.pragprog.com. Copyright © 2011 The Pragmatic Programmers LLC. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the publisher. Printed in the United States of America. ISBN-10: 1-934356-54-9 ISBN-13: 978-1-934356-54-8 Printed on acid-free paper. P1.0 printing, March 2011 Version: 2011-3-29 Contents Preface to the Fourth Edition 12 Acknowledgments 14 Introduction 16 Rails Simply Feels Right ......................... 16 Rails Is Agile ............................... 18 Who This Book Is For .......................... 19 How To Read This Book ......................... 19 Part I—Getting Started 23 1 Installing Rails 24 1.1 Installing on Windows ...................... 24 1.2 Installing on Mac OS X ..................... 26 1.3 Installing on Linux ........................ 27 1.4 Choosing a Rails Version .................... 28 1.5 Setting Up Your Development Environment . 29 1.6 Rails and Databases ....................... 33 1.7 What We Just Did ........................ 34 2 Instant Gratification 35 2.1 Creating a New Application ................... 35 2.2 Hello, Rails! ............................ 37 2.3 Linking Pages Together ..................... 44 2.4 What We Just Did ........................ 47 3 The Architecture of Rails Applications 48 3.1 Models, Views, and Controllers . 48 3.2 Rails Model Support ....................... 51 3.3 Action Pack: The View and Controller . 53 CONTENTS 8 4 Introduction to Ruby 55 4.1 Ruby Is an Object-Oriented Language . 55 4.2 Data Types ............................ 57 4.3 Logic ................................ 60 4.4 Organizing Structures ...................... 63 4.5 Marshaling Objects ....................... 66 4.6 Pulling It All Together ...................... 66 4.7 Ruby Idioms ........................... 67 Part II—Building an Application 70 5 The Depot Application 71 5.1 Incremental Development .................... 71 5.2 What Depot Does ......................... 72 5.3 Let’s Code ............................. 76 6 Task A: Creating the Application 77 6.1 Iteration A1: Creating the Products Maintenance Applica- tion ................................. 77 6.2 Iteration A2: Making Prettier Listings . 83 7 Task B: Validation and Unit Testing 90 7.1 Iteration B1: Validating! ..................... 90 7.2 Iteration B2: Unit Testing of Models . 95 8 Task C: Catalog Display 105 8.1 Iteration C1: Creating the Catalog Listing . 105 8.2 Iteration C2: Adding a Page Layout . 108 8.3 Iteration C3: Using a Helper to Format the Price . 112 8.4 Iteration C4: Functional Testing of Controllers . 113 9 Task D: Cart Creation 117 9.1 Iteration D1: Finding a Cart . 117 9.2 Iteration D2: Connecting Products to Carts . 118 9.3 Iteration D3: Adding a Button . 120 10 Task E: A Smarter Cart 126 10.1 Iteration E1: Creating a Smarter Cart . 126 10.2 Iteration E2: Handling Errors . 131 10.3 Iteration E3: Finishing the Cart . 134 Report erratum this copy is (P1.0 printing, March 2011) CONTENTS 9 11 Task F: Add a Dash of Ajax 139 11.1 Iteration F1: Moving the Cart . 140 11.2 Iteration F2: Creating an Ajax-Based Cart . 145 11.3 Iteration F3: Highlighting Changes . 148 11.4 Iteration F4: Hiding an Empty Cart . 150 11.5 Testing Ajax Changes . 154 12 Task G: Check Out! 158 12.1 Iteration G1: Capturing an Order . 158 12.2 Iteration G2: Atom Feeds . 172 12.3 Iteration G3: Pagination . 176 13 Task H: Sending Mail 181 13.1 Iteration H1: Sending Confirmation Emails . 181 13.2 Iteration H2: Integration Testing of Applications . 188 14 Task I: Logging In 194 14.1 Iteration I1: Adding Users . 194 14.2 Iteration I2: Authenticating Users . 203 14.3 Iteration I3: Limiting Access . 208 14.4 Iteration I4: Adding a Sidebar, More Administration . 211 15 Task J: Internationalization 216 15.1 Iteration J1: Selecting the Locale . 217 15.2 Iteration J2: Translating the Storefront . 219 15.3 Iteration J3: Translating Checkout . 226 15.4 Iteration J4: Add a Locale Switcher . 232 16 Task K: Deployment and Production 235 16.1 Iteration K1: Deploying with Phusion Passenger and MySQL 237 16.2 Iteration K2: Deploying Remotely with Capistrano . 242 16.3 Iteration K3: Checking Up on a Deployed Application . 248 17 Depot Retrospective 252 17.1 Rails Concepts . 252 17.2 Documenting What We Have Done . 256 Report erratum this copy is (P1.0 printing, March 2011) CONTENTS 10 Part III—Rails in Depth 257 18 Finding Your Way Around Rails 258 18.1 Where Things Go . 258 18.2 Naming Conventions . 267 19 Active Record 271 19.1 Defining Your Data . 271 19.2 Locating and Traversing Records . 276 19.3 Creating, Reading, Updating, and Deleting (CRUD) . 279 19.4 Participating in the Monitoring Process . 295 19.5 Transactions . 302 20 Action Dispatch and Action Controller 307 20.1 Dispatching Requests to Controllers . 307 20.2 Processing of Requests . 318 20.3 Objects and Operations That Span Requests . 329 21 Action View 339 21.1 Using Templates . 339 21.2 Generating Forms . 341 21.3 Processing Forms . 344 21.4 Uploading Files to Rails Applications . 345 21.5 Using Helpers . 349 21.6 Reducing Maintenance with Layouts and Partials . 355 22 Caching 364 22.1 Page Caching . 364 22.2 Expiring Pages . 367 22.3 Fragment Caching . 373 23 Migrations 379 23.1 Creating and Running Migrations . 379 23.2 Anatomy of a Migration . 382 23.3 Managing Tables . 386 23.4 Advanced Migrations . 390 23.5 When Migrations Go Bad . 394 23.6 Schema Manipulation Outside Migrations . 395 24 Nonbrowser Applications 396 24.1 A Stand-Alone Application Using Active Record . 396 24.2 A Library Function Using Active Support . 397 24.3 A Remote Application Using Active Resource . 402 Report erratum this copy is (P1.0 printing, March 2011) CONTENTS 11 25 Rails’ Dependencies 408 25.1 Generating XML with Builder . 408 25.2 Generating HTML with ERb . 410 25.3 Managing Dependencies with Bundler . 412 25.4 Interfacing with the Web Server with Rack . 414 25.5 Automating Tasks with Rake . 418 25.6 Survey of Rails’ Dependencies . 419 26 Rails Plugins 423 26.1 Credit Card Processing with Active Merchant . 423 26.2 Saving Bandwidth with Asset Packager . 425 26.3 Beautifying Our Markup with Haml . 427 26.4 Write Less and Do More with JQuery . 430 26.5 Finding More at RailsPlugins.org . 432 27 Where to Go from Here 435 A Bibliography 437 Index 438 Report erratum this copy is (P1.0 printing, March 2011) Preface to the Fourth Edition When Dave asked me to join as a coauthor of the third edition of this book, I was thrilled.
Recommended publications
  • Freelance Graphics
    REST - The Web Style Koranteng Ofosu-Amaah Lotus Software, IBM Working the Web REST - The Web Style Buzzwords (Marketing) Case Studies (Reflection) Leaky Abstractions (Architecture) Layer Stripping (Complexity) Glue Layer People (Composition) View Source Imperative (Comprehension) Life on the Web The Low End Theory (Strategy) Why Specs Matter (Scaling) Technical Arteriosclerosis (Hygiene) Jokes (Relief after yesterday's events) Spaghetti Westerns (B-Movies) Bedtime Stories and Folktales (It's Friday) Why this presentation? 10 years since the Web became Good Enough (TM) - Historical Insight 10 years of Moore's Law in the Datacenter In times of retrenchment, companies fall back on things that "just work" The Web Style works - Google/eBay/Amazon The Web Style scales - businesses run on it Technology Adoption and Systems Design Leverage is key for success We should aggresively leverage the web Who am I? 10 years at Lotus Currently working on Forms Freelance Graphics - eSuite - K-station - WebSphere Portal - ODC editors - Forms in Workplace Opinionated, "ecletic", "all over the place" Verbose: writes "novel-length diatribes" of late there's a blog - Koranteng's Toli toli : n. 1. A juicy piece of news. 2. The latest word or gossip. 3.The talk of the town, typically a salacious or risque tale of intrigue, corruption or foolishness. Remembers the day job (Hi there managers) Self image: mild-mannered Clark Kent type First Questions Do you exist if you're not "on the web"? Are any of our products and services not web-native or delivered via the web? Other than the Green Terminals of course Even those mainframe people are dying to "get on the web" What is the Web in WebSphere? Everyone got the web religion circa 1995 How did you get on the web? Why was the web so successful? What does it mean to be "on the web"? When was the last time you read about the web architecture? Word to the wise: Don't fight the web A quote Oliver Hass, a 28 year-old chemist and graduate student from Oldenberg, Germany, wrote me recently about what the President's trip looked like to him.
    [Show full text]
  • LAMP and the REST Architecture Step by Step Analysis of Best Practice
    LAMP and the REST Architecture Step by step analysis of best practice Santiago Gala High Sierra Technology S.L.U. Minimalistic design using a Resource Oriented Architecture What is a Software Platform (Ray Ozzie ) ...a relevant and ubiquitous common service abstraction Creates value by leveraging participants (e- cosystem) Hardware developers (for OS level platforms) Software developers Content developers Purchasers Administrators Users Platform Evolution Early stage: not “good enough” solution differentiation, innovation, value flows Later: modular architecture, commoditiza- tion, cloning no premium, just speed to market and cost driven The platform effect - ossification, followed by cloning - is how Chris- tensen-style modularity comes to exist in the software industry. What begins as a value-laden proprietary platform becomes a replaceable component over time, and the most successful of these components finally define the units of exchange that power commodity networks. ( David Stutz ) Platform Evolution (II) Example: PostScript Adobe Apple LaserWriter Aldus Pagemaker Desktop Publishing Linotype imagesetters NeWS (Display PostScript) OS X standards (XSL-FO -> PDF, Scribus, OOo) Software Architecture ...an abstraction of the runtime elements of a software system during some phase of its oper- ation. A system may be composed of many lev- els of abstraction and many phases of opera- tion, each with its own software architecture. Roy Fielding (REST) What is Architecture? Way to partition a system in components
    [Show full text]
  • Restful Web Apis
    Praise for RESTful Web APIs “This book is the best place to start learning the essential craft of API Design.” —Matt McLarty Cofounder, API Academy “The entire time I read this book, I was cursing. I was cursing because as I read each explanation, I was worried that they were so good that it would be hard to find a better one to use in my own writing. You will not find another work that explores the topic so thoroughly yet explains the topic so clearly. Please, take these tools, build something fantastic, and share it with the rest of the world, okay?” —Steve Klabnik Author, Designing Hypermedia APIs “Wonderfully thorough treatment of hypermedia formats, REST’s least well understood tenet." —Stefan Tilkov REST evangelist, author, and consultant “The best practical guide to hypermedia APIs. A must-have.” — Ruben Verborgh Semantic hypermedia researcher RESTful Web APIs Leonard Richardson and Mike Amundsen Foreword by Sam Ruby RESTful Web APIs by Leonard Richardson and Mike Amundsen with a Foreword by Sam Ruby Copyright © 2013 Leonard Richardson, amundsen.com, Inc., and Sam Ruby. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/ institutional sales department: 800-998-9938 or [email protected]. Editors: Simon St. Laurent and Meghan Blanchette Indexer: Judith McConville Production Editor: Christopher Hearse Cover Designer: Randy Comer Copyeditor: Jasmine Kwityn Interior Designer: David Futato Proofreader: Linley Dolby Illustrator: Rebecca Demarest September 2013: First Edition Revision History for the First Edition: 2013-09-10: First release See http://oreilly.com/catalog/errata.csp?isbn=9781449358068 for release details.
    [Show full text]
  • Atom Publishing Protocol
    Atom Publishing Protocol CSCI 7818 Elizabeth Fischer History of Atom Initially created because of dissatisfaction with RSS June 2003, Sam Ruby set up a wiki to discuss a well-formed log entry Fully open-source effort APP standard is still in draft format Atom Collections Central concept in protocol – a resource that contains a set of Member Entries Analogous to folders or directories in a file system. Each collection has a unique URI Adding an entry to a collection yields a new URI All operations done on URIs with GET, POST, PUT, DELETE Use of HTTP methods GET is used to retrieve a representation of a known resource. POST is used to create a new, dynamically-named, resource. PUT is used to update a known resource. DELETE is used to remove a known resource. Functions available Discovery Listing Create Read Update Delete Discovery To discover the location of the collections exposed by an APP service, the client must locate and request an Introspection Document. Client Server | | | 1.) GET Introspection | |------------------------------->| | | | 2.) Introspection Doc | |<-------------------------------| GET /servicedocument HTTP/1.1 Host: example.org Example Discovery Response <?xml version="1.0" encoding='utf-8'?> <service xmlns="http://purl.org/atom/app#"> <workspace title="Main Site" > <collection contents="entries" title="My Blog Entries" href="http://example.org/reilly/feed" /> <collection contents="generic" title="Documents“ href="http://example.org/reilly/pic" /> </workspace> <workspace title="Side Bar Blog"> <collection
    [Show full text]
  • Pragpub #048, June 2013
    The Pragmatic Bookshelf PragPThe Firstu Iterationb IN THIS ISSUE * Dave Thomas introduces the Elixir language * Sam Ruby keeps Rails on the rails * Stephen Rylander explores JavaScript MVC Frameworks * Paul Callaghan explains Unification * Johanna Rothman and Andy Lester discuss your career ...and John Shade goes Phishing Plus Choice Bits, news and events, our monthly puzzle, and more Issue #48 June 2013 PragPub • June 2013 Contents FEATURES Programming Elixir ................................................................................................. 9 by Dave Thomas Elixir is a modern, functional programming language designed for high availability and concurrency. It has Ruby-like syntax married to the power and reliability of the Erlang VM. If you wanted to get into functional programming but were put off by the academic feel, now’s the time to jump in. Keeping Rails on the Rails ................................................................................. 14 by Sam Ruby How the system that keeps the Rails book on track also aids in the development of Rails itself. Beyond the DOM .................................................................................................. 17 by Stephen Rylander JavaScript MVC frameworks are here to stay. Here Stephen introduces Knockout, one of the best. Unification ................................................................................................................ 27 by Paul Callaghan A technique developed for automatic theorem proving back in the 1960s proves to be a gateway
    [Show full text]
  • Restful Web Services
    RESTful Web Services RESTful Web Services Leonard Richardson and Sam Ruby Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo RESTful Web Services by Leonard Richardson and Sam Ruby Copyright © 2007 O’Reilly Media. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472 O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://safari.oreilly.com). For more information, contact our corporate/ institutional sales department: (800) 998-9938 or [email protected]. Editor: Mike Loukides Indexer: Joe Wizda Copy Editor: Peggy Wallace Cover Designer: Karen Montgomery Production Editor: Laurel R.T. Ruma Interior Designer: David Futato Proofreader: Laurel R.T. Ruma Illustrators: Robert Romano and Jessamyn Read Printing History: May 2007: First Edition Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. The vulpine phalanger and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations uses by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information con- tained herein. ISBN: 978-0-596-52926-0 [LSI] [2011-04-15] 1302884426 For Woot, Moby, and Beet.
    [Show full text]
  • Atom (Standard) 1 Atom (Standard)
    Atom (standard) 1 Atom (standard) Atom The feed icon used in several browsers Filename extension .atom, .xml Internet media type application/atom+xml Type of format web syndication Extended from XML The name Atom applies to a pair of related standards. The Atom Syndication Format is an XML language used for web feeds, while the Atom Publishing Protocol (AtomPub or APP) is a simple HTTP-based protocol for creating and updating web resources. Web feeds allow software programs to check for updates published on a website. To provide a web feed, a site owner may use specialized software (such as a content management system) that publishes a list (or "feed") of recent articles or content in a standardized, machine-readable format. The feed can then be downloaded by programs that use it, like websites that syndicate content from the feed, or by feed reader programs that allow Internet users to subscribe to feeds and view their content. A feed contains entries, which may be headlines, full-text articles, excerpts, summaries, and/or links to content on a website, along with various metadata. The Atom format was developed as an alternative to RSS. Ben Trott, an advocate of the new format that became Atom, believed that RSS had limitations and flaws—such as lack of on-going innovation and its necessity to remain backward compatible— and that there were advantages to a fresh design.[1] Proponents of the new format formed the IETF Atom Publishing Format and Protocol Workgroup. The Atom syndication format was published as an IETF proposed standard in RFC 4287 (December 2005), and the Atom Publishing Protocol was published as RFC 5023 [2] (October 2007).
    [Show full text]
  • Developing Feeds with RSS and Atom by Ben Hammersley
    Developing Feeds with RSS and Atom By Ben Hammersley ............................................... Publisher: O'Reilly Pub Date: April 2005 ISBN: 0-596-00881-3 Pages: 272 Table of Contents | Index | Errata Perhaps the most explosive technological trend over the past two years has been blogging. As a matter of fact, it's been reported that the number of blogs during that time has grown from 100,000 to 4.8 million-with no end to this growth in sight. What's the technology that makes blogging tick? The answer is RSS--a format that allows bloggers to offer XML-based feeds of their content. It's also the same technology that's incorporated into the websites of media outlets so they can offer material (headlines, links, articles, etc.) syndicated by other sites. As the main technology behind this rapidly growing field of content syndication, RSS is constantly evolving to keep pace with worldwide demand. That's where Developing Feeds with RSS and Atom steps in. It provides bloggers, web developers, and programmers with a thorough explanation of syndication in general and the most popular technologies used to develop feeds. This book not only highlights all the new features of RSS 2.0-the most recent RSS specification-but also offers complete coverage of its close second in the XML-feed arena, Atom. The book has been exhaustively revised to explain: metadata interpretation the different forms of content syndication the increasing use of web services how to use popular RSS news aggregators on the market After an introduction that examines Internet content syndication in general (its purpose, limitations, and traditions), this step-by-step guide tackles various RSS and Atom vocabularies, as well as techniques for applying syndication to problems beyond news feeds.
    [Show full text]
  • Syndicating Web Sites with RSS Feeds for Dummies‰
    01_588486 ffirs.qxd 3/4/05 11:24 AM Page iii Syndicating Web Sites with RSS Feeds FOR DUMmIES‰ by Ellen Finkelstein Foreword by Chris Pirillo 01_588486 ffirs.qxd 3/4/05 11:24 AM Page ii 01_588486 ffirs.qxd 3/4/05 11:24 AM Page i Syndicating Web Sites with RSS Feeds FOR DUMmIES‰ 01_588486 ffirs.qxd 3/4/05 11:24 AM Page ii 01_588486 ffirs.qxd 3/4/05 11:24 AM Page iii Syndicating Web Sites with RSS Feeds FOR DUMmIES‰ by Ellen Finkelstein Foreword by Chris Pirillo 01_588486 ffirs.qxd 3/4/05 11:24 AM Page iv Syndicating Web Sites with RSS Feeds For Dummies® Published by Wiley Publishing, Inc. 111 River Street Hoboken, NJ 07030-5774 Copyright © 2005 by Wiley Publishing, Inc., Indianapolis, Indiana Published by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permit- ted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, or online at http://www.wiley.com/go/permission.
    [Show full text]
  • Pubsub Corporate Overview
    RSSRSS andand AtomAtom AA quickquick overviewoverview May 2005 Bob Wyman RSS/Atom History 1995 – MCF (MetaContent Framework) – Ramanathan Guha 1997 – CDF (Channel Definition Format) IE4/ActiveDesktop 1998 – Netscape “Project 60” SPF (Site Preview Format) 1999 – RDF-SPF 0.9 renamed to RSS 0.9 1999 – RSS 0.91 dropped RDF syntax 2000 – RSS 1.0 (RDF, namespaces, modules) 2000 – RSS 0.92 published by Userland (based on 0.91) 2002 – RSS V2.0 released and declared frozen by Winer 2003-2004 – Pie, Echo, Necho, Atom … (Sam Ruby, et al) 2005 – Atom V1.0 will become IETF RFC Slide 2 RSS/Atom use today Slide 3 A Simple RSS V2.0 Feed <?xml version=“1.0” encoding=“utf-8”?> <rss version=“2.0”> <channel> <title>Minimal RSS V2.0 Feed</title> <link>http://example.org/index.html</link> <description>The Mininimal Feed</description> <item> <pubDate>Sat, 07 Sep 2004 00:00:01 GMT</pubDate> <description>An Item</description> </item> </channel> </rss> Slide 4 A Simple Atom Feed <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://purl.org/atom/ns#draft-ietf-atompub-format-08"> <title>Example Feed</title> <id>tag:example.com,2005;ExampleFeed</> <link href="http://example.org/"/> <updated>2003-12-13T18:30:02Z</updated> <author> <name>John Doe</name> </author> <entry> <title>Atom-Powered Robots Run Amok</title> <link href="http://example.org/2003/12/13/atom03"/> <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> <updated>2003-12-13T18:30:02Z</updated> <summary>Some text.</summary> </entry> </feed> Slide 5 Free-Standing Atom Entry <?xml version="1.0" encoding="utf-8"?>
    [Show full text]