The Artima Developer Community
Sponsored Link

Java Buzz Forum
Alex Miller: Implementing Domain Specific Languages in Java

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Weiqi Gao

Posts: 1808
Nickname: weiqigao
Registered: Jun, 2003

Weiqi Gao is a Java programmer.
Alex Miller: Implementing Domain Specific Languages in Java Posted: Oct 13, 2006 8:30 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Weiqi Gao.
Original Post: Alex Miller: Implementing Domain Specific Languages in Java
Feed Title: Weiqi Gao's Weblog
Feed URL: http://www.weiqigao.com/blog/rss.xml
Feed Description: Sharing My Experience...
Latest Java Buzz Posts
Latest Java Buzz Posts by Weiqi Gao
Latest Posts From Weiqi Gao's Weblog

Advertisement

Alex Miller from BEA Systems gave a presentation on domain specific languages at the St. Louis JUG yesterday.

Alex started by showing examples of several DSLs: regular expression, SQL, chess notation, needlework pattern notation, etc.

Some of the common properties of all of the DSLs shown are: compact, concise, having an implied context, assumption of domain knowledge, etc.

He then showed the pros and cons of introducing a DSL into a product. Both the pros and cons are consequences of the shared properties of DSLs.

He then introduced ways by which a DSL is implemented:

  • through what Martin Fowler calls Fluent Interfaces
  • using a scripting language like the BeanShell
  • writing a parser yourself (either by hand or using a parser generator like Antlr)

Examples and implementations of a DSL for chart generation using the JFreeChart library in all three shades are shown.

There are some memorable quotes from the talk:

  • If you look at a fluent interface from an API design point of view, they are terrible APIs
  • (Of writing a parser, Terence Parr said) why do it by hand in five days when you can automate it in three years
  • JavaCC has gone through too many hands in the past 10 years before landing in the spot on Java.net, while Terence has been doing nothing but Antlr during the same time. I wouldn't recommend JavaCC at this point


I started a mini-debate during the Q&A portion of the meeting by asking the "Spring+Hibernate" vs. "Java EE 5/EJB 3" question. It went off on multiple tangents (Struts being legacy, AJAX being tricky, etc.) but I did see one committed Hibernate believer in Kyle Cordes and one committed Spring believer in Jeff Grigg. Jeff Brown pointed out (when I asked him before the meeting) the two are not mutually exclusive: you can use both Spring and Hibernate in a Java EE 5 container, and your EJB 3 implementation may very well be Hibernate itself.

But Web 2.0 (Dojo, Prototype, AJAX, etc.) is the future.

Read: Alex Miller: Implementing Domain Specific Languages in Java

Topic: Antmod 1.3.2 Previous Topic   Next Topic Topic: [Oct 10, 2006 10:11 PDT] 14 Links

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use