strategy pattern
[/ˈstrætədʒi ˈpætərn/]
nounpl: strategy patterns
padrão de estratégia
1. A behavioral design pattern that defines a family of algorithms, encapsulates each one, and makes them interchangeable, allowing the algorithm to vary independently from clients that use it
The shopping cart uses the strategy pattern to select different payment methods at checkout.
O carrinho de compras usa o padrão de estratégia para selecionar diferentes métodos de pagamento no checkout.
2. A software design technique that enables selecting an algorithm's behavior at runtime rather than at compile time
By implementing the strategy pattern, the application can switch between sorting algorithms without modifying the core code.
Ao implementar o padrão de estratégia, a aplicação pode alternar entre algoritmos de classificação sem modificar o código principal.
The strategy pattern is fundamental in object-oriented programming and is widely taught in software engineering courses across Brazil and the USA. It's a cornerstone concept in frameworks like Spring (Java) and Django (Python), making it essential terminology for developers in both countries. The term is typically used in English in professional settings, but Portuguese translations are becoming more common in educational contexts in Brazil.
Look up more words on Fala2Me
The free English-Portuguese dictionary with real Brazilian accents, NYC slang, conjugator and more
Open Fala2Me →