Throughout this book, we've been careful not to flood you with information which — while interesting — would get in the way of learning the important concepts. We've had to avoid talking about interesting interactions between components we hadn't discussed yet, and we've avoided burrowing deep into implementation details that thrill us but may baffle learners.
In this chapter, though, we've been able to talk to you like the informed developer that you are, sharing some of our favorite tidbits about the inner workings of ASP.NET MVC, as well as advanced techniques to get the most from the framework. We hope you've enjoyed it as much as we have!
Professional ASP.NET MVC 3
Published by
John Wiley & Sons, Inc.
10475 Crosspoint Boulevard
Indianapolis, IN 46256
Copyright © 2011 by John Wiley & Sons, Inc. Indianapolis, Indiana
Published simultaneously in Canada
ISBN: 978-1-118-07658-3
ISBN: 978-1-118-15535-6 (ebk)
ISBN: 978-1-118-15537-0 (ebk)
ISBN: 978-1-118-15536-3 (ebk)
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 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 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 warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness 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.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books.
Library of Congress Control Number: 2011930287
Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in this book.
To my wife Rachel, my daughters Rosemary, Esther, and Ellie, and to you for reading this book. Enjoy!
—Jon Galloway
My wife, Akumi, deserves to have her name on the cover as much as I do for all her support made this possible. And thanks to Cody for his infectious happiness.
—Phil Haack
To Potten on Potomac.
—K. Scott Allen
Credits
Acquisitions Editor
Paul Reese
Project Editor
Maureen Spears
Technical Editors
Eilon Lipton
Production Editor
Daniel Scribner
Copy Editor
Kimberly A. Cofer
Editorial Manager
Mary Beth Wakefield
Freelancer Editorial Manager
Rosemarie Graham
Associate Director of Marketing
David Mayhew
Business Manager
Any Knies
Production Manager
Tim Tate
Vice President and Executive Group Publisher
Richard Swadley
Vice President and Executive Publisher
Neil Edde
Associate Publisher
Jim Minatel
Project Coordinator, Cover
Katherine Crocker
Proofreader
Sheilah Ledwidge, Word One
Indexer
Robert Swanson
Cover Designer
LeAndra Young
Cover Image
© Getty / David Madison
About the Authors
JON GALLOWAY works at Microsoft as a Community Program Manager focused on ASP.NET MVC. He wrote the MVC Music Store tutorial, helped organize mvcConf (a free online conference for the ASP.NET MVC community), and travelled the world in 2010 teaching MVC classes for the Web Camps tour. Jon previously worked at Vertigo Software, where he worked on several Microsoft conference websites, high profile Silverlight video players, and MIX keynote demos. Prior to that, he's worked in a wide range of web development shops, from scrappy startups to Fortune 500 financial companies. He's part of the Herding Code podcast (http://herdingcode.com), blogs at http://weblogs.asp.net/jgalloway, and twitters as @jongalloway. He lives in San Diego with his wife, three daughters, and a bunch of avocado trees.
PHIL HAACK is a Senior Program Manager with the ASP.NET team working on the ASP.NET MVC project. Prior to joining Microsoft, Phil worked as a product manager for a code search engine, a dev manager for an online gaming company, and as a senior architect for a popular Spanish language television network, among other crazy pursuits. As a code junkie, Phil Haack loves to craft software. Not only does he enjoy writing software, he enjoys writing about software and software management on his blog, http://haacked.com/. In his spare time, Phil contributes to various open source projects and is the founder of the Subtext blog engine project, which is undergoing a re-write, using ASP.NET MVC, of course.
Brad Wilson works for Microsoft as a Senior Software Developer on the Web Platform and Tools team on the ASP.NET MVC project. He joined Microsoft on the Patterns and Practices team in 2005, and also worked on the team that builds the CodePlex open source hosting site. Prior to Microsoft, he has been a developer, consultant, architect, team lead, and CTO at various software companies for nearly 20 years. He's also the co-author of the xUnit.net open source developer testing framework, along with James Newkirk (of NUnit fame). He has been an active blogger since 2001 and writes primarily on ASP.NET topics at http://bradwilson.typepad.com/ as well as tweeting as @bradwilson. Brad lives in beautiful Redmond, WA, where he hones his love for all types of games—especially Poker.
K. SCOTT ALLEN is the founder of OdeToCode LLC. Scott provides custom development, consulting, and mentoring services for clients around the world.
About the Technical Editors
EILON LIPTON joined the ASP.NET team as a developer at Microsoft in 2002. On this team, he has worked on areas ranging from data source controls to localization to the UpdatePanel control. He now works on the ASP.NET MVC Framework as a principal development lead. Eilon is also a frequent speaker on a variety of ASP.NET-related topics at conferences worldwide. He graduated from Boston University with a dual degree in Math and Computer Science. In his spare time Eilon spends time in his garage workshop building what he considers to be well-designed furniture. If you know anyone who needs a coffee table that's three feet tall and has a slight slope to it, send him an e-mail.
Acknowledgments
THANKS TO FAMILY AND FRIENDS who graciously acted as if “Jon without sleep” is someone you'd want to spend time with. Thanks to the whole ASP.NET team for making work fun since 2002, and especially to Brad Wilson and Phil Haack for answering tons of random questions. Thanks to Warren G. Harding for normalcy. Thanks to Philippians 4:4-9 for continually reminding me which way is up.
—Jon Galloway
THANKS GO TO MY LOVELY WIFE, Akumi, for her support which went above and beyond all expectations and made this possible. I'd like to also give a shout out to my son, Cody, for his sage advice, delivered only as a two year old can deliver it. I'm sure he'll be embarrassed ten years from now that I used such an anachronism (“shout out”) in my acknowledgment to him. Thanks go to my daughter, Mia, as her smile lights up the room like unicorns.
—Phil Haack