On the Use of Metaprogramming and Domain Specific Languages: An Experience Report in the Logistics Domain - Costa, Pedro Henrique Teixeira; Canedo, Edna Dias; Bonifácio, Rodrigo (Anais do Simpósio Brasileiro de Componentes, Arquiteturas e Reutilização de Software (SBCARS), 2018)
In this paper we present the main design and architectural decisions to build an enterprise system that deals with the distribution of equipment to the Brazilian Army. The requirements of the system are far from trivial, and we have to conciliate the need to extract business rules from the source code (increasing software flexibility) with the requirements of not exposing the use of declarative languages to use a rule-based engine and simplifying the tests of the application. Considering these goals, we present in this paper a seamless integration of meta-programming and domain-specific languages. The use of meta-programming allowed us to isolate and abstract all definitions necessary to externalize the business rules that ensure the correct distribution of the equipment through the Brazilian Army unities. The use of a domain specific language simplified the process of writing automatic test cases related to our domain. Although our architecture targets the specific needs of the Brazilian Army, we believe that logistic systems from other institutions might also benefit from our technical decisions.