Update dotnet-cheatsheet.html
· 1 year ago
8f0f1d9792f108ee86aececa8ef1162db04327f1
Parent:
4a842194a
1 file changed +204 −38
- dotnet-cheatsheet.html +204 −38
Diff
--- a/dotnet-cheatsheet.html +++ b/dotnet-cheatsheet.html @@ -3,31 +3,29 @@ <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>.NET Ecosystem Cheatsheet - Modern .NET Overview</title> + <title>.NET & C# Language Cheatsheet - Modern Ecosystem Overview</title> <!-- SEO Meta Description --> - <meta name="description" content="Interactive cheatsheet for the .NET ecosystem, focusing on modern .NET (Core) versions. Covers major components, libraries, frameworks (ASP.NET Core, MAUI, EF Core), and tooling for senior developers and architects."> + <meta name="description" content="Interactive cheatsheet for the .NET ecosystem and C# language. Covers modern .NET (Core) versions, key C# features, major components, libraries, frameworks (ASP.NET Core, MAUI, EF Core), and tooling for senior developers and architects."> <!-- Canonical URL --> <link rel="canonical" href="http://cheatsheets.davidveksler.com/dotnet-cheatsheet.html"> <!-- Social Media Metadata --> - <meta property="og:title" content=".NET Ecosystem Cheatsheet - Modern Frameworks & Libraries"> - <meta property="og:description" content="Visual guide to the .NET platform, ASP.NET Core, MAUI, EF Core, key libraries, and architectural concepts for modern .NET development."> + <meta property="og:title" content=".NET & C# Language Cheatsheet - Modern Frameworks, Libraries & Language Features"> + <meta property="og:description" content="Visual guide to the .NET platform, C# language features, ASP.NET Core, MAUI, EF Core, key libraries, and architectural concepts for modern .NET development."> <meta property="og:type" content="article"> <meta property="og:url" content="http://cheatsheets.davidveksler.com/dotnet-cheatsheet.html"> - <!-- Make sure this image path is correct once hosted, e.g., http://cheatsheets.davidveksler.com/images/dotnet-cheatsheet.png --> <meta property="og:image" content="http://cheatsheets.davidveksler.com/images/dotnet-cheatsheet.png"> - <meta property="og:image:alt" content="Diagram showing the interconnected components of the .NET ecosystem including .NET SDK, ASP.NET Core, MAUI, and EF Core."> + <meta property="og:image:alt" content="Diagram showing the interconnected components of the .NET ecosystem including C# language, .NET SDK, ASP.NET Core, MAUI, and EF Core."> <meta property="og:site_name" content="David Veksler Cheatsheets"> <meta name="twitter:card" content="summary_large_image"> - <meta name="twitter:title" content=".NET Ecosystem Cheatsheet - Modern Frameworks & Libraries"> - <meta name="twitter:description" content="Visual guide to the .NET platform, ASP.NET Core, MAUI, EF Core, key libraries, and architectural concepts for modern .NET development."> - <!-- Make sure this image path is correct once hosted, e.g., http://cheatsheets.davidveksler.com/images/dotnet-cheatsheet.png --> + <meta name="twitter:title" content=".NET & C# Language Cheatsheet - Modern Frameworks, Libraries & Language Features"> + <meta name="twitter:description" content="Visual guide to the .NET platform, C# language features, ASP.NET Core, MAUI, EF Core, key libraries, and architectural concepts for modern .NET development."> <meta name="twitter:image" content="http://cheatsheets.davidveksler.com/images/dotnet-cheatsheet.png"> - <meta name="twitter:image:alt" content="Diagram showing the interconnected components of the .NET ecosystem."> + <meta name="twitter:image:alt" content="Diagram showing the interconnected components of the .NET ecosystem and C# language."> <!-- Optional: <meta name="twitter:site" content="@YourTwitterHandle"> --> <!-- Optional: <meta name="twitter:creator" content="@YourTwitterHandleForCreator"> --> @@ -53,6 +51,7 @@ /* --- .NET Category Colors --- */ --dotnet-color-platform: #512BD4; /* Purple - .NET Foundational */ + --dotnet-color-csharp: #D23078; /* Magenta/Pink for C# Language */ --dotnet-color-web: #0078D4; /* Blue - ASP.NET Core */ --dotnet-color-crossplatform: #107C10; /* Green - MAUI, Desktop */ --dotnet-color-data: #D83B01; /* Orange - EF Core, Data */ @@ -222,6 +221,7 @@ /* --- .NET Category Color Styling --- */ .section-platform, .card-platform { --db-category-color: var(--dotnet-color-platform); } + .section-csharp, .card-csharp { --db-category-color: var(--dotnet-color-csharp); } .section-web, .card-web { --db-category-color: var(--dotnet-color-web); } .section-crossplatform, .card-crossplatform { --db-category-color: var(--dotnet-color-crossplatform); } .section-data, .card-data { --db-category-color: var(--dotnet-color-data); } @@ -234,8 +234,8 @@ </head> <body> <header class="page-header"> - <h1><i class="bi bi-box-seam"></i> .NET Ecosystem Cheatsheet</h1> - <p class="lead">An interactive guide to modern .NET components, frameworks, and libraries for architects & senior developers.</p> + <h1><i class="bi bi-box-seam"></i> .NET & C# Language Cheatsheet</h1> + <p class="lead">An interactive guide to modern .NET components, C# language features, frameworks, and libraries for architects & senior developers.</p> </header> <div class="container" id="main-container"> @@ -260,9 +260,9 @@ <h6>Key Components</h6> <ul> <li><strong>.NET CLI (`dotnet`):</strong> Command-line interface for creating, restoring dependencies, building, running, testing, and publishing applications. <a href="https://learn.microsoft.com/en-us/dotnet/core/tools/" target="_blank" rel="noopener noreferrer">.NET CLI Docs</a></li> - <li><strong>Compilers (Roslyn):</strong> C# and Visual Basic compilers. F# has its own compiler. Translates source code to CIL. <a href="https://learn.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/" target="_blank" rel="noopener noreferrer">Roslyn Overview</a> [38]</li> + <li><strong>Compilers (Roslyn):</strong> C# and Visual Basic compilers. F# has its own compiler. Translates source code to CIL. <a href="https://learn.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/" target="_blank" rel="noopener noreferrer">Roslyn Overview</a></li> <li><strong>Runtime & Libraries:</strong> Includes the .NET Runtime and Base Class Library (BCL) necessary to run apps.</li> - <li><strong>Build System (MSBuild):</strong> Handles the build process based on project files (`.csproj`, `.fsproj`). <a href="https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild" target="_blank" rel="noopener noreferrer">MSBuild Docs</a> [3, 23]</li> + <li><strong>Build System (MSBuild):</strong> Handles the build process based on project files (`.csproj`, `.fsproj`). <a href="https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild" target="_blank" rel="noopener noreferrer">MSBuild Docs</a></li> </ul> <h6>Use Cases</h6> <p>Essential for any .NET development, from simple console apps to complex web services and cross-platform applications.</p> @@ -370,9 +370,172 @@ </div> <!-- /.row --> </div> <!-- /.schema-container --> - <!-- II. APPLICATION MODELS & FRAMEWORKS --> + <!-- II. C# LANGUAGE FEATURES --> + <div class="schema-container section-csharp" data-section-id="section-csharp-features"> + <h2 class="section-title" id="section-csharp-features-title">C# Language Features</h2> + <div class="row"> + <div class="col-lg-4 col-md-6"> + <div class="info-card card-csharp" id="card-csharp-overview"> + <div class="card-body"> + <h5><i class="bi bi-code-slash"></i> C# Language Overview</h5> + <div class="card-content-wrapper"> + <p class="summary">A modern, object-oriented, and type-safe programming language. Key to .NET development, offering powerful features for building diverse applications. <a href="https://learn.microsoft.com/en-us/dotnet/csharp/" target="_blank" rel="noopener noreferrer">C# Guide</a></p> + <button class="btn btn-sm details-toggle" type="button" data-bs-toggle="collapse" data-bs-target="#collapseCsharpOverview" aria-expanded="false" aria-controls="collapseCsharpOverview"> + Details <i class="bi bi-chevron-down"></i> + </button> + </div> + </div> + <div class="collapse collapse-content" id="collapseCsharpOverview"> + <h6>Purpose</h6> + <p>The primary language for developing applications on the .NET platform, designed for productivity, performance, and robustness.</p> + <h6>Core Characteristics</h6> + <ul> + <li><strong>Object-Oriented:</strong> Supports encapsulation, inheritance, and polymorphism.</li> + <li><strong>Type-Safe:</strong> Prevents type errors that could lead to insecure or unstable code.</li> + <li><strong>Component-Oriented:</strong> Based on software components with properties, methods, and events.</li> + <li><strong>Unified Type System:</strong> All C# types inherit from a single root `object` type.</li> + <li><strong>Garbage Collection:</strong> Automatic memory management simplifies development.</li> + <li><strong>Evolving Language:</strong> Regularly updated with new features to enhance productivity and capabilities (e.g., .NET 8 / C# 12). <a href="https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-12" target="_blank" rel="noopener noreferrer">What's New in C# 12</a></li> + </ul> + </div> + </div> + </div> + <div class="col-lg-4 col-md-6"> + <div class="info-card card-csharp" id="card-csharp-async"> + <div class="card-body"> + <h5><i class="bi bi-lightning"></i> Async Programming (async/await)</h5> + <div class="card-content-wrapper"> + <p class="summary">Simplifies writing non-blocking code using <span class="term">async</span> and <span class="term">await</span> keywords, crucial for responsive UIs and scalable services. <a href="https://learn.microsoft.com/en-us/dotnet/csharp/async" target="_blank" rel="noopener noreferrer">Async Overview</a></p> + <button class="btn btn-sm details-toggle" type="button" data-bs-toggle="collapse" data-bs-target="#collapseCsharpAsync" aria-expanded="false" aria-controls="collapseCsharpAsync"> + Details <i class="bi bi-chevron-down"></i> + </button> + </div> + </div> + <div class="collapse collapse-content" id="collapseCsharpAsync"> + <h6>Purpose</h6> + <p>Manages I/O-bound and CPU-bound asynchronous operations without complex callback structures, improving application performance and responsiveness.</p> + <h6>Key Concepts</h6> + <ul> + <li><strong>`async` Modifier:</strong> Marks a method as asynchronous.</li> + <li><strong>`await` Operator:</strong> Suspends execution until an awaited `Task` or `Task<T>` completes.</li> + <li><strong>`Task` and `Task<T>`:</strong> Represent ongoing asynchronous operations.</li> + <li><strong>Exception Handling:</strong> `try-catch` blocks work seamlessly with async operations.</li> + </ul> + <h6>Use Cases</h6> + <p>Web service calls, database queries, file I/O, long-running computations that shouldn't block the main thread.</p> + </div> + </div> + </div> + <div class="col-lg-4 col-md-6"> + <div class="info-card card-csharp" id="card-csharp-linq"> + <div class="card-body"> + <h5><i class="bi bi-funnel"></i> LINQ (Language Integrated Query)</h5> + <div class="card-content-wrapper"> + <p class="summary">Provides powerful, SQL-like query capabilities directly within C# for collections, databases (via EF Core), XML, and other data sources. <a href="https://learn.microsoft.com/en-us/dotnet/csharp/linq/" target="_blank" rel="noopener noreferrer">LINQ Docs</a></p> + <button class="btn btn-sm details-toggle" type="button" data-bs-toggle="collapse" data-bs-target="#collapseCsharpLinq" aria-expanded="false" aria-controls="collapseCsharpLinq"> + Details <i class="bi bi-chevron-down"></i> + </button> + </div> + </div> + <div class="collapse collapse-content" id="collapseCsharpLinq"> + <h6>Purpose</h6> + <p>Offers a consistent model for working with data across various sources and formats, reducing complexity and improving code readability.</p> + <h6>Key Features</h6> + <ul> + <li><strong>Query Syntax & Method Syntax:</strong> Two ways to write LINQ queries.</li> + <li><strong>Standard Query Operators:</strong> A rich set of methods like `Where`, `Select`, `OrderBy`, `GroupBy`.</li> + <li><strong>Deferred Execution:</strong> Queries are executed only when results are enumerated.</li> + <li><strong>Type Safety:</strong> Queries are checked at compile time.</li> + <li><strong>Providers:</strong> LINQ to Objects, LINQ to Entities (EF Core), LINQ to XML, etc.</li> + </ul> + </div> + </div> + </div> + <div class="col-lg-4 col-md-6"> + <div class="info-card card-csharp" id="card-csharp-pattern-matching"> + <div class="card-body"> + <h5><i class="bi bi-grid-3x3-gap"></i> Pattern Matching</h5> + <div class="card-content-wrapper"> + <p class="summary">Enhanced control flow based on the "shape" of data using <span class="term">is</span> expressions and <span class="term">switch expressions/statements</span>. <a href="https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/functional/pattern-matching" target="_blank" rel="noopener noreferrer">Pattern Matching</a></p> + <button class="btn btn-sm details-toggle" type="button" data-bs-toggle="collapse" data-bs-target="#collapseCsharpPatternMatching" aria-expanded="false" aria-controls="collapseCsharpPatternMatching"> + Details <i class="bi bi-chevron-down"></i> + </button> + </div> + </div> + <div class="collapse collapse-content" id="collapseCsharpPatternMatching"> + <h6>Purpose</h6> + <p>Provides more concise and readable syntax for conditional logic based on data characteristics, type checks, and value comparisons.</p> + <h6>Types of Patterns</h6> + <ul> + <li><strong>Type Pattern:</strong> Checks if an expression can be converted to a specified type (`obj is string s`).</li> + <li><strong>Property Pattern:</strong> Matches an expression against properties of an object (`obj is { Length: > 0 }`).</li> + <li><strong>Relational Patterns:</strong> Compare values (`> 10`, `< 50`).</li> + <li><strong>Logical Patterns:</strong> Combine patterns (`and`, `or`, `not`).</li> + <li><strong>List Patterns:</strong> Match elements in arrays or lists (`[1, 2, ..]`). (C# 11+)</li> + <li><strong>Switch Expressions:</strong> Concise switch-like construct returning a value.</li> + </ul> + </div> + </div> + </div> + <div class="col-lg-4 col-md-6"> + <div class="info-card card-csharp" id="card-csharp-records"> + <div class="card-body"> + <h5><i class="bi bi-journal-bookmark"></i> Records & Immutability</h5> + <div class="card-content-wrapper"> + <p class="summary">Concise syntax for creating immutable reference types (<span class="term">record class</span>) or value types (<span class="term">record struct</span>) ideal for data transfer objects (DTOs). <a href="https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/record" target="_blank" rel="noopener noreferrer">Records Docs</a></p> + <button class="btn btn-sm details-toggle" type="button" data-bs-toggle="collapse" data-bs-target="#collapseCsharpRecords" aria-expanded="false" aria-controls="collapseCsharpRecords"> + Details <i class="bi bi-chevron-down"></i> + </button> + </div> + </div> + <div class="collapse collapse-content" id="collapseCsharpRecords"> + <h6>Purpose</h6> + <p>Simplify the creation of data-centric types, promote immutability, and provide built-in functionality for value-based equality and display.</p> + <h6>Key Features</h6> + <ul> + <li><strong>Immutability by Default:</strong> Properties are typically init-only.</li> + <li><strong>Value-based Equality:</strong> Instances are compared based on their data, not reference.</li> + <li><strong>`with` Expressions:</strong> Create copies with modified properties (non-destructive mutation).</li> + <li><strong>Built-in Formatting:</strong> Sensible `ToString()` overrides.</li> + <li><strong>Deconstruction:</strong> Easily extract property values.</li> + <li><strong>Positional Records:</strong> Concise syntax for defining properties via constructor parameters.</li> + </ul> + </div> + </div> + </div> + <div class="col-lg-4 col-md-6"> + <div class="info-card card-csharp" id="card-csharp-nullable-types"> + <div class="card-body"> + <h5><i class="bi bi-question-circle"></i> Nullable Reference Types</h5> + <div class="card-content-wrapper"> + <p class="summary">Helps prevent <span class="term">NullReferenceException</span> at runtime by distinguishing between nullable and non-nullable reference types through compiler analysis. <a href="https://learn.microsoft.com/en-us/dotnet/csharp/nullable-references" target="_blank" rel="noopener noreferrer">Nullable Types</a></p> + <button class="btn btn-sm details-toggle" type="button" data-bs-toggle="collapse" data-bs-target="#collapseCsharpNullableTypes" aria-expanded="false" aria-controls="collapseCsharpNullableTypes"> + Details <i class="bi bi-chevron-down"></i> + </button> + </div> + </div> + <div class="collapse collapse-content" id="collapseCsharpNullableTypes"> + <h6>Purpose</h6> + <p>Improves code safety by making the intent regarding nullability explicit, allowing the compiler to issue warnings about potential null dereferences.</p> + <h6>Mechanism</h6> + <ul> + <li><strong>Opt-in Feature:</strong> Enabled via project settings (`<Nullable>enable</Nullable>`) or `#nullable` directives.</li> + <li><strong>`string?` vs `string`:</strong> `string?` indicates a reference type that can be null; `string` indicates it should not be null.</li> + <li><strong>Compiler Warnings:</strong> Alerts for potential null assignments or dereferences.</li> + <li><strong>Null-Forgiving Operator (`!`):</strong> Suppresses warnings when a developer asserts an expression is not null.</li> + </ul> + <h6>Impact</h6> + <p>Encourages more robust code by forcing developers to consider nullability throughout their codebase.</p> + </div> + </div> + </div> + </div> <!-- /.row --> + </div> <!-- /.schema-container --> + + + <!-- III. APPLICATION MODELS & FRAMEWORKS --> <div class="schema-container section-web" data-section-id="section-app-models"> - <h2 class="section-title" id="section-app-models">Application Models & Frameworks</h2> + <h2 class="section-title" id="section-app-models-title">Application Models & Frameworks</h2> <div class="row"> <div class="col-lg-4 col-md-6"> <div class="info-card card-web" id="card-aspnetcore"> @@ -395,7 +558,7 @@ <li><strong>Web APIs:</strong> Robust framework for building RESTful HTTP services. <a href="https://learn.microsoft.com/en-us/aspnet/core/web-api/" target="_blank" rel="noopener noreferrer">Web API Docs</a></li> </ul> <h6>Core Features</h6> - <p>Middleware pipeline, routing, dependency injection, configuration, logging, Kestrel web server. <a href="https://learn.microsoft.com/en-us/aspnet/core/fundamentals/kestrel" target="_blank" rel="noopener noreferrer">Kestrel Docs</a> [42]</p> + <p>Middleware pipeline, routing, dependency injection, configuration, logging, Kestrel web server. <a href="https://learn.microsoft.com/en-us/aspnet/core/fundamentals/kestrel" target="_blank" rel="noopener noreferrer">Kestrel Docs</a></p> </div> </div> </div> @@ -479,7 +642,7 @@ <div class="card-body"> <h5><i class="bi bi-terminal"></i> Console Applications</h5> <div class="card-content-wrapper"> - <p class="summary">Command-line applications that run in a text-based console window, ideal for utilities and background tasks. <a href="https://learn.microsoft.com/en-us/dotnet/core/tutorials/top-level-templates" target="_blank" rel="noopener noreferrer">Console App Docs</a> [49]</p> + <p class="summary">Command-line applications that run in a text-based console window, ideal for utilities and background tasks. <a href="https://learn.microsoft.com/en-us/dotnet/core/tutorials/top-level-templates" target="_blank" rel="noopener noreferrer">Console App Docs</a></p> <button class="btn btn-sm details-toggle" type="button" data-bs-toggle="collapse" data-bs-target="#collapseConsole" aria-expanded="false" aria-controls="collapseConsole"> Details <i class="bi bi-chevron-down"></i> </button> @@ -527,7 +690,7 @@ <div class="card-body"> <h5><i class="bi bi-cloud-arrow-up"></i> .NET Aspire</h5> <div class="card-content-wrapper"> - <p class="summary">An opinionated, cloud-ready stack for building observable, production-ready, distributed applications. <a href="https://learn.microsoft.com/en-us/dotnet/aspire/" target="_blank" rel="noopener noreferrer">.NET Aspire Docs</a> [4, 5, 9, 19]</p> + <p class="summary">An opinionated, cloud-ready stack for building observable, production-ready, distributed applications. <a href="https://learn.microsoft.com/en-us/dotnet/aspire/" target="_blank" rel="noopener noreferrer">.NET Aspire Docs</a></p> <button class="btn btn-sm details-toggle" type="button" data-bs-toggle="collapse" data-bs-target="#collapseCloudNative" aria-expanded="false" aria-controls="collapseCloudNative"> Details <i class="bi bi-chevron-down"></i> </button> @@ -550,9 +713,9 @@ </div> <!-- /.schema-container --> - <!-- III. KEY LIBRARIES & TECHNOLOGIES --> + <!-- IV. KEY LIBRARIES & TECHNOLOGIES --> <div class="schema-container section-data" data-section-id="section-key-libs"> - <h2 class="section-title" id="section-key-libs">Key Libraries & Technologies</h2> + <h2 class="section-title" id="section-key-libs-title">Key Libraries & Technologies</h2> <div class="row"> <div class="col-lg-4 col-md-6"> <div class="info-card card-data" id="card-efcore"> @@ -571,7 +734,7 @@ <li><strong>LINQ to Entities:</strong> Query databases using Language Integrated Query. <a href="https://learn.microsoft.com/en-us/ef/core/querying/" target="_blank" rel="noopener noreferrer">Querying Data</a></li> <li><strong>Migrations:</strong> Manage database schema changes over time. <a href="https://learn.microsoft.com/en-us/ef/core/managing-schemas/migrations/" target="_blank" rel="noopener noreferrer">Migrations Docs</a></li> <li><strong>Database Providers:</strong> Supports SQL Server, SQLite, PostgreSQL, MySQL, Cosmos DB, and more. <a href="https://learn.microsoft.com/en-us/ef/core/providers/" target="_blank" rel="noopener noreferrer">Providers Docs</a></li> - <li><strong>Change Tracking:</strong> Automatically tracks changes to entities for updates. <a href="https://learn.microsoft.com/en-us/ef/core/change-tracking/" target="_blank" rel="noopener noreferrer">Change Tracking Docs</a> [11, 17]</li> + <li><strong>Change Tracking:</strong> Automatically tracks changes to entities for updates. <a href="https://learn.microsoft.com/en-us/ef/core/change-tracking/" target="_blank" rel="noopener noreferrer">Change Tracking Docs</a></li> </ul> <h6>Use Cases</h6> <p>Simplifies data access logic in applications requiring interaction with relational or document databases.</p> @@ -628,7 +791,7 @@ <div class="card-body"> <h5><i class="bi bi-shield-lock"></i> Security Libraries</h5> <div class="card-content-wrapper"> - <p class="summary">Built-in libraries for cryptography, authentication, authorization, and data protection. <a href="https://learn.microsoft.com/en-us/dotnet/standard/security/" target="_blank" rel="noopener noreferrer">.NET Security Docs</a> [16]</p> + <p class="summary">Built-in libraries for cryptography, authentication, authorization, and data protection. <a href="https://learn.microsoft.com/en-us/dotnet/standard/security/" target="_blank" rel="noopener noreferrer">.NET Security Docs</a></p> <button class="btn btn-sm details-toggle" type="button" data-bs-toggle="collapse" data-bs-target="#collapseSecurityLibs" aria-expanded="false" aria-controls="collapseSecurityLibs"> Details <i class="bi bi-chevron-down"></i> </button> @@ -640,7 +803,7 @@ <li><strong>Cryptography:</strong> Hashing, encryption, digital signatures. <a href="https://learn.microsoft.com/en-us/dotnet/standard/security/cryptography-model" target="_blank" rel="noopener noreferrer">Cryptography Model</a></li> <li><strong>ASP.NET Core Identity:</strong> User authentication and authorization. <a href="https://learn.microsoft.com/en-us/aspnet/core/security/authentication/identity" target="_blank" rel="noopener noreferrer">ASP.NET Core Identity</a></li> <li><strong>Data Protection APIs:</strong> For protecting data at rest. <a href="https://learn.microsoft.com/en-us/aspnet/core/security/data-protection/introduction" target="_blank" rel="noopener noreferrer">Data Protection</a></li> - <li><strong>Secure Coding Guidelines:</strong> Practices to avoid common vulnerabilities. [1, 46]</li> + <li><strong>Secure Coding Guidelines:</strong> Practices to avoid common vulnerabilities.</li> </ul> </div> </div> @@ -736,9 +899,9 @@ </div> <!-- /.schema-container --> - <!-- IV. TOOLING & ECOSYSTEM --> + <!-- V. TOOLING & ECOSYSTEM --> <div class="schema-container section-tooling" data-section-id="section-tooling-eco"> - <h2 class="section-title" id="section-tooling-eco">Tooling & Ecosystem</h2> + <h2 class="section-title" id="section-tooling-eco-title">Tooling & Ecosystem</h2> <div class="row"> <div class="col-lg-4 col-md-6"> <div class="info-card card-tooling" id="card-ides"> @@ -766,7 +929,7 @@ <div class="card-body"> <h5><i class="bi bi-box"></i> NuGet</h5> <div class="card-content-wrapper"> - <p class="summary">The package manager for .NET. Allows developers to create, share, and consume reusable libraries (packages). <a href="https://learn.microsoft.com/en-us/nuget/" target="_blank" rel="noopener noreferrer">NuGet Docs</a> [44]</p> + <p class="summary">The package manager for .NET. Allows developers to create, share, and consume reusable libraries (packages). <a href="https://learn.microsoft.com/en-us/nuget/" target="_blank" rel="noopener noreferrer">NuGet Docs</a></p> <button class="btn btn-sm details-toggle" type="button" data-bs-toggle="collapse" data-bs-target="#collapseNuget" aria-expanded="false" aria-controls="collapseNuget"> Details <i class="bi bi-chevron-down"></i> </button> @@ -775,8 +938,8 @@ <div class="collapse collapse-content" id="collapseNuget"> <h6>Key Aspects</h6> <ul> - <li><strong>`nuget.org`:</strong> The central public repository for NuGet packages. <a href="https://www.nuget.org/" target="_blank" rel="noopener noreferrer">nuget.org</a> [2, 6]</li> - <li><strong>Package Management:</strong> Via .NET CLI (`dotnet add package`), Visual Studio UI, or Package Manager Console. [33]</li> + <li><strong>`nuget.org`:</strong> The central public repository for NuGet packages. <a href="https://www.nuget.org/" target="_blank" rel="noopener noreferrer">nuget.org</a></li> + <li><strong>Package Management:</strong> Via .NET CLI (`dotnet add package`), Visual Studio UI, or Package Manager Console.</li> <li><strong>Package Creation:</strong> Tools for packaging libraries for distribution.</li> <li><strong>Dependency Resolution:</strong> Manages transitive dependencies.</li> </ul> @@ -821,7 +984,7 @@ <li><strong>GitHub Actions:</strong> Automate workflows directly within GitHub. <a href="https://docs.github.com/en/actions" target="_blank" rel="noopener noreferrer">GitHub Actions Docs</a></li> <li><strong>Azure Pipelines:</strong> CI/CD service within Azure DevOps. <a href="https://learn.microsoft.com/en-us/azure/devops/pipelines/" target="_blank" rel="noopener noreferrer">Azure Pipelines Docs</a></li> </ul> - <p>MSBuild is the underlying build engine for .NET projects. [3, 23]</p> + <p>MSBuild is the underlying build engine for .NET projects.</p> </div> </div> </div> @@ -850,9 +1013,9 @@ </div> </div> - <!-- V. ADVANCED & ARCHITECTURAL CONCEPTS --> + <!-- VI. ADVANCED & ARCHITECTURAL CONCEPTS --> <div class="schema-container section-advanced" data-section-id="section-advanced-concepts"> - <h2 class="section-title" id="section-advanced-concepts">Advanced & Architectural Concepts</h2> + <h2 class="section-title" id="section-advanced-concepts-title">Advanced & Architectural Concepts</h2> <div class="row"> <div class="col-lg-4 col-md-6"> <div class="info-card card-advanced" id="card-native-aot"> @@ -930,7 +1093,7 @@ <div class="card-body"> <h5><i class="bi bi-magic"></i> Source Generators</h5> <div class="card-content-wrapper"> - <p class="summary">A Roslyn compiler feature that lets C# developers inspect user code and generate new C# source files during compilation. <a href="https://learn.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/source-generators-overview" target="_blank" rel="noopener noreferrer">Source Generators Docs</a> [7, 20, 24, 29, 40, 45]</p> + <p class="summary">A Roslyn compiler feature that lets C# developers inspect user code and generate new C# source files during compilation. <a href="https://learn.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/source-generators-overview" target="_blank" rel="noopener noreferrer">Source Generators Docs</a></p> <button class="btn btn-sm details-toggle" type="button" data-bs-toggle="collapse" data-bs-target="#collapseSourceGenerators" aria-expanded="false" aria-controls="collapseSourceGenerators"> Details <i class="bi bi-chevron-down"></i> </button> @@ -997,9 +1160,9 @@ </div> </div> - <!-- VI. KEY CONSIDERATIONS FOR ARCHITECTS --> + <!-- VII. KEY CONSIDERATIONS FOR ARCHITECTS --> <div class="schema-container section-general" data-section-id="section-arch-considerations"> - <h2 class="section-title" id="section-arch-considerations">Key Considerations for Architects</h2> + <h2 class="section-title" id="section-arch-considerations-title">Key Considerations for Architects</h2> <div class="row"> <div class="col-12"> <div class="info-card card-general" id="card-arch-summary"> @@ -1017,7 +1180,7 @@ <ul> <li><strong>Scalability:</strong> Design for growth. Consider patterns like microservices, load balancing, and caching. <a href="https://learn.microsoft.com/en-us/dotnet/architecture/microservices/" target="_blank" rel="noopener noreferrer">Microservices Architecture</a></li> <li><strong>Resilience & Fault Tolerance:</strong> Implement patterns like retries, circuit breakers (e.g., using <a href="https://github.com/App-vNext/Polly" target="_blank" rel="noopener noreferrer">Polly</a>), and health checks. <a href="https://learn.microsoft.com/en-us/dotnet/architecture/cloud-native/resilient-applications" target="_blank" rel="noopener noreferrer">Resilient Apps</a></li> - <li><strong>Security by Design:</strong> Incorporate security throughout the lifecycle. <a href="https://learn.microsoft.com/en-us/aspnet/core/security/" target="_blank" rel="noopener noreferrer">ASP.NET Core Security</a> [1, 46]</li> + <li><strong>Security by Design:</strong> Incorporate security throughout the lifecycle. <a href="https://learn.microsoft.com/en-us/aspnet/core/security/" target="_blank" rel="noopener noreferrer">ASP.NET Core Security</a></li> <li><strong>Maintainability & Testability:</strong> Clean, modular code. Employ DI, unit/integration tests. <a href="https://learn.microsoft.com/en-us/dotnet/core/testing/" target="_blank" rel="noopener noreferrer">.NET Testing</a></li> <li><strong>Deployment Strategies:</strong> Containers (Docker, Kubernetes), serverless (Azure Functions), PaaS (Azure App Service). <a href="https://learn.microsoft.com/en-us/dotnet/architecture/host-deploy/" target="_blank" rel="noopener noreferrer">Hosting & Deployment</a></li> <li><strong>Cost Optimization:</strong> Monitor resource usage, choose appropriate service tiers, and optimize for efficiency.</li> @@ -1037,6 +1200,9 @@ <div> <a href="https://learn.microsoft.com/en-us/dotnet/" title=".NET Documentation" target="_blank" rel="noopener noreferrer" class="mx-2 link-secondary"> <i class="bi bi-book"></i> .NET Docs + </a> + <a href="https://learn.microsoft.com/en-us/dotnet/csharp/" title="C# Documentation" target="_blank" rel="noopener noreferrer" class="mx-2 link-secondary"> + <i class="bi bi-filetype-cs"></i> C# Docs </a> <a href="https://dotnet.microsoft.com/en-us/learn/architecture" title=".NET Architecture Center" target="_blank" rel="noopener noreferrer" class="mx-2 link-secondary"> <i class="bi bi-diagram-2"></i> .NET Architecture Center @@ -1110,14 +1276,14 @@ document.addEventListener('DOMContentLoaded', () => { const sectionHeader = schemaContainer ? schemaContainer.querySelector('.section-title') : null; if (!sectionHeader || !card.id || !sectionHeader.id) { - console.warn("Missing ID on card or section header for line drawing:", card); + console.warn("Missing ID on card or section header for line drawing:", card, sectionHeader); mainContainer.classList.add('is-dimmed'); card.classList.add('is-highlighted'); if (schemaContainer) schemaContainer.classList.add('is-highlighted-section'); currentHoverState.card = card; return; } - + currentHoverState.card = card; mainContainer.classList.add('is-dimmed'); card.classList.add('is-highlighted');