Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Dustin Metzgar

Rating No ratings yet

Learn to build standout line-of-business applications using Microsoft’s .NET Framework, the premier platform for enterprise business development. Based on the bestselling .NET Core in Action, the new .NET in Action, Second Edition has been completely rewritten and updated by original author Dustin Metzgar—an industry veteran who helped develop both the original .NET Framework and .NET Core. .NET in Action, Second Edition presents the big picture of .NET application development, introducing core concepts like: Designing applications to take full advantage of .NET 8 Integrating the latest C# and .NET features Building web services and applications with ASP.NET Core Working with data in files and remote services, and databases via Entity Framework Core Verifying code with unit and integration tests Make applications ready for internationalization Benchmarking and analyzing application performance .NET in Action, Second Edition offers a clear-headed introduction to implementing full-featured, cross-platform professional applications on the Microsoft .NET platform. It compiles the must-know skills of .NET into a format that’s clear and easy to follow. In each chapter, you’ll build new applications, pick up essential .NET skills, and test your knowledge against handy exercises. About the reader For beginning-to-intermediate developers on any platform. No .NET experience required. About the author Dustin Metzgar is a seasoned developer and architect. At Microsoft, Dustin contributed to the .NET Framework, .NET Core, and the open sourcing of .NET.

AI Reading Assistant

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

AI guide
【One-Line Pitch】 A practical, hands-on guide for developers new to .NET or migrating from older frameworks, teaching you to build modern, cross-platform line-of-business applications with .NET 8, ASP.NET Core, and C# through real-world examples and exercises. 【Book Arc】 - **Opening (~0%–9%)**: Introduces what .NET is, why it matters, and when to use it—covering the platform’s cross-platform capabilities, supported languages, and ecosystem options like Blazor, MAUI, and community frameworks. Sets expectations for the reader’s background and the book’s structure. - **Early (~9%–28%)**: Gets hands-on with console applications, teaching core C# concepts like namespaces, types (value vs. reference), properties, reflection, and command-line parsing. Builds a practical ASCII art tool to demonstrate these fundamentals in action. - **Early-to-Middle (~28%–38%)**: Expands into web development with ASP.NET Core, showing how to create web services and applications using minimal APIs, configuration files, and Razor Pages. Covers paging, sorting, filtering, and basic MVC concepts. - **Middle (~38%–47%)**: Shifts focus to data handling, starting with file I/O and directory traversal, then moving to JSON serialization/deserialization using JsonSerializer. Includes practical exercises like building a joke-finder app that reads remote JSON data. - **Late (~47%–100%)**: Covers release-readiness topics per the table of contents: security, performance and profiling (including garbage collection), failure handling, and building world-ready (internationalized) applications. Excerpts confirm these chapters exist but do not detail their content. 【Key Takeaways】 - **.NET is cross-platform and versatile** (Early): It runs on Windows, Linux, macOS, mobile, IoT, and even in browsers via Blazor, making it a strong choice for most business applications—though not ideal for data science or hardware drivers. (Early) - **C# fundamentals are taught through real projects** (Early): Value vs. reference types, properties, and reflection are explained using a working ASCII art console app, making abstract concepts concrete and immediately applicable. (Early) - **The `var` keyword is a style choice with trade-offs** (Early): It reduces boilerplate but obscures types for readers; use it when the compiler can infer the type, but be mindful of code clarity. (Early) - **ASP.NET Core minimizes boilerplate** (Early): The empty web template relies on SDK defaults for configuration and routing, so you can build functional web services with just a few lines of code—like mapping a GET endpoint to return "Hello World!". (Early) - **Razor Pages simplify web UI development** (Early): Similar to Java Server Pages, Razor embeds C# in HTML with directives like `@page` and `@model`, letting you build dynamic pages without a separate controller. (Early) - **Exceptions are expensive—use them sparingly** (Middle): Prefer checking conditions like `DirectoryInfo.Exists` over catching exceptions for predictable failures, reserving exceptions for truly exceptional cases like security errors. (Middle) - **JSON handling is streamlined with `JsonSerializer`** (Middle): Deserializing JSON to typed records with case-insensitive options makes data processing straightforward, as shown in the joke-finder example that reads remote JSON files. (Middle) - **Release readiness requires deliberate attention** (Late): The book dedicates chapters to security, performance profiling, failure handling, and internationalization, emphasizing that production-quality apps need more than just working code. (Late) 【Reading Tips】 - **Skim the ecosystem overview in Chapter 1** if you’re already convinced .NET is right for you; focus instead on the hands-on console app in Chapter 2 to build foundational C# skills. - **Deep-read the web development section (Chapter 3)**—it’s where the book shifts from basics to practical application, and the Razor Pages and minimal API examples are directly reusable. - **Pay close attention to the data handling chapters (4–5)**—file I/O and JSON are universal needs, and the exercises (like the joke finder) are excellent practice for real-world scenarios. - **Watch for the release-readiness chapters (9–12)** if you’re building production apps; they cover security, performance, failure handling, and internationalization—topics often skipped in beginner books but critical for shipping. - **Use the exercises as checkpoints**—each chapter builds on the previous one, so completing them ensures you’ve absorbed the concepts before moving on. 【Coverage Limits】 This guide synthesizes excerpts covering roughly the first half of the book (through Chapter 4) plus chapter titles for the latter half. Detailed content on security, performance, failure handling, and internationalization (Chapters 9–12) is not covered in the source material.
Excerpt 1
ing failures 239 12 ■ Building world-ready applications 261 13 ■ Working with containers 280 foreword Six years have passed since I wrote the foreword for th...
View in text
Excerpt 2
m (CTS) that allows the use of types in any .NET language. .NET has two kinds of types: reference and value. These categories are determined by how the type’...
View in text
Excerpt 3
uration loading had to be added explicitly in the code. In .NET 6 and later, JSON configuration is used by default because most developers use this approach ...
View in text
Excerpt 4
g listing. Put the file in the same folder as the project. Listing 4.17 curl command to download programmer-jokes JSON document curl -o jokes.json https://g...
View in text
Excerpt 5
ory database pro- vider should be used only for development. Also, EF Core’s documentation recom- mends against using the in-memory database provider for uni...
View in text
Excerpt 6
game. But because DeckOfCards uses the System.Random class directly, we have no way to control the order of the cards to unit- test these situations. For a s...
View in text
Excerpt 7
lowing listing shows the new BasicStopwatch code. Listing 7.5 BasicStopwatch, ISystemClock, and DateTimeOffset public class BasicStopwatch { Static SystemClo...
View in text
Excerpt 8
eepAlive = new(connStr); string keepAlive.Open(); Creates and opens keep-alive connection var optionsBuilder = new DbContextOptionsBuilder(); O...
View in text
Tags
AI categories
TechnologyProgramming LanguageBackend
.net
ISBN: 1633439313
Publish Year: 2024
Language: English
Pages: 360
File Format: PDF
File Size: 24.7 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…