Metamodeling vs Metaprogramming: A Case Study on Developing Client Libraries for REST APIs

| 0 comments

Abstract—Web-services with REST APIs comprise the majority of the programmable web. To access these APIs more safely and conveniently, language specific client libraries can hide REST details behind regular programming language idioms. Manually building such libraries is straightforward, but tedious and error prone. Fortunately, model-based development provides different methods to automate their development. In this paper, we present our experiences with two opposing approaches to describe existing REST APIs and to generate type-safe client side Java libraries from these descriptions. First, we use an EMF-metamodel and a code generator (external DSL). Secondly, we use the Java compatible language Xtend and its metaprogramming mechanism active annotations, which allows us to alter the semantics of existing Xtend constructs to describe REST APIs within Xtend (internal DSL). Furthermore, we present related approaches and discuss our findings comparatively.

KeywordsEMF, Xtend, REST

Presentation

Download Paper
xraw at GitHub

BibTex

@inproceedings{DBLP:conf/ecmdafa/ScheidgenEM16,
  author    = {Markus Scheidgen and
               Sven Efftinge and
               Frederik Marticke},
  title     = {Metamodeling vs Metaprogramming: {A} Case Study on Developing Client
               Libraries for {REST} APIs},
  booktitle = {Modelling Foundations and Applications - 12th European Conference,
               {ECMFA} 2016, Held as Part of {STAF} 2016, Vienna, Austria, July 6-7,
               2016, Proceedings},
  pages     = {205--216},
  year      = {2016},
  crossref  = {DBLP:conf/ecmdafa/2016},
  url       = {http://dx.doi.org/10.1007/978-3-319-42061-5_13},
  doi       = {10.1007/978-3-319-42061-5_13},
  timestamp = {Thu, 23 Jun 2016 13:59:24 +0200},
  biburl    = {http://dblp.uni-trier.de/rec/bib/conf/ecmdafa/ScheidgenEM16},
  bibsource = {dblp computer science bibliography, http://dblp.org}
}

@proceedings{DBLP:conf/ecmdafa/2016,
  editor    = {Andrzej Wasowski and
               Henrik L{\"{o}}nn},
  title     = {Modelling Foundations and Applications - 12th European Conference,
               {ECMFA} 2016, Held as Part of {STAF} 2016, Vienna, Austria, July 6-7,
               2016, Proceedings},
  series    = {Lecture Notes in Computer Science},
  volume    = {9764},
  publisher = {Springer},
  year      = {2016},
  url       = {http://dx.doi.org/10.1007/978-3-319-42061-5},
  doi       = {10.1007/978-3-319-42061-5},
  isbn      = {978-3-319-42060-8},
  timestamp = {Thu, 23 Jun 2016 13:57:01 +0200},
  biburl    = {http://dblp.uni-trier.de/rec/bib/conf/ecmdafa/2016},
  bibsource = {dblp computer science bibliography, http://dblp.org}
}

Leave a Reply

Required fields are marked *.