BT

Evolving Embedded Domain Specific Languages in Java

by Rob Thornton on Jan 02, 2007 |

Steve Freeman and Nat Pryce presented a paper on Evolving an Embedded Domain-Specific Language in Java at OOPSLA 2006. The paper describes the evolution of jMock from a framework to a domain specific language embedded in Java. They describe how it happened, lessons learned about EDSLs, their limits, and how Java and C# work as host languages for them.

Freeman and Pryce describe DSLs and their benefits and how EDSLs are common in lanugages with small syntaxes (Haskell, Lisp, Smalltalk) but are harder to hit into large syntax languages such as Java. They then describe the previous incarnations of jMock as it developed from mockobjects.com, dynamock, and now jMock. They detail their lessons learned from each step on the evolutionary ladder. Then there is a detailed discussion of jMock and many of the design decisions they made.

They list some conclusions at the end, including the need to make sure a framework always works well in a modern IDE, that scaling EDSLs into complex languages may not be a good idea as the complex cases make the code harder to read, and that for the most part, it is too hard to extend conventional host languages.

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT