What this book covers
Chapter 1, Taking Control with Source Control, addresses why source control is important, identifying and selecting a branching workflow, why tags are important, and proper commit etiquette.
Chapter 2, CI/CD – Building Quality Software Automatically, defines what CI/CD is, understanding and preparing code for a pipeline along with identifying two “falling” approaches when errors appear, how to deploy databases, and the various types of CI/CD providers, such as Azure, AWS, and Google Cloud Platform.
Chapter 3, Best Approaches for Middleware, explains what middleware is and how to optimize a middleware pipeline, using request delegates and extension methods, along with building an example middleware component.
Chapter 4, Applying Security from the Start, covers why security should be a top concern before, during, and after writing code, as well as common security practices. The chapter concludes by addressing the top three security threats on the internet.
Chapter 5, Optimizing Data Access with Entity Framework Core, looks at the different types of implementations of Entity Framework and how each one is used, why logging and async/await is important, how to use resources for large seed data, and why sometimes it’s better to bypass LINQ and use stored procedures.
Chapter 6, Best Practices for Web User Interfaces, examines what a task runner is, why they’re important, and how to create a workflow using one, along with reviewing UI standards such as centralizing site URLs, why controllers/pages should be small, why ViewComponent
s are beneficial, and how to create SEO-friendly URLs.
Chapter 7, Testing Your Code, explains the various types of testing concepts used in ASP.NET applications, why writing unit tests is important, why “100% test coverage” isn’t necessary, how to properly structure your unit tests with the triple-A approach (AAA), when to avoid writing extra unit test helpers, and how to use tests as documentation.
Chapter 8, Catching Exceptions with Exception Handling, reviews the different types of exception handling, how and when to use exception handling, and using global exception handling. It also covers logging, how unit testing and exceptional handling are similar, why empty try..catch blocks are wasteful, how to use exception filtering and pattern matching, and knowing when to use finally blocks.
Chapter 9, Creating Better Web APIs, demonstrates various practical API techniques, such as designing, creating, and testing APIs quickly, along with applying the right HTTP verbs and status codes to an API, how to implement a pagination structure, versioning, and DTOs into your APIs, and why creating a new HttpClient
should be avoided.
Chapter 10, Push Your Application with Performance, takes everything we’ve learned throughout the chapters and applies a performance perspective to it. We’ll cover why performance is so important and why it matters, how to establish client, C# code, and database baselines, along with image optimization, minimizing requests, using CDNs, implementing async/await, how to automatically optimize HTML, Entity Framework Core optimizations, and caching strategies.
Chapter 11, Appendix, will review the fundamental terms used throughout the industry, such as the DRY, YAGNI, KISS principles, along with separation of concerns, how to refactor code, understanding the SOLID principles, and how to structure various project types in Visual Studio.