Head First Rails: A Learners Companion To Ruby On Rails

Preparing link to download Please wait... Download

E-Book Overview

Ready to transport your web applications into the Web 2.0 era? Head First Rails takes your programming -- and productivity -- to the max. You'll learn everything from the fundamentals of Rails scaffolding to building customized interactive web apps using Rails' rich set of tools and the MVC framework. By the time you're finished, you'll have learned more than just another web framework. You'll master database interactions, integration with Ajax and XML, rich content, and even dynamic graphing of your data -- all in a fraction of the time it takes to build the same apps with Java, PHP, ASP.NET, or Perl. You'll even get comfortable and familiar with Ruby, the language that underpins Rails. But you'll do it in the context of web programming, and not through boring exercises such as "Hello, World!" Your time is way too valuable to waste struggling with new concepts. Using the latest research in cognitive science and learning theory to craft a multi-sensory learning experience, Head First Rails uses a visually rich format designed to take advantage of the way your brain really works.


E-Book Content

Head First Rails by David Griffiths Copyright © 2009 O’Reilly Media, Inc. 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 Media books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (safari.oreilly.com). For more information, contact our corporate/institutional sales department: (800) 998-9938 or [email protected] Series Creators: Kathy Sierra, Bert Bates Series Editor: Brett D. McLaughlin Editors: Brett D. McLaughlin, Louise Barr Design Editor: Louise Barr Cover Designers: Louise Barr, Steve Fehler Production Editor: Brittany Smith Proofreader: Matt Proud Indexer: Julie Hawks Page Viewers: Dawn Griffiths, Friski the Wi-fi Bunny Printing History: December 2008: First Edition. Friski the Wi-fi bunny Dawn Griffiths The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. The Head First series designations, Head First Rails, and related trade dress are trademarks of O’Reilly Media, Inc. 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 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 the authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein. No stick figures were harmed in the making of this book. TM This book uses RepKover™,  a durable and flexible lay-flat binding. ISBN: 978-0-596-51577-5 [M] 8 XML and multiple representations It all looks different now... Heavens - you’ve really changed, Dorothy. You can’t please everyone all of the time. Or can you? So far we’ve looked at how you can use Rails to quickly and easily develop web apps that perfectly fit one set of requirements. But what do you do when other requirements come along? What should you do if some people want basic web pages, others want a Google mashup, and yet more want your app available as an RSS feed? In this chapter you’ll create multiple representations of the same basic data, giving you the maximum flexibility with minimum effort.