Inversion of control and dependency injection in mobile apps
In software development, IoC and dependency injection solve many problems. In the world of mobile development, specifically multi-platform mobile development, they provide a great pattern to handle platform and device-specific code. One of the most important aspects to multi-platform mobile development is the idea of sharing code. Not only does development become easier and quicker when code can be shared across apps and platforms, but also maintenance, management, feature parity, and so on. However, there are always parts of an application's codebase that simply cannot be shared due to its strict tie in with the platform's APIs. In most cases, an app's user interface represents a large portion of this non-sharable code. It is because of this that the MVVM pattern makes so much sense in multi-platform mobile development—it forces the separation of user interface code (Views) into individual platform-specific libraries, making it...