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.
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
Stroustrup, B.: A rationale for semantically enhanced library languages. In: LCSD 2005 (OOPSLA workshop), Rensselaer Polytechnic Institute, Computer Science Department, pp. 44–52 (2005)
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)
Deursen, A.v., Klint, P., Visser, J.: Domain-specific languages: An annotated bibliography. ACM Sigplan Notices 35, 26–36 (2000)
Fowler, M.: DSL Book WIP: Expression Builder (2008), http://martinfowler.com/dslwip/ExpressionBuilder.html
Mernik, M., Heering, J., Sloane, A.: When and How to Develop Domain-Specific Languages. ACM Computing Surveys (CSUR) 37(4), 316–344 (2005)
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)
Clarke, S.: Dr. Dobb’s Journal: Measuring API Usability (2004), http://www.ddj.com/windows/184405654
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)
CocoaDev: ClassClusters, http://www.cocoadev.com/index.pl?ClassClusters
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)
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1995)
Evans, E.: Domain-driven Design: Tackling Complexity in the Heart of Software. Addison-Wesley, Reading (2004)
Ruby on Rails, http://rubyonrails.org
Hudak, P.: Modular Domain Specific Languages and Tools. In: ICSR 1998, pp. 134–142. IEEE Computer Society, Los Alamitos (1998)
Fowler, M.: DSL Book WIP: Implementing an Internal DSL (2007), http://martinfowler.com/dslwip/InternalOverview.html
Tulach, J.: Practical API Design: Confessions of a JavaTM Framework Architect. Apress (2008)
Harrison, W., Barton, C., Raghavachari, M.: Mapping UML Designs to Java. In: OOPSLA 2000, pp. 178–187. ACM, New York (2000)
Génova, G., Del Castillo, C., Llorens, J.: Mapping UML associations into Java code. Journal of Object Technology 2, 135–162 (2003)
Eclipse Modeling - MDT - UML2, http://www.eclipse.org/modeling/mdt/?project=uml2
Keschenau, M.: Reverse engineering of UML specifications from java programs. In: OOPSLA 2004, pp. 326–327. ACM, New York (2004)
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)
Cwalina, K., Abrams, B.: Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable.NET Libraries. Addison-Wesley Professional, Reading (2005)
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 Web Toolkit, http://code.google.com/webtoolkit
openArchitectureWare, http://www.openarchitectureware.org
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)