Validating Portability: The Vending Machine Multi-Framework Test
One of the core philosophies of TeaQL is that business logic and data schemas should be completely decoupled from the web framework. To put this to the test, we recently conducted an end-to-end validation using our standard vending-machine-service example across the three major Java frameworks.
The results successfully demonstrated the power of declarative data models.
The Setup
We used a single vending.xml model definition, which describes a complete vending machine domain (machines, products, inventory, transactions, and orders).
We then generated three separate web applications pointing to the exact same PostgreSQL database:
005-vending-machine-web-spring-boot(Spring Boot 4.1.0)006-vending-machine-web-quarkus(Quarkus 3.8.3)007-vending-machine-web-micronaut(Micronaut 4.3.8)
A Shared Core
At the heart of the test was the java-lib-core module. Regardless of the target web framework, the core library—containing the entities, expressions, checkers, and UserContext definitions—was generated identically.
Because TeaQL encapsulates all relational and structural logic inside the generated SmartList, SearchRequest, and Expression APIs, the upper layer web applications required zero manual translation.
Framework Adaptation
The true test was adapting TeaQL's execution engine to the distinct lifecycle and dependency injection models of each framework:
- In Spring Boot, the runtime leveraged
SpringJdbcSqlExecutorwithNamedParameterJdbcTemplate. - In Quarkus, the runtime successfully utilized the framework-neutral
teaql-provider-jdbcadapter, binding natively toAgroalDataSourcevia CDI@Produces. - In Micronaut, the application wired the same JDBC adapter using
@Singletondefinitions and native HikariCP data sources.
Conclusion
All three applications compiled successfully under Java 21, connected to PostgreSQL, and managed to execute complex object-graph saves and reads without any hallucinations or manual SQL intervention.
This multi-framework capability ensures that teams adopting TeaQL are never locked into a single ecosystem. Whether you are building monolithic applications in Spring Boot or deploying lightning-fast native binaries with Quarkus, your data access layer remains pristine, consistent, and strictly aligned with your business intentions.
