ASP.NET MVC 5 with Bootstrap and Knockout Munro ASP.NET MVC 5 with Bootstrap and Building Dynamic, Responsive Web Applications

  • Published on
    06-Mar-2018

  • View
    227

  • Download
    10

Embed Size (px)

Transcript

<ul><li><p>Jamie Munro</p><p>ASP.NET MVC 5 with Bootstrap and Knockout.jsBUILDING DYNAMIC RESPONSIVE WEB APPLICATIONS</p><p>WEB DEVELOPMENT/DESIGN</p><p>ASP.NET MVC 5 with Bootstrap and Knockout.js</p><p>ISBN: 978-1-491-91439-7</p><p>US $24.99 CAN $28.99</p><p> This book is an excellent resource for anyone getting started in or switching over to Web development!</p><p>Matthew SpenceServer Developer, Fuel Youth Engagement</p><p>Twitter: @oreillymediafacebook.com/oreilly</p><p>Bring dynamic server-side web content and responsive web design together to build websites that work and display well at any resolution, desktop or mobile. With this practical book, youll learn how by combining the A SP.NET MVC ser ver-side language, the Bootstrap front-end framework, and Knockout.jsthe JavaScript implementation of the Model-View-ViewModel pattern.</p><p>Author Jamie Munro introduces these and other related technologies by having you work with sophisticated web forms. At the end of the book, experienced and aspiring web developers alike will learn how to build a complete shopping cart that demonstrates how these technologies interact with each other in a sleek, dynamic, and responsive web application.</p><p> Build well-organized, easy-to-maintain web applications by letting ASP.NET MVC 5, Bootstrap, and Knockout.js do the heavy lifting</p><p> Use ASP.NET MVC 5 to build server-side web applications, interact with a database, and dynamically render HTML </p><p> Create responsive views with Bootstrap that render on a variety of modern devices; you may never code with CSS again</p><p> Add Knockout.js to enhance responsive web design with snappy client-side interactions driven by your server-side web application</p><p>Jamie Munro has been developing websites and web applications for over 15 years. Over the past six years, hes actively mentored younger developers to enhance their web development skills. Jamies website (http:// www.endyourif.com) is geared towards helping web developers further expand their experience through online examples.</p><p>ASP.N</p><p>ET M</p><p>VC 5 w</p><p>ith Bootstrap and Knockout.js</p><p>Munro</p></li><li><p>Jamie Munro</p><p>ASP.NET MVC 5 with Bootstrap and Knockout.jsBUILDING DYNAMIC RESPONSIVE WEB APPLICATIONS</p><p>WEB DEVELOPMENT/DESIGN</p><p>ASP.NET MVC 5 with Bootstrap and Knockout.js</p><p>ISBN: 978-1-491-91439-7</p><p>US $24.99 CAN $28.99</p><p> This book is an excellent resource for anyone getting started in or switching over to Web development!</p><p>Matthew SpenceServer Developer, Fuel Youth Engagement</p><p>Twitter: @oreillymediafacebook.com/oreilly</p><p>Bring dynamic server-side web content and responsive web design together to build websites that work and display well at any resolution, desktop or mobile. With this practical book, youll learn how by combining the A SP.NET MVC ser ver-side language, the Bootstrap front-end framework, and Knockout.jsthe JavaScript implementation of the Model-View-ViewModel pattern.</p><p>Author Jamie Munro introduces these and other related technologies by having you work with sophisticated web forms. At the end of the book, experienced and aspiring web developers alike will learn how to build a complete shopping cart that demonstrates how these technologies interact with each other in a sleek, dynamic, and responsive web application.</p><p> Build well-organized, easy-to-maintain web applications by letting ASP.NET MVC 5, Bootstrap, and Knockout.js do the heavy lifting</p><p> Use ASP.NET MVC 5 to build server-side web applications, interact with a database, and dynamically render HTML </p><p> Create responsive views with Bootstrap that render on a variety of modern devices; you may never code with CSS again</p><p> Add Knockout.js to enhance responsive web design with snappy client-side interactions driven by your server-side web application</p><p>Jamie Munro has been developing websites and web applications for over 15 years. Over the past six years, hes actively mentored younger developers to enhance their web development skills. Jamies website (http:// www.endyourif.com) is geared towards helping web developers further expand their experience through online examples.</p><p>ASP.N</p><p>ET M</p><p>VC 5 w</p><p>ith Bootstrap and Knockout.js</p><p>Munro</p></li><li><p>Jamie Munro</p><p>ASP.NET MVC 5 with Bootstrap andKnockout.js</p><p>Building Dynamic, Responsive Web Applications</p></li><li><p>978-1-491-91439-7</p><p>[LSI]</p><p>ASP.NET MVC 5 with Bootstrap and Knockout.jsby Jamie Munro</p><p>Copyright 2015 Jamie Munro. All rights reserved.</p><p>Printed in the United States of America.</p><p>Published by OReilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.</p><p>OReilly books may be purchased for educational, business, or sales promotional use. Online editions arealso available for most titles (http://safaribooksonline.com). For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com.</p><p>Editor: Meg FoleyProduction Editor: Nicole ShelbyCopyeditor: Kim CoferProofreader: Marta Justak</p><p>Indexer: Wendy CatalanoInterior Designer: David FutatoCover Designer: Ellie VolckhausenIllustrator: Rebecca Demarest</p><p>May 2015: First Edition</p><p>Revision History for the First Edition2015-05-08: First Release</p><p>See http://oreilly.com/catalog/errata.csp?isbn=9781491914397 for release details.</p><p>The OReilly logo is a registered trademark of OReilly Media, Inc. ASP.NET MVC 5 with Bootstrap andKnockout.js, the cover image, and related trade dress are trademarks of OReilly Media, Inc.</p><p>While the publisher and the author have used good faith efforts to ensure that the information andinstructions contained in this work are accurate, the publisher and the author disclaim all responsibilityfor errors or omissions, including without limitation responsibility for damages resulting from the use ofor reliance on this work. Use of the information and instructions contained in this work is at your ownrisk. If any code samples or other technology this work contains or describes is subject to open sourcelicenses or the intellectual property rights of others, it is your responsibility to ensure that your usethereof complies with such licenses and/or rights.</p><p>http://safaribooksonline.comhttp://oreilly.com/catalog/errata.csp?isbn=9781491914397</p></li><li><p>This book is dedicated to my 7th grade teacher who said that being a professional wrestler was not a career I could use for our Life Plan project, so instead I chose being an</p><p>author. While its not my full-time job, it still kind of came true...</p></li><li><p>Table of Contents</p><p>Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix</p><p>Part I. Getting Started</p><p>1. Introduction to MVC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Creating Your First Project 1Examining the HomeController 4Examining the Views 6Understanding the URL Structure 8Summary 9</p><p>2. Introduction to Bootstrap. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Examining the Default Menu 11A Menu with Drop-Downs and a Search Box 14Buttons 17Alerts 19Themes 20Summary 20</p><p>3. Introduction to Knockout.js. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21Installing Knockout.js 21A Basic Example 23What Is MVVM? 25Creating ViewModels 26Summary 29</p><p>v</p></li><li><p>4. Working with a Database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Introduction to Entity Framework 32Code First 33Database First 37Creating Test Data 41Summary 44</p><p>Part II. Working with Data</p><p>5. Listing, Sorting, and Paging Through Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47Scaffolding the Author Model 47Sorting the Authors 55Paging the Authors 61Summary 66</p><p>6. Working with Forms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67Integrating Knockout with a Form 67Sharing the View and ViewModel 75Deleting with a Modal 83Empty Table Listings 88Summary 90</p><p>7. Server-Side ViewModels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91Why Create Server-Side ViewModels? 91The Authors ViewModel 93Updating the Authors Listing 94Updating the Add/Edit Form 95Updating the Delete Modal 97Summary 98</p><p>8. Introduction to Web API. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99Installing Web API 99Updating the List of Authors 102Updating the Add/Edit Authors Form 112Summary 115</p><p>Part III. Code Architecture</p><p>9. Creating Global Filters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119Authentication Filters 119Authorization Filters 120</p><p>vi | Table of Contents</p></li><li><p>Action Filters 120Result Filters 120Exception Filters 120Global Web API Validation 121Automapping with a Result Filter 125Web API Error Handling 129MVC Error Handling 132Summary 135</p><p>10. Adding Authentication and Authorization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137Authentication Overview 137Authorization Overview 138Implementing an Authentication Filter 139Implementing an Authorization Filter 148Summary 152</p><p>11. URL Routing Using Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153Attribute Routing Basics 153Route Prefixes...</p></li></ul>

Recommended

View more >