Donnerstag, 29. November 2007

Martin Fowler on Domain Specific Languages

Recently I was on Martin Fowler's site and lerned about his new - yet to be written- book about DSLs. One or two days later I found this video on InfoQ where he's giving an introduction to DSLs and is showing how the DSL representation can be intern or extern.

For his book I hope he is going really deep into the possibilities of definig DSLs with closures. I've seen some impressive builders composed with closures by the Grails folks. I'm not really sure, but closures seem a lot more powerful, easier to use and clearer to read when it comes to intern Domain Specific Languages then Java5 methods are.

But in the end of the day it all boils down to how powerful your DSL should be and what the best syntax for it is whether you use an intern language, XML or simple representation.

Update: Just today I read this post by Stephan who links to a some other blog postings related to DSLs. He tried to rewrite the Grails HTML Markup Builder in Java. And he seems to share my opinion about closures enabling more powerful DSLs.

Keine Kommentare: