Abstract
Model-driven software development (MDSD) is gaining access to the software development market, even if some of our colleagues are still reluctant to techniques like code generation from models and model transformations. Convincing the skeptics can be done by showing how and when to apply MDSD in the right way. This paper is a case study on applied MDSD, with a focus on code generation. We describe in detail how to generate code for a large model base, and how this increases flexibility and reduces development time. We explain in detail several templates for generating a C#-API from Ecore models, including event propagation and serialization code. Additionally, we show how to model additional features for existing models, and how to combine models using the C#-feature of partial classes for the generation of code, allowing us to merge stable models with ad-hoc extensions.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Kleppe, A.G., Warmer, J., Bast, W.: MDA Explained: The Model Driven Architecture: Practice and Promise. Addison-Wesley, Boston (2007)
Norton, D., Feiman, J., MacDonald, N., Pezzini, M., Natis, Y.V., Sholler, D., van der Heiden, G., Karamouzis, F., Young, A., James, G.A., Knipp, E., Duggan, J., Murphy, T.E., Valdes, R., Blechar, M., Driver, M., Young, G., Vining, J., Knox, R.E., Feinberg, D., Hart, T.J., Patrick, C., Forsman, J., Basso, M., Simpson, R., Adachi, Y., Clark, W., King, M.J., Hill, J.B., Gootzit, D., Bradley, A., Kenney, L.F., Stang, D.B.: Hype Cycle for Application Development, 2009. Technical report, Gartner, Inc. (2009)
Steinberg, D., Budinsky, F., Paternosto, M., Merks, E.: EMF: Eclipse Modeling Framework, 2nd edn. Addison-Wesley Professional, Reading (2008)
openArchitectureWare.org: oAW Homepage. Website (2009), http://www.openarchitectureware.org
The Eclipse Foundation: Eclipse Modeling Project. Website (2010), http://www.eclipse.org/modeling
ServFace Consortium: ServFace Project Website (2010), http://www.servface.eu
Feldmann, M., Janeiro, J., Nestler, T., Hübsch, G., Jugel, U., Preußner, A., Schill, A.: An Integrated Approach for Creating Service-Based Interactive Applications. In: Gross, T., Gulliksen, J., Kotzé, P., Oestreicher, L., Palanque, P., Prates, R.O., Winckler, M. (eds.) INTERACT 2009. LNCS, vol. 5727, pp. 896–899. Springer, Heidelberg (2009)
Janeiro, J., Preußner, A., Springer, T., Schill, A., Wauer, M.: Improving the development of service-based applications through service annotations. In: Proceedings of IADIS WWW/Internet 2009 (2009)
Feldmann, M., Nestler, T., Hübsch, G., Muthmann, K., Jugel, U., Schill, A.: Overview of an End user enabled Model-driven Development Approach for Interactive Applications based on Annotated Services. In: IEEE ECOWS Workshop on Emerging Web Services Technology, WEWST 2009 (2009)
Bihler, R., Schöttle, J.: Eclipse Modeling Framework for.Net (EMF4Net). Website (2009), http://www.emf4net.org
The Eclipse Foundation: Eclipse Modeling - M2T. Website (2009), http://www.eclipse.org/modeling/m2t
The Apache Software Foundation: Apache Velocity Site. Website (2009), http://velocity.apache.org
The Eclipse Foundation: MOFScript Home page. Website (2010), http://www.eclipse.org/gmt/mofscript
Albert, M., Muñoz, J., Pelechano, V., Pastor, Ó.: Model to Text Transformation in Practice: Generating Code from Rich Associations Specifications. In: Roddick, J., Benjamins, V.R., Si-said Cherfi, S., Chiang, R., Claramunt, C., Elmasri, R.A., Grandi, F., Han, H., Hepp, M., Lytras, M.D., Mišić, V.B., Poels, G., Song, I.-Y., Trujillo, J., Vangenot, C. (eds.) ER Workshops 2006. LNCS, vol. 4231, pp. 63–72. Springer, Heidelberg (2006)
IBM Corporation and others: Eclipse SDK Help: InternalEObject.eURIFragmentSegment. Website (2006), http://help.eclipse.org/galileo/topic/org.eclipse.emf.doc/references/javadoc/org/eclipse/emf/ecore/InternalEObject.html
Sun Microsystems, Inc.: Hudson-CI. Website (2009), http://hudson-ci.org
openArchitectureWare.org: oAW Screencasts. Website (2008), http://www.openarchitectureware.org/staticpages/index.php/oaw_screencasts
IBM Corporation and others: EMF Javadoc: Package org.eclipse.emf.ecore. Website (2006), http://download.eclipse.org/modeling/emf/emf/javadoc/2.5.0/org/eclipse/emf/ecore/package-summary.html
Jugel, U.: Generating Smart Wrapper Libraries for Arbitrary APIs. In: van den Brand, M., Gašević, D., Gray, J. (eds.) SLE 2009. LNCS, vol. 5969, pp. 354–373. Springer, Heidelberg (2010)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Jugel, U., Preußner, A. (2011). A Case Study on API Generation. In: Kraemer, F.A., Herrmann, P. (eds) System Analysis and Modeling: About Models. SAM 2010. Lecture Notes in Computer Science, vol 6598. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-21652-7_10
Download citation
DOI: https://doi.org/10.1007/978-3-642-21652-7_10
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-21651-0
Online ISBN: 978-3-642-21652-7
eBook Packages: Computer ScienceComputer Science (R0)