Authors: Pooja Sharma, Rohit Kumar
Abstract: Dependency Injection (DI) has become a fundamental design pattern in modern Android application development due to its ability to improve modularity, testability, scalability, and maintainability of software systems. As Android applications grow in size and complexity, managing object creation and dependencies manually often leads to tightly coupled code, increased boilerplate, and difficulties in testing and maintenance. Dagger, a compile-time dependency injection framework developed by Google, addresses these challenges by providing a powerful and efficient DI solution. However, Dagger’s steep learning curve and verbose configuration can be overwhelming for developers, especially beginners. To simplify this process, Google introduced Hilt, a higher-level dependency injection library built on top of Dagger, specifically designed for Android. This paper provides a comprehensive study of dependency injection concepts, the architecture and working principles of Dagger and Hilt, their components, scopes, lifecycle integration, advantages, limitations, and real-world use cases. A comparative analysis is also presented to highlight the evolution from manual DI to Dagger and further to Hilt. The paper aims to serve as an academic and practical reference for students, researchers, and Android developers seeking to understand and implement modern dependency injection techniques effectively.
Keywords: Dependency Injection, Android Development, Dagger, Hilt, Inversion of Control, Software Architecture
Full Issue
| View or download the full issue | PDF 52-60 |