Processing (the language) as a DSL

Posted by Warner Onstine on December 09, 2006

I first read about Processing in an old Wired issue (wow, finally found it, do you know how hard it is to search on “processing” on the Web? Uggh). When I first found Processing I wasn’t even thinking about DSLs (this was 3 years ago), but I know that one of my first thoughts was “Why not just use Java directly?”, but now I definitely see the light. I’ve been following the amazing work that others have been doing with Processing who have very little Java programming experience, but they know 2d and 3d graphics.

The cool thing is, is that while Processing is a DSL it is built on top of Java and can leverage any of the packages that Java has (much like Groovy can) which leads to some very interesting hardware projects. And of course, I’m also interested in Processing because I love 2d and 3d graphics and finding interesting ways to interact with them.

In short, I guess, I just wanted to point out that DSLs are everywhere, even if we didn’t see them at first, they aren’t a new idea, they’ve just been given power by naming them (much in the way that Ajax was).

Anyone have some other interesting DSLs that they’ve found?

Share and Enjoy:
  • Print
  • Digg
  • Reddit
  • del.icio.us
  • Twitter
  • Facebook
  • Google Bookmarks
  • DZone

Groovy as a DSL

Posted by Warner Onstine on December 09, 2006

Guillame Laforge (one of the Groovy programmers) posted his thoughts on using Groovy as a DSL.

With the help of closures, methods, operator overloading, adding
properties & methods to classes, with named parameters and so on, you
can quickly come up with a language of your own, a DSL, targeted at
the subject you’re dealing with.

This was in response to an article that ran on Artima “Creating DSLs with Ruby”, of which most of the examples could be easily modified to Groovy code.

The Groovy team has created a page, “Writing Domain-Specific Languages”, to showcase some of the examples of using Groovy as a DSL, which I will probably be committing more to as the Chama project continues.

Share and Enjoy:
  • Print
  • Digg
  • Reddit
  • del.icio.us
  • Twitter
  • Facebook
  • Google Bookmarks
  • DZone

Easy AdSense by Unreal