constructor parameter injection
[/kənˈstrʌktər ˈpærəmɪtər ɪnˈdʒɛkʃən/]
nounpl: constructor parameter injections
injeção de parâmetro de construtor
1. A software design pattern in which dependencies are provided to a class through its constructor parameters rather than being created internally or retrieved from a global context
Constructor parameter injection makes unit testing easier because you can pass mock objects to the constructor.
A injeção de parâmetro de construtor facilita os testes unitários porque você pode passar objetos mock para o construtor.
2. A form of dependency injection that explicitly declares all required dependencies as constructor arguments, promoting loose coupling and explicit dependency declaration
The service uses constructor parameter injection to receive its database connection and logger instances.
O serviço usa injeção de parâmetro de construtor para receber suas instâncias de conexão de banco de dados e logger.
Constructor parameter injection is a fundamental pattern in modern software development, especially within the Java and C# communities. It became particularly prominent with frameworks like Spring Framework in Java and dependency injection containers in .NET. The pattern emphasizes clean code principles and is strongly recommended in SOLID design principles, making it a standard practice in enterprise software development in both Brazil and the USA.
Look up more words on Fala2Me
The free English-Portuguese dictionary with real Brazilian accents, NYC slang, conjugator and more
Open Fala2Me →