Tải bản đầy đủ (.pdf) (7 trang)

1449320317 asp 0783

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (4.73 MB, 7 trang )



Programming ASP.NET MVC 4

Jess Chadwick, Todd Snyder, and Hrusikesh Panda

Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo


Programming ASP.NET MVC 4
by Jess Chadwick, Todd Snyder, and Hrusikesh Panda
Copyright © 2012 Jess Chadwick, Todd Synder, Hrusikesh Panda. 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 (). For more information, contact our
corporate/institutional sales department: 800-998-9938 or

Editor: Rachel Roumeliotis
Production Editor: Rachel Steely
Copyeditor: Rachel Head
Proofreader: Leslie Graham, nSight
October 2012:

Indexer: Lucie Haskins
Cover Designer: Karen Montgomery
Interior Designer: David Futato
Illustrators: Robert Romano and Rebecca Demarest

First Edition.


Revision History for the First Edition:
2012-09-14
First release
See for release details.

Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of
O’Reilly Media, Inc. Programming ASP.NET MVC 4, the image of a scabbardfish, 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 authors assume
no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.

ISBN: 978-1-449-32031-7
[LSI]
1347629749


Table of Contents

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii

Part I. Up and Running
1. Fundamentals of ASP.NET MVC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Microsoft’s Web Development Platforms
Active Server Pages (ASP)
ASP.NET Web Forms
ASP.NET MVC
The Model-View-Controller Architecture

The Model
The View
The Controller
What’s New in ASP.NET MVC 4?
Introduction to EBuy
Installing ASP.NET MVC
Creating an ASP.NET MVC Application
Project Templates
Convention over Configuration
Running the Application
Routing
Configuring Routes
Controllers
Controller Actions
Action Results
Action Parameters
Action Filters
Views
Locating Views
Hello, Razor!
Differentiating Code and Markup

3
3
4
4
4
5
6
6

6
8
9
9
10
13
15
15
16
18
19
19
21
23
24
24
26
27
iii


About the Authors
Jess Chadwick is an independent software consultant specializing in web technologies. He has more than a decade of development experience, ranging from embedded
devices in start-ups to enterprise-scale web farms at Fortune 500s. He is an ASPInsider,
Microsoft MVP in ASP.NET, and is an avid community member, frequently delivering
technical presentations as well as leading the NJDOTNET Central New Jersey .NET
user group. Jess lives in the Philadelphia, PA, area with his wonderful wife, baby
daughter, and black lab.
Also contributing to this book are:
Todd Snyder: Principle Consultant, Infragistics

Hrusikesh Panda: Architect and RIA Specialist

Colophon
The animal on the cover of Programming ASP.NET MVC 4 is the silver scabbardfish
(Lepidopus caudatus). Fish of this family are long, slender, and generally steely blue or
silver in color, giving rise to their name. They have reduced or absent pelvic and caudal
fins, giving them an eel-like appearance, and large fang-like teeth. They grow to over 2
meters in length and reach 9 kg in weight. Their scaleless bodies are compressed and
ribbon-like, and leave a silvery tint on anything with which they come into contact.
They have long sharp teeth along both jaws, and the lower jaw is very prominent. The
female lives longer than the male and is also bigger.
The silver scabbardfish forms schools and is a mesopelagic predator that primarily feeds
on crustaceans (especially krill and decapods), small mollusks, and ray-finned fish such
as lanternfish, boarfish, and herring. Its major predators are sharks, hake, and squid.
This species is found as far down as 1,000 meters in both cold and warm waters around
the Atlantic, Mediterranean, and Pacific. They are so widespread in the Straits of Messina that they have given rise to a profession: the spadularu, or silver scabbardfish fisherman. Their tastiness has earned them the name of “young lady of the seas” in the
Messina dialect. They are readily consumed (despite their ugly appearance) because of
their soft, delicately flavored white meat and lack of scales.
The cover image is from Johnson’s Natural History. The cover font is Adobe ITC Garamond. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed;
and the code font is LucasFont’s TheSansMonoCondensed.




Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay
×