Part 3. Extending your applications
We covered a huge amount of content in parts 1 and 2: we looked at all the main functional components you’ll use to build both traditional MVC web apps and web APIs. In part 3, we look at four different topics that build on what you’ve learned so far: logging, security, custom components, and testing.
Adding logging to your application is one of those activities that’s often left until after you discover a problem in production. Adding sensible logging from the get-go will help you quickly diagnose and fix errors as they arise. Chapter 17 introduces the logging framework built in to ASP.NET Core. You’ll see how you can use it to write log messages to a wide variety of locations, whether it’s the console, a file, or a third-party remote-logging service.
Correctly securing your app is an important part of web development these days. Even if you don’t feel you have any sensitive data in your application, you have to make sure you protect your users from attacks by adhering to security best practices. In chapter 18, I describe some common vulnerabilities, how attackers can exploit them, and what you can do to protect your applications.