ruby on rails for microsoft developers

484 499 0
ruby on rails for microsoft developers

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

www.it-ebooks.info Ruby on Rails ® for Microsoft ® Developers subtitle Updates, source code, and Wrox technical support at www.wrox.com The Art of Rails ® Edward Benson Wrox Programmer to Programmer TM Updates, source code, and Wrox technical support at www.wrox.com Professional Ruby on Rails Noel Rappin Wrox Programmer to Programmer TM Enhance Your Knowledge Advance Your Career Professional ASP.NET 3.5 AJAX 978-0-470-39217-1 This book is for ASP.NET developers who are interested in using AJAX to enhance existing web sites or develop new, more interactive web applications. Ruby on Rails for Microsoft Developers 978-0-470-37495-5 This book is for programmers who have experience developing the Microsoft Windows platform and are interested in getting the most out of Ruby on Rails. Professional Ajax, 2nd Edition 978-0-470-10949-6 This book is for web developers who want to enhance the usability of their sites and applications. Familiarity with JavaScript, HTML, and CSS is necessary, as is experience with a server-side language such as PHP or a .NET language. Professional Ruby on Rails 978-0-470-22388-8 This book is for Ruby on Rails programmers, software and web devel- opers, designers, and architects who are looking to expand their knowledge of the Rails framework. The Art of Rails 978-0-470-18948-1 This book is for developers familiar with Ruby on Rails who are looking to advance their skills by learning the design and coding techniques that enable a mastery of web application development with Rails. Beginning Ruby on Rails 978-0-470-06915-8 This book is for anyone who wants to develop online applications using Ruby and Rails. A basic understanding of programming is helpful; some knowledge of HTML is necessary. Beginning ASP.NET 2.0 AJAX 978-0-470-11283-0 This book is for developers and programmers who are starting to use ASP.NET 2.0 AJAX framework technologies to build web sites and applications. Get more out of WROX.com Programmer to Programmer ™ Interact Take an active role online by participating in our P2P forums Wrox Online Library Hundreds of our books are available online through Books24x7.com Wrox Blox Download short informational pieces and code to keep you up to date and out of trouble! Chapters on Demand Purchase individual book chapters in pdf format Join the Community Sign up for our free monthly newsletter at newsletter.wrox.com Browse Ready for more Wrox? We have books and e-books available on .NET, SQL Server, Java, XML, Visual Basic, C#/ C++, and much more! Contact Us. We always like to get feedback from our readers. Have a book idea? Need community support? Let us know by e-mailing wrox-partnerwithus@wrox.com spine=.96" www.it-ebooks.info Ruby on Rails ® for Microsoft Developers Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii Chapter 1: Getting Started with Rails . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Chapter 2: Understanding Rails . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Chapter 3: Ruby’s Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Chapter 4: Programming Ruby . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Chapter 5: A Working Sample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 Chapter 6: Incremental Development, Logging, and Debugging . . . . . . . . . . 197 Chapter 7: Object-Relational Mapping with ActiveRecord . . . . . . . . . . . . . . 233 Chapter 8: Handling Requests with ActionController . . . . . . . . . . . . . . . . . . 303 Chapter 9: Rendering the User Interface with ActionView . . . . . . . . . . . . . . 353 Chapter 10: ActiveResource and Web Services . . . . . . . . . . . . . . . . . . . . . . 383 Chapter 11: Going Into Production . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 Appendix A: Additional Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423 74955book.indd Listi74955book.indd Listi 3/4/09 8:42:18 AM3/4/09 8:42:18 AM www.it-ebooks.info 74955book.indd Listii74955book.indd Listii 3/4/09 8:42:19 AM3/4/09 8:42:19 AM www.it-ebooks.info Ruby on Rails ® for Microsoft Developers 74955book.indd Listiii74955book.indd Listiii 3/4/09 8:42:19 AM3/4/09 8:42:19 AM www.it-ebooks.info 74955book.indd Listiv74955book.indd Listiv 3/4/09 8:42:19 AM3/4/09 8:42:19 AM www.it-ebooks.info Ruby on Rails ® for Microsoft Developers Antonio Cangiano 74955book.indd Listv74955book.indd Listv 3/4/09 8:42:19 AM3/4/09 8:42:19 AM www.it-ebooks.info Ruby on Rails ® for Microsoft Developers Published by Wiley Publishing, Inc. 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright © 2009 by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 978-0-470-37495-5 Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 Library of Congress Cataloging-in-Publication Data is available from the publisher. 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 permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permis- sion 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 Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley .com/go/permissions . Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or war- ranties with respect to the accuracy or completeness of the contents of this work and specifi cally disclaim all warranties, including without limitation warranties of fi tness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read. For general information on our other products and services please contact our Customer Care Department within the United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002. Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Wrox Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affi liates, in the United States and other countries, and may not be used without written permission. Ruby on Rails is a reg- istered trademark of David Heinemeier Hansson. All other trademarks are the property of their respective owners. Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book. Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books. 74955book.indd Listvi74955book.indd Listvi 3/4/09 8:42:19 AM3/4/09 8:42:19 AM www.it-ebooks.info For Jessica, my guiding star. To my parents, Carmela and Ciro. 74955book.indd Listvii74955book.indd Listvii 3/4/09 8:42:19 AM3/4/09 8:42:19 AM www.it-ebooks.info 74955book.indd Listviii74955book.indd Listviii 3/4/09 8:42:19 AM3/4/09 8:42:19 AM www.it-ebooks.info [...]... Development What Is Rails? Open Source Cross-Platform Full-Stack The MVC Pattern Agile Development Database Driven Ruby: Rails Secret Sauce Greater Than the Sum of Its Parts A Brief History of Rails Understanding Rails Origins Powering the Web 2.0 The Rise of Ruby Installing Rails Can You Use Rails on Windows? Installing on Windows Configuring Instant Rails Installation on Other Platforms RubyStack Editors... Into Production Security Considerations 361 366 367 368 376 377 381 382 383 383 384 385 389 390 391 391 393 393 Cross-Site Scripting (XSS) SQL Injection Protecting Your Records Other Costly Mistakes Ruby on Rails Security Guide 394 397 398 399 400 Performance and Optimization 400 Measuring Performance Commercial Monitoring Caching Application-Level Performance Considerations Deploying Rails A Brief... clarify something that is often a source of confusion for newcomers: Ruby is a modern, objectoriented programming language, which predates Rails by about a decade Ruby on Rails is simply the “full name” of a great Web framework written in Ruby, for Ruby developers This name is also used for the URL of the official project website, available at http://rubyonrails.org 74955book.indd List1 3/4/09 8:44:45... Introduction In July 2004 David Heinemeier Hansson released Ruby on Rails, a Web framework for the Ruby programming language It quickly gained momentum and became notorious for being a highly productive Model-View-Controller (MVC) Web framework that was particularly well suited to Agile development Favoring sensible conventions over verbose configuration files, Rails (as it is often called for short)... Generating Models Generating Migrations ORM Conventions CRUD Operations Create Read Update Delete 223 224 226 226 227 230 231 233 234 235 237 237 239 244 250 250 252 265 269 ActiveRecord Associations 270 One-to-one Relationships One-to-many Relationships Many-to-many Relationships Auto-generated Methods Association Extensions 270 271 271 273 280 ActiveRecord Validations Validation Helpers Advanced ActiveRecord... You can read messages at any time on the Web If you would like to have new messages from a particular forum e-mailed to you, click the Subscribe to this Forum icon by the forum name in the forum listing For more information about how to use the Wrox P2P, be sure to read the P2P FAQs for answers to questions about how the forum software works as well as many common questions specific to P2P and Wrox books... Working with Controllers 319 Generating Controllers Action Processing 320 321 Rendering render send_data and send_file redirect_to Accessing the Request and Response Environment 322 322 324 325 326 The request Object 327 Maintaining the State 329 Flash Sessions Session Storage Options Enabling and Disabling Sessions Session Expiration Filters Using Filters for HTTP Basic Authentication Ideas for Improving... evidence is presented that will help to convince you otherwise The aim of this chapter is to provide you with an introduction to the Rails framework, and help you set up your favorite operating system so that it’s ready to work with Rails What’s in a Name? The name Ruby on Rails is often shortened to Rails Another common abbreviation is the acronym RoR (pronounced like a lion’s “roar”) I feel it is important... as Mixins Metaprogramming Method Name Resolution Alternative Ruby Implementations Summary Chapter 5: A Working Sample Creating a New Rails Application The rails Command config\database.yml Creating Databases Scaffolding and Migrations Migrations Putting It All Together: Creating a Rails Application A RESTful Application What’s REST? Mapping Routes to Actions Named route Helpers Analyzing the Model 85... Is a Silver Bullet Rails Is Hard to Deploy Rails Doesn’t Scale Understanding MVC 33 33 34 34 35 35 36 Overview of the Architectural Pattern Defining Models Designing Views Managing Controllers 36 38 41 42 Rails Standard Packages Understanding Rails Main Principles 44 44 Convention over Configuration Don’t Repeat Yourself (DRY) Rails vs ASP.NET vs ASP.NET MVC A 10,000-Foot Comparison ASP.NET MVC and . AM www.it-ebooks.info Ruby on Rails ® for Microsoft Developers Antonio Cangiano 74955book.indd Listv74955book.indd Listv 3/4/09 8:42:19 AM3/4/09 8:42:19 AM www.it-ebooks.info Ruby on Rails ® for Microsoft Developers. mastery of web application development with Rails. Beginning Ruby on Rails 978-0-470-06915-8 This book is for anyone who wants to develop online applications using Ruby and Rails. A basic understanding. interactive web applications. Ruby on Rails for Microsoft Developers 978-0-470-37495-5 This book is for programmers who have experience developing the Microsoft Windows platform and are interested

Ngày đăng: 28/04/2014, 16:58

Từ khóa liên quan

Mục lục

  • Ruby on Rails® for Microsoft Developers

    • Cover Page

    • About the Author

    • Credits

    • Acknowledgments

    • Contents

    • Introduction

      • Who This Book Is For

      • How This Book Is Structured

      • What You Need to Use This Book

      • Conventions

      • Source Code

      • Errata

      • p2p.wrox.com

      • Chapter 1: Getting Started with Rails

        • The Rise and Challenges of Web Development

        • What Is Rails?

        • A Brief History of Rails

        • Installing Rails

        • Editors and IDEs

        • Whetting Your Appetite

        • Summary

        • Chapter 2: Understanding Rails

          • Misconceptions about Rails

Tài liệu cùng người dùng

Tài liệu liên quan