By reboltutorial
via infoq.com
Published: Jul 19 2009 / 07:41
I like Martin Fowler's Common Sense which seems always lacking like POJO vs EJB, now it's time for DSL vs Mammouth Frameworks. He asserts:
"larger frameworks like Hibernate, Struts, ADO present as much of a challenge to learn as a language even if you program them in a single host language." Moreover, expressing needs in the host language might be rather difficult and result in creation of awkward configuration files "which are effectively external DomainSpecificLanguages written in XML".
Embedding DSLs instead of using libraries could be a more appropriate solution. Martin makes the observatoin that "an API is like declaring a vocabulary, a DSL adds a grammar which allows to write coherent sentences." Hence, using DSLs instead of frameworks could be more expressive offering "better ways of manipulating our abstractions" and making it "easier to see what we've written and to reveal our intentions."
Comments
reboltutorial replied ago:
This is how you can Create your own DSL for Java or C# in only 15 minutes:
part 4: adding a Semantic Layer
http://www.dzone.com/links/create_your_own_dsl_for_java_or_c_adding_a_semant.html
MCII replied ago:
Designing a DSL is hard and requires much domain knowledge and technical expertise. Your '15 minutes' will cost you many man-days later. This is what Fowler forgot to mention.
yardena replied ago:
those who don't have "much domain knowledge and technical expertise" should not design libraries, or better yet - anything at all.
ceaseoleo replied ago:
in some areas i have to agree with fowler, and say that using the language that will get the job done, but the reason for uniformity is that any programmer with that skill set can jump in and be productive, vs having a java programmer learn haskell, and ruby and x other languages that you mixed and matched.
Voters For This Link (12)
Voters Against This Link (0)