Skip to main content

Generating Smart Wrapper Libraries for Arbitrary APIs

  • Conference paper
Software Language Engineering (SLE 2009)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 5969))

Included in the following conference series:

Abstract

“Library design is language design” [1]. The development of a smart program library is very similar to the creation of a domain specific language (DSL). Both are currently created in an ad-hoc manner, taking account of best practices and software patterns. Creating new languages and the tools needed to integrate them can be very cumbersome. We propose a reproducible, model-driven methodology to add automation to the DSL-creation process. Our novel approach presents an easy way to design and generate smart, API-wrapping libraries, similar to internal DSLs. These libraries increase the usability of an existing API and can be easily integrated into existing software development tool chains. To generate these DSLs, we propose an enhanced code generation that applies usability-enhancing software patterns. Our current generator leverages the Expression Builder pattern, which is described in detail. We validate our methodology and our enhanced code generation by applying it to Java APIs resulting in smart Java libraries that we call “dotLings”.

Acknowledgement. This work is partially sponsored by the European Commission, in the course of the ServFace project as part of the Seventh Framework Programme.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Stroustrup, B.: A rationale for semantically enhanced library languages. In: LCSD 2005 (OOPSLA workshop), Rensselaer Polytechnic Institute, Computer Science Department, pp. 44–52 (2005)

    Google Scholar 

  2. Visser, E.: WebDSL: A case study in domain-specific language engineering. In: Lämmel, R., Visser, J., Saraiva, J. (eds.) GTTSE 2007. LNCS, vol. 5235, pp. 291–373. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  3. Deursen, A.v., Klint, P., Visser, J.: Domain-specific languages: An annotated bibliography. ACM Sigplan Notices 35, 26–36 (2000)

    Article  Google Scholar 

  4. Fowler, M.: DSL Book WIP: Expression Builder (2008), http://martinfowler.com/dslwip/ExpressionBuilder.html

  5. Mernik, M., Heering, J., Sloane, A.: When and How to Develop Domain-Specific Languages. ACM Computing Surveys (CSUR) 37(4), 316–344 (2005)

    Article  Google Scholar 

  6. Consel, C., Marlet, R.: Architecturing Software Using A Methodology for Language Development. In: Palamidessi, C., Meinke, K., Glaser, H. (eds.) ALP 1998 and PLILP 1998. LNCS, vol. 1490, pp. 170–194. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  7. Clarke, S.: Dr. Dobb’s Journal: Measuring API Usability (2004), http://www.ddj.com/windows/184405654

  8. Ellis, B., Stylos, J., Myers, B.: The Factory Pattern in API Design: A Usability Evaluation. In: ICSE 2007, pp. 302–312. IEEE Computer Society, Los Alamitos (2007)

    Google Scholar 

  9. CocoaDev: ClassClusters, http://www.cocoadev.com/index.pl?ClassClusters

  10. Amyot, D., Farah, H., Roy, J.F.: Evaluation of Development Tools for Domain-Specific Modeling Languages. In: Gotzhein, R., Reed, R. (eds.) SAM 2006. LNCS, vol. 4320, pp. 183–197. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  11. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1995)

    Google Scholar 

  12. Evans, E.: Domain-driven Design: Tackling Complexity in the Heart of Software. Addison-Wesley, Reading (2004)

    Google Scholar 

  13. Ruby on Rails, http://rubyonrails.org

  14. Hudak, P.: Modular Domain Specific Languages and Tools. In: ICSR 1998, pp. 134–142. IEEE Computer Society, Los Alamitos (1998)

    Google Scholar 

  15. Fowler, M.: DSL Book WIP: Implementing an Internal DSL (2007), http://martinfowler.com/dslwip/InternalOverview.html

  16. Tulach, J.: Practical API Design: Confessions of a JavaTM Framework Architect. Apress (2008)

    Google Scholar 

  17. Harrison, W., Barton, C., Raghavachari, M.: Mapping UML Designs to Java. In: OOPSLA 2000, pp. 178–187. ACM, New York (2000)

    Chapter  Google Scholar 

  18. Génova, G., Del Castillo, C., Llorens, J.: Mapping UML associations into Java code. Journal of Object Technology 2, 135–162 (2003)

    Google Scholar 

  19. Eclipse Modeling - MDT - UML2, http://www.eclipse.org/modeling/mdt/?project=uml2

  20. Keschenau, M.: Reverse engineering of UML specifications from java programs. In: OOPSLA 2004, pp. 326–327. ACM, New York (2004)

    Chapter  Google Scholar 

  21. Sutton, A., Maletic, J.I.: Recovering UML class models from C++: A detailed explanation. In: WCRE 2005. Inf. Softw. Technol., vol. 49, pp. 212–229. Butterworth-Heinemann (2005)

    Google Scholar 

  22. Cwalina, K., Abrams, B.: Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable.NET Libraries. Addison-Wesley Professional, Reading (2005)

    Google Scholar 

  23. Host, E.W., Ostvold, B.M.: The Programmer’s Lexicon, Volume I: The Verbs. In: SCAM 2007, pp. 193–202. IEEE Computer Society, Los Alamitos (2007)

    Google Scholar 

  24. Google Web Toolkit, http://code.google.com/webtoolkit

  25. openArchitectureWare, http://www.openarchitectureware.org

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Jugel, U. (2010). Generating Smart Wrapper Libraries for Arbitrary APIs. In: van den Brand, M., Gašević, D., Gray, J. (eds) Software Language Engineering. SLE 2009. Lecture Notes in Computer Science, vol 5969. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-12107-4_24

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-12107-4_24

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-12106-7

  • Online ISBN: 978-3-642-12107-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics