Home // SOFTENG 2016, The Second International Conference on Advances and Trends in Software Engineering // View article


Exploring the Scala Macro System for Compile Time Model-Based Generation of Statically Type-Safe REST Services

Authors:
Filipe R. R. Oliveira
Hugo Sereno Ferreira
Tiago Boldt Sousa

Keywords: Model-Driven Engineering; REST; Internal DSL; Scala Macros

Abstract:
Representational State Transfer (REST) is a prolific architectural style among modern Web services, mainly due to its better performance, scalability and simplicity. A common usage of the style includes services that implement CRUD (Create, Read, Update, and Delete) operations for entities of a model. Most frameworks that do this automatically, apply the models logic in run-time usually using reflection or in-memory data structures, and are written in dynamically typed programming languages. Such technical choices usually hinder two software quality attributes: performance (due to run-time adaptation) and maintainability (due to absence of compile-time guarantees). This paper studies the impact of interpreting the models at compile-time with statically typed programming languages, using Scala as a representative. Based on a generic architecture, we implemented a proof of concept, called the Metamorphic framework, which uses a Domain Specific Language (DSL), supported by a macro system, to generate entire applications. Evaluation was executed by performing both quantitative benchmarks and qualitative analysis of Metamorphic against other frameworks.

Pages: 95 to 101

Copyright: Copyright (c) IARIA, 2016

Publication date: February 21, 2016

Published in: conference

ISSN: 2519-8394

ISBN: 978-1-61208-458-9

Location: Lisbon, Portugal

Dates: from February 21, 2016 to February 25, 2016