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.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsReferences
F# data: Json type provider. http://fsharp.github.io/FSharp.Data/library/JsonProvider.html
Betten, S.: Richardson maturity model. Technical report, Fachgebiet Software Engineering, Universität Hannover (2011)
Cánovas Izquierdo, J.L., Cabot, J.: Discovering implicit schemas in JSON data. In: Daniel, F., Dolog, P., Li, Q. (eds.) ICWE 2013. LNCS, vol. 7977, pp. 68–83. Springer, Heidelberg (2013)
Eclipse.org: Xtend. http://www.eclipse.org/xtend/
Ed-Douibi, H., Izquierdo, J.L.C., Gómez, A., Tisi, M., Cabot, J.: EMF-REST: generation of restful apis from models. CoRR (2015)
Efftinge, S.: Jsonized. http://github.com/svenefftinge/jsonized
FasterXML: Jackson json processor wiki. http://wiki.fasterxml.com/JacksonHome
Fielding, R.T.: Architectural Styles and the Design of Network-based Software Architectures. Ph.D. thesis (2000)
Fowler, M.: Domain Specific Languages, 1st edn. Addison-Wesley Professional, Boston (2010)
Gerhart, M., Bayer, J., Höfner, J.M., Boger, M.: Approach to define highly scalable metamodels based on JSON. In: BigMDE 2015, p. 11 (2015)
Izquierdo, J.L.C., Cabot, J.: Composing JSON-based web APIs. In: Casteleyn, S., Rossi, G., Winckler, M. (eds.) ICWE 2014. LNCS, vol. 8541, pp. 390–399. Springer, Heidelberg (2014)
Maximilien, E.M., Wilkinson, H., Desai, N., Tai, S.: A domain-specific language for web APIs and services mashups. In: Krämer, B.J., Lin, K.-J., Narasimhan, P. (eds.) ICSOC 2007. LNCS, vol. 4749, pp. 13–26. Springer, Heidelberg (2007)
Menkudle, A., Sonawane, S., Jagtap, A.: Extracting application model from restful web services for client stub generation. Int. J. Comput. Technol. Appl. (IJCTA) 5(1), 226–232 (2014)
Rivero, J.M., Heil, S., Grigera, J., Gaedke, M., Rossi, G.: MockAPI: an agile approach supporting API-first web application development. In: Daniel, F., Dolog, P., Li, Q. (eds.) ICWE 2013. LNCS, vol. 7977, pp. 7–21. Springer, Heidelberg (2013)
Scheidgen, M.: XRAW-Easy development of REST API client libraries with Xtend. http://github.com/markus1978/xraw
Sheard, T.: Accomplishments and research challenges in meta-programming. In: Taha, W. (ed.) SAIG 2001. LNCS, vol. 2196, pp. 2–44. Springer, Heidelberg (2001)
Tavares, N., Vale, S., Luis, S., Brazil, M.: Towards interoperability to the implementation of RESTful web services: a model driven approach. In: International Conference on Systems (ICONS), pp. 234–240 (2014)
Tilkov, S.: REST und HTTP: Einsatz der Architektur des Web für Integrationsszenarien. dpunkt, Heidelberg (2009)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer International Publishing Switzerland
About this paper
Cite this paper
Scheidgen, M., Efftinge, S., Marticke, F. (2016). Metamodeling vs Metaprogramming: A Case Study on Developing Client Libraries for REST APIs. In: Wąsowski, A., Lönn, H. (eds) Modelling Foundations and Applications. ECMFA 2016. Lecture Notes in Computer Science(), vol 9764. Springer, Cham. https://doi.org/10.1007/978-3-319-42061-5_13
Download citation
DOI: https://doi.org/10.1007/978-3-319-42061-5_13
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-42060-8
Online ISBN: 978-3-319-42061-5
eBook Packages: Computer ScienceComputer Science (R0)