Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Adam Freeman

Now in its 7th edition, the best selling book on MVC is updated for ASP.NET Core MVC 2. It contains detailed explanations of the Core MVC functionality which enables developers to produce leaner, cloud optimized and mobile-ready applications for the .NET platform. This book puts ASP.NET Core MVC into context and dives deep into the tools and techniques required to build modern, cloud optimized extensible web applications. All the new MVC features are described in detail and the author explains how best to apply them to both new and existing projects. The ASP.NET Core MVC Framework is the latest evolution of Microsoft’s ASP.NET web platform, built on a completely new foundation. It represents a fundamental change to how Microsoft constructs and deploys web frameworks and is free of the legacy of earlier technologies such as Web Forms. ASP.NET Core MVC provides a "host agnostic" framework and a high-productivity programming model that promotes cleaner code architecture, test-driven development, and powerful extensibility. Best-selling author Adam Freeman has thoroughly revised this market-leading book and explains how to get the most from ASP.NET Core MVC. He starts with the nuts-and-bolts and shows you everything through to advanced features, going in-depth to give you the knowledge you need. The book includes a fully worked case study of a functioning web application that readers can use as a template for their own projects. What's New in This Edition Fully updated for Visual Studio 2017, C# 7 and .NET Core 2 Coverage of new features such as view filters Wider platform and tooling coverage than ever before, with more on Visual Studio Code and working with .NET Core on non-Windows platforms Docker-based application deployment What You Will Learn Gain a solid architectural understanding of ASP.NET Core MVC Explore the entire ASP.NET MVC Framework as a cohesive whole See how MVC and test-driven development work in action Learn what's new in ASP.NET Core MVC 2 and h

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A comprehensive, hands-on guide for developers who want to master ASP.NET Core MVC 2, covering everything from the MVC pattern and C# essentials to advanced features like routing, dependency injection, and Identity, with a full case study to build a real application. 【Book Arc】 - **Opening (~0%–10%)**: Introduces the history and context of ASP.NET Core MVC, explaining why it's a fundamental shift from legacy ASP.NET Web Forms, and sets up the book's structure with a table of contents that spans from basics to advanced topics. - **Early (~10%–30%)**: Walks through creating a first MVC application, covering controllers, views, routes, and data-entry forms, then dives into the MVC pattern, project conventions, and essential C# features like lambdas, async methods, and pattern matching, plus an introduction to Razor views and layouts. - **Early-to-Middle (~30%–40%)**: Focuses on practical tooling and testing, including working with Visual Studio, bundling and minifying static content, and unit testing MVC applications with fakes and parameterized tests to isolate components. - **Middle (~40%–50%)**: Launches the SportsStore case study, building a real e-commerce application from scratch—starting with the domain model, repository pattern, pagination, and styling with Bootstrap, then adding navigation, category filtering, and a shopping cart with session support. - **Middle-to-Late (~50%–60%)**: Completes the cart functionality with a service-based design, then moves into advanced configuration, URL routing, and controllers, followed by dependency injection, filters, API controllers, views, and tag helpers. - **Late (~60%–100%)**: Covers model binding, validation, and ASP.NET Core Identity (setup, application, and advanced features), finishing with model conventions and action constraints, plus deployment topics like Docker and Visual Studio Code for cross-platform development. 【Key Takeaways】 - **ASP.NET Core MVC is a clean break from the past** (Early): Built on a new foundation, it's host-agnostic and free of legacy Web Forms baggage, enabling cleaner architecture and test-driven development—essential context for why the framework works the way it does. - **The MVC pattern is about separation of concerns** (Early): Models handle data, controllers manage flow, and views render output; understanding this triad is critical before writing any code, as it shapes project structure and conventions. - **C# modern features are prerequisites** (Early): Lambdas, async/await, extension methods, and pattern matching are used heavily throughout MVC; mastering these makes the rest of the book far easier to follow. - **Razor is the view engine that ties it together** (Early): Razor syntax, layouts, view imports, and view start files let you create dynamic, reusable HTML templates—a core skill for building any MVC UI. - **Unit testing is built into the workflow** (Middle): Isolating components with fakes and parameterized tests is not an afterthought but a core practice, ensuring your controllers and services are reliable and maintainable. - **The SportsStore case study is a complete learning project** (Middle): Building a real e-commerce app—from repository and pagination to cart and navigation—shows how all the pieces fit together in a production-like scenario. - **Dependency injection and filters are power tools** (Middle-to-Late): Registering services and using filters (like view filters) let you write modular, extensible code that's easy to test and adapt, especially for cloud-ready apps. - **Identity and validation are essential for real apps** (Late): Model validation ensures data integrity, while ASP.NET Core Identity handles authentication and authorization—both are non-negotiable for secure, functional web applications. 【Reading Tips】 - **Skim the history and context chapters** (Chapters 1–2) if you're already familiar with MVC; focus instead on the hands-on examples and the "why" behind the framework's design choices. - **Deep-read the C# and Razor chapters** (Chapters 4–5) if you're new to modern C# or view syntax; these are foundational and will save you time later when code examples get complex. - **Treat the SportsStore case study as a mini-project** (Chapters 8–12): Don't just read it—type out the code, run it, and experiment with changes. This is where the book's value really shines. - **Pay special attention to dependency injection and tag helpers** (Chapters 18, 23–25): These are areas where ASP.NET Core MVC differs most from older frameworks, and they're crucial for building maintainable, cloud-ready apps. - **Use the advanced chapters as a reference** (Chapters 14–31): You don't need to memorize routing, filters, or Identity details upfront; come back to them when you need to implement a specific feature. 【Coverage Limits】 This guide synthesizes the book's structure and key themes from the first ~60% of the content; excerpts do not cover the detailed content of later chapters (e.g., advanced Identity, model conventions, deployment specifics), so those are summarized at a high level based on the table of contents.
Excerpt 1
ms Docker-based application deployment What You Will Learn Gain a solid architectural understanding of ASP.NET Core MVC Explore the entire ASP.NET MVC Framew...
View in text
Page 8
a New ASP.NET Core MVC Project .................................................................... 13 Adding the Controller ...................................
View in text
Page 10
.............................................................................. 119 Setting Attribute Values ....................................................
View in text
Page 12
................................................................................................. 215 Adding Pagination ........................................
View in text
Page 14
............................................................ 340 Managing Database Seeding .....................................................................
View in text
Page 16
...................... 435 Defining Default Values ................................................................................................ 437 Defin...
View in text
Page 18
.................................................................................................................... 583 ■Chapter 19: Filters 585 Preparing t...
View in text
Page 20
............................................................ 654 Summary .......................................................................................
View in text
Tags
AI categories
BackendProgrammingWeb Technology
ISBN: 1484231503
Publisher: Apress
Publish Year: 2017
Language: English
Pages: 1024
File Format: PDF
File Size: 22.0 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…