Preface
Welcome to ASP.NET 8 Best Practices!
ASP.NET 8 Best Practices contains over 100 best practices used in the ASP.NET community, covering topics such as how to squeeze the best performance out of your ASP.NET web application, what Entity Framework patterns are available, how to design a minimal web API, and how to structure Visual Studio projects based on project type.
The standards covered in the book include version control, creating software pipelines, creating structured middleware, security practices, Entity Framework Core patterns and techniques, and automating time-consuming client-side tasks.
We’ll also look at common practices when testing your code, when and how to apply exception handling, how to design the best API for web applications, how to optimize a web application for performance, and finally, review common terms and guidelines when building ASP.NET web applications.
While best practices are considered recommendations on how to write professional code, there will always be exceptions to the rule. As developers know, there are so many ways to write code to achieve the same result. Some ways are better than others. These “better ways” are what I consider best practices.
As we cover each topic, we’ll provide as much detail and referral material to explain why these techniques and patterns are indeed a better way to write professional code. However, it doesn’t mean they are written in stone. As mentioned previously, there will always be exceptions to the rule.
To new developers entering the ASP.NET ecosystem, it can be overwhelming to build a new ASP.NET website and see everything associated with the process. This book is meant to lessen the feeling of being overwhelmed by understanding each technology “spoke” attached to an ASP.NET website “hub.” It explores everything involved in creating a “simple” website.
To seasoned developers already using ASP.NET, use this book as a reference for recommendations and the observations I’ve gathered over a 20-year career. Even my experiences with past and present colleagues are included in this book.