Useful architectural patterns
Xamarin.Forms, as a framework, contains modules that help developers implement well-known architectural patterns so that they can create maintainable and robust applications. In this section, we will take a closer look at some of the most prominent architectural/design patterns; that is, Inversion of Control, event aggregator, and decorator.
Inversion of Control
IoC is a design principle in which the responsibility of selecting concrete implementations for the dependencies of a class is delegated to an external component or source. This way, the classes are decoupled from their dependencies so that they can be replaced/updated without much hassle.
The most common implementation of this principle is using the service locator pattern, where a container is created to store the concrete implementations. This is often registered via an appropriate abstraction, as shown in the following diagram: