1. 首页
  2. 编程语言
  3. C#
  4. Asp.NETMVC5高级编程第5版

Asp.NETMVC5高级编程第5版

上传者: 2019-05-17 01:48:33上传 PDF文件 18.1MB 热度 38次
Asp.NET MVC 5 高级编程第5版Pro ASP.NET MVc 5Copyright o 2013 by Adam FrccmanT his work is subject Lo copyrighT. All rights are reserved by the Publisher, whether the whole or part of the Inaterial is concerned, specifically the rights ofLranslalioll, reprinting, reuse of illustratiOns, reciTaTiOn, broadcasting, reproduction on microfilms or in anly other phy sical way, and transmission urin formation storage and retrieval, electronic adaptation, coMputer sofLware, or by similar or dissimilar nethodology now known or hereafter developedExempted from this legal reserv ation are brief excerpts in connection with reviews or scholarly analysis or material supplied specifically for the purposeofbeing entered and execut ed on a couputer syst em, for exclusive use by the purchaser of the work. Dup licaLion of Lhis publication or parts thereof ispermilled only under the provisions of the Copyright Law of the Publisher's location, in its current version, and perimission for use Inust always beobt ained from Springer. Permissions for use may be obtained through rightslink at the Copyright Clearance Center. Violations are liable to prosecutionunder the respective Copyright LawISBN-13(pbk):978-1-4302-6529-01SRN-13( electron ic):978-1-4302-6530-6Trademarked names, logos, and images may appear in this book. Rather than use a trademark sy mbol with every occurrence of a trademarked name, logo,or image we use the names, logos, and images only in an edit orial fashion and to the benefit of the trademark owner, with no intention of infrin gement ofthe trademarkThe use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as ancxprcssion of opinion as to whcther or not they arc subjcct to proprietary rightsWhile the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor thepublisher can accept any legal responsibility for any errors or oMissions that mlay be made. The publisher makes no warranty, express or implied, withrespect lo the Material conLained herein.President and Publisher: Paul manningLead Editor: Ewan BuckinghamTechnical reviewer: fabio Claudio ferracchiatiEditorial Board: Steve Anglin, Mark Beckner, Ewan Buckingham, Gary Cornell, Louise Corrigan, Jim DeWolf, Jonathan Gennick, Jonathan Hassell, RobertHut chinson, Michelle Lowman, James Markham, Matthew Moodie, Jeff Olson, Jeffrey Pepper, Douglas Pundick, Ben Renow-Clarke, Dominic Shakeshaft,Gwenan Spearing, Matt Wade, Steve WeissCoordinating editor: Kevin ShcaCopy Editor: Larissa ShmailoCompositor: SPi GlobalIndexer. sPi globalArtist SPi Globalver Designer: Anna IshchenkoDistributed to thc book trade worldwide by Springer Scicncc+ Busincss Mcdia Ncw York, 233 Spring Strcct, 6th Floor, Ncw York, NY 10013. Phonc 1-800SpriNger,fax(201)348-4505,e-mailorders-ny@springer-sbm.comorvisitwww.springeronline.comApressMedia,LlcisCalifornia LLC and the sole member (owner)is Springer Science Business Media Finance Inc(SSBM Finance Inc). SSBM Finance Inc is a DelawarecorporationForinformationontranslationspleasee-mailrightsaapress.comorvisitwww.apress.com.press and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available forosttitlesfOrmoreinformationreferenceoursPecialBulkSales-ebookLicensingwebpageatwww.apress.com/bulk-salesAny source code or other supplementary material referenced by the author in this text is available to readers atwww.apresS.com/9781430257882.Fordetailedinformationabouthowtolocateyourbookssourcecodegotowww.apress.ccm/sourcecode/Dedicated to my lovely wife, Jacqui griffithContents at a GlanceAbout the authorabout the technical reviewerChapter 1: Putting ASP.NET MVC in ContextChapter 2: Your First MVC ApplicationChapter 3: The MVC PatternChapter 4: Essential Language FeaturesChapter 5: Working with RazorChapter 6: Essential Tools for MVcChapter 7: Sports Store: A Real applicationChapter 8: Sports Store: NavigationChapter 9: Sports Store: Completing the CartChapter 10: Sports Store: MobileChapter 11: Sports Store: AdministrationChapter 12: Sports Store: Security finis hing TouchesChapter 13: DeploymentChapter 14: Overview of MvC ProjectsChapter 15: URL RoutingChapter 16: Advanced Routing FeaturesChapter 17: Controllers and ActionsChapter 18: FiltersChapter 19: Controller ExtensibilityChapter 20:ViewsChapter 21:Helper MethodsChapter 22: Te plated Helper methodsChapter 23: URL and Ajax Helper methodsChapter 24: Model BindingChapter 25: Model validationChapter 26: BundlesChapter 27: Web API and Single-page applicationsIndexContentsAbout the authorabout the technical reviewerChapter 1: Putting ASP.NET MVC in ContextUnderstanding the History of ASP. NETWhat Is Wrong with ASP. NET Web Forms?Web development todayWeb standards and restAgile and Test-Driven Developmentruby on railsKey Benefits of ASP. NET MVMVC ArchilectureExtensibilityTightcontroloverhtmlandhttpTestabilityPowerful Routing SystemBuilt on the best parts of the asp net p lat forrodern apiASP. NET MVC Is Open SourceWhat Do I Need to KnowWhat is the structure of This book?Part 1: Introducing ASP. NET MVC.5Part 2: ASP. net Mvc in det ailWhat's new in this edition?Where Can I Get the Example Code?What software do i need for this book?CreditsSummaryChapter 2: Your First MVC ApplicationPreparing visual studioCreating a New ASP. NET MVC ProjectAdding the First controlUnderst anding rout esRendering Wcb PagesCreating and rendering a viewAdding dynamic oCreating a Simple Data-Entry Application6Sctting the SceneDesigning a Data ModelLin g Action MethodsBuilding the FormHandling formsAdding validationStyling the ContentCompleting the examplemmaryChapter 3: The MVC PatternThe History ofMVCUnderstanding the mvc patternUnderst anding the dom ain modelThe asP. NET Implementation of MvcComparing MVC to Other PatternsBuilding Loosely Coupled ComponentsUsing dependency InjectionUsing a Dependency Injection ContainerGctting Started with Automated TcstingUnderst anding unit testingUnderst anding integration t estingummaryChapter 4: Essential Language FeaturesPreparing the example projectAdding the System Net. Http AssemblyUsing Automatically Implemented PropertiesUsing Obiect and Collection InitializersUsing Extension methodsApplving Extension Methods to an InterfaceCreating Filtering Extension Met hodsUsing Lambda ExpressionsUSing Automatic Type InferenceUsing anonymous TypesPerforming Language Integrated QueriesUnderst anding Deferred LINQ QueriesUSing Async MethodsApplving the async and await KeywordsummaryChapter 5: Working with RazorPreparing the example proiectDefining the modelDefining the controllerCreating the viewWorking with the model obiectWorking with LayoutsCreating the LayoutApplying a I ayoutUsing a view start FileDemonIn g shared LayoutUSing Razor expressionsInserting Data valuesSetting Attribute valuesUsing Conditional statementsEnumerating Arrays and CollectionsDealing with NamespacestammanyChapter 6: Essential Tools for MVCPreparing the Example ProiectCrcating the model classesAdding the controllerAdding theⅵiewUsing injectUnderst anding the problemAdding niniect to the Visual Studio proiectGetting Started with NiniectSetting up MvC Dependency IrCreating Chains of DependencySpecifying Property and Constructor Parameter ValuesUsin g Conditional bindiSetting the Obiect ScopeUnit Testing with Visual studiong the Unit T est ProieCreating the unit TRunning the Unit Tests(and Failing)Implementing the FeatureTesting and fixing the codeing MogUnderst anding the problemAdding Mog to the Visual Studio projectAdding a Mock Obiect to a Unit TestCreating a More Complex Mock obiectSummaryChapter 7: Sports Store: A Real Applicationetting stCreating the Visual Studio So lution and proiectsAdding references Bet ween ProjectsSetting Up the DI ContainerApp licatStarting the Domain Modelreating an Abstract repositoryMock reDisplaying a List of ProductsAdding a ControllerAdding the Layout, View Start File and viewetting the default rout eRunning the Applicat ionPreparing a databaseCreating the dat abaseDefining thc Databasc SchemaAdding data lo the databaseCreating the Entity Framework ContextCreating the Product RepositoryAdding pagDisplayPage linksImproving the UrlsStyling the contentInstalling the Bootstrap PackageApply ing Bootstrap Sl yles to the layouta partial vummaryChapter 8: Sports Store:NavigationAdding Navigation ControlsRefining the url SchemeBuilding a Cat cory Navigation McnuBuilding the Shopping CartDefining the Cart EntityAdding the add to cart But tonsImplementing the Cart Cont rollerthe Contents of the caSummaryChapter 9: Sports Store: Completing the CartUsing model bindingCreating a Cust om Model BinderCompleting the CartRemoving Items from the CartAdding the Cart SummarySubmitting ordersExtending the Domain modelAdding the checkout processImplementing the order processorRegistering the implementationCompleting the Cart ControllerDisp laving validation ErrorsDisp laving a summary pageSummaryChapter 10: SportsStore:MobilePutting Mobile Web Development in ContextDoing Nothing(or as Little as possible)Using Responsive designCreating a Responsive HeaderCreating a Responsive product ListCreating Mobile Specific ContentCreating a Mobile layoutCreating the mobile viewsSummaryChapter 11: Sports Store: AdministrationAdding catalog managementCreating a CRUD Cont rollerCreating a New layoutEditing productting New ProductsDeleting productSummaryChapter 12: Sports Store: Security&Finishing TouchesSecuring the administration ControllerCreating a Basic Security Policyapplying aut horization with filtersCreating the aut hent ication ProviderCreating the Account Controller10
用户评论