The Xamarin.Forms DependencyService versus third-party alternatives
In addition to providing the core building blocks for the MVVM pattern, Xamarin.Forms also includes a very basic service to handle dependency registration and resolution, the DependencyService. We actually used this service in the preceding chapter to register and resolve our custom navigation service. Like many of the services and components built into the Xamarin.Forms toolkit, the DependencyService is designed to help get users up and running quickly by providing an easy-to-use basic implementation. It is in no way the only way of handling dependencies in a Xamarin.Forms mobile app and, in most complex apps, you will quickly outgrow the capabilities of the Xamarin.Forms DependencyService. For example, the Xamarin.Forms DependencyService doesn't provide a way of doing constructor injection. There are several third-party alternatives to the DependencyService that allow much greater flexibility, such as Autofac, TinyIoC...