A Case Study on API Generation

  • Uwe Jugel
  • André Preußner
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6598)


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.


code generation model-driven software development serialization persistence case study 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Kleppe, A.G., Warmer, J., Bast, W.: MDA Explained: The Model Driven Architecture: Practice and Promise. Addison-Wesley, Boston (2007)Google Scholar
  2. 2.
    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)Google Scholar
  3. 3.
    Steinberg, D., Budinsky, F., Paternosto, M., Merks, E.: EMF: Eclipse Modeling Framework, 2nd edn. Addison-Wesley Professional, Reading (2008)Google Scholar
  4. 4. oAW Homepage. Website (2009),
  5. 5.
    The Eclipse Foundation: Eclipse Modeling Project. Website (2010),
  6. 6.
    ServFace Consortium: ServFace Project Website (2010),
  7. 7.
    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)CrossRefGoogle Scholar
  8. 8.
    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)Google Scholar
  9. 9.
    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)Google Scholar
  10. 10.
    Bihler, R., Schöttle, J.: Eclipse Modeling Framework for.Net (EMF4Net). Website (2009),
  11. 11.
    The Eclipse Foundation: Eclipse Modeling - M2T. Website (2009),
  12. 12.
    The Apache Software Foundation: Apache Velocity Site. Website (2009),
  13. 13.
    The Eclipse Foundation: MOFScript Home page. Website (2010),
  14. 14.
    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)CrossRefGoogle Scholar
  15. 15.
    IBM Corporation and others: Eclipse SDK Help: InternalEObject.eURIFragmentSegment. Website (2006),
  16. 16.
    Sun Microsystems, Inc.: Hudson-CI. Website (2009),
  17. 17. oAW Screencasts. Website (2008),
  18. 18.
    IBM Corporation and others: EMF Javadoc: Package org.eclipse.emf.ecore. Website (2006),
  19. 19.
    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)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Uwe Jugel
    • 1
  • André Preußner
    • 1
  1. 1.SAP Research Center DresdenDresdenGermany

Personalised recommendations