Chapter
Chapter 1: The SOLID Principles of Software Design
About the IDE used in this book
Other foundational changes in .NET Core
The Single Responsibility Principle (SRP)
The background of the Separation of Concerns (SoC)
Well-known examples of Separation of Concerns
A basic sample of Separation of Concerns
The Open/Closed principle
The Liskov Substitution principle
Other implementations of LSP in .NET
The Interface Segregation principle
The Dependency Inversion principle
The (more or less) canonical example
Other ways to implement Dependency Inversion
Chapter 2: Dependency Injection and IoC Containers
The Dependency Principle in more detail
Aspects of Dependency Injection
Property Injection in action
Method Injection in practice
.NET event architecture as Model Injection
Dependency Injection in other frameworks
Chapter 3: Introducing Dependency Injection in .NET Core 2.0
The main characteristics of .NET Core
The main advantages of .NET Core
Installation of .NET Core in the IDE
Installation path for .NET Core in Visual Studio 2015
.NET Core in Visual Studio 2017
Checking other dependencies in .NET Core
Dependency Injection in .NET Core
DI Architecture and Object's Lifetime
The class ActivatorUtilities and other helpers
The Microsoft.Extensions.DependencyInjection container
Checking the object's lifetime
Mapping interfaces to instance classes
The concept of Scope Applied to services
Other extensions with DI functionality
A reflection on the structure of .NET Core
Chapter 4: Dependency Injection in ASP.NET Core
ASP.NET Core from the command-line tools
Creating the minimum possible application
Changing to ASP .NET Core
The Startup class and Dependency Injection
Dependency Inversion in the architecture - OWIN
Analyzing the default template
The default Startup class
Dependency Injection in ASP.NET Core
Services provided by ASP.NET Core
The relation of services available at startup
Identifying Services in the Web Application template
Using Dependency Injection in ASP.NET MVC Views
Garbage Collection and Custom Services
Using Custom Services through Dependency Injection
Services and data management
Using Dependency Injection inside Views
Chapter 5: Object Composition
Understanding object relationships
Types of Object Composition
Contrasting features of Composition
Why are subclasses inside Composition?
Composition versus Aggregation
Advantages and disadvantages
Other important relationships
Explanation of the preceding code
Composition over Inheritance
Problem which we come across
The solution to the problem
Role of Object Composition in Dependency Injection
Composing .NET Core 2.0 Console application
Object Composition in ASP.NET Core MVC 2.0
Chapter 6: Object Lifetime
Manage the object life cycle
Managed and unmanaged resources
The IDisposable interface
Implementing the IDisposable Interface
Step1 - Basic structure of class
Step2 - Defining a Dispose Overload method
Step3 -Modifying the Dispose(bool) for Derived classes
Step 4 - Handling duplicate Dispose calls
Object lifetime management in .NET Core
Startup ConfigureServices
Relationship and dependencies among lifetimes
Singleton depending on Scoped and Transient
Scoped depending on Singleton and Transient
Transient depending on Singleton and Scoped
Patterns and principles for Interception
Benefits of the Decorator approach
Problems of the Decorator approach
Aspect-oriented programming
Aspect attached locations
Investigating Interception
Demonstration for using the Castle Windsor
Intermediate Language (IL) Weaving
Interception in ASP.NET Core
Chapter 8: Patterns - Dependency Injection
Dependency Inversion Principle
Inversion of Control (IoC)
Constructor Injection pattern
Injecting with .NET Core 2.0
Implementation inside ASP.NET Core 2.0
ControllerActivatorProvider.cs
Importance of the Constructor Injection pattern
Advantages of the Constructor Injection pattern
Disadvantages of the Constructor Injection pattern
Property Injection pattern
Advantages of the Property Injection Pattern
Disadvantages of the Property Injection Pattern
Injecting with .NET Core 2.0
Implementation inside .NET Core 2.0
MvcServiceCollectionExtensions.cs
Implementation inside .NET Core 2.0
The advantages of the Ambient Context
The disadvantages of the Ambient Context
Chapter 9: Anti-Patterns and Misconceptions on Dependency Injection
When does Dependency Injection become an anti-pattern?
Chapter 10: Dependency Injection in Other JavaScript Frameworks
Dependency Injection in TypeScript
Examples using Visual Studio 2017
Understanding the structure of AngularJS bootstrap
Data access and Dependency Injection
Summing up Dependency Injection features inside AngularJS
Microsoft's TypeScript is the preferred language in Angular 2+
Editing the initial project
The structure of the main module
The concept of a provider
Chapter 11: Best Practices and Other Related Techniques
The solution - refactoring with DI
The problem - The concrete class reference again
Misuse of business and Data Access Layer assemblies
Best practice for layered architecture
Managed Extensibility Framework (MEF)
Layers and MEF implementation
The IModuleRegistrar interface
The ModuleRegistrar class
Executing the ModuleLoader.LoaderContainer() method from Web App
What have we achieved with MEF?
All classes inside layers are now internal
No concrete class instantiation inside the UI Layer
More layers can be added to the architecture