Skip to main content

On DSLs and design patterns

Through an article on InfoQ I have come across a number of blog posts about DSLs (domain specific languages). It all starts with Joel (by now famous for his opinions on Ruby performance ;) ) who explains the rationale behind creating Wasabi, a DSL for his company's bug tracker. This software apparently has to run on VB and PHP.

InfoQ also refers to the blog "discipline and punish" (what a name) in which the author argues that DSLs are flawed due to their (or rather their creator's) inability to adapt to change - well, that's what I gather from it at least.

Personally, I am currently working for a company that has created its own DSL for describing user interfaces on mobile devices (we're not talking about simple XML, but rather a real language). These UIs need to run cross-platform (Symbian, MS Mobile, Java, etc) so the DSL really has to abstract the platform differences. So in essence, I really buy into Joel's argument that DSLs are about abstraction (I do NOT buy into his argument that Wasabi is a good idea for the reasons he describes or that creating a DSL would be not a lot of effort).

One thing that had not been covered on the DSL discussion as mentioned by InfoQ is the tools issue. If you create a DSL you either have to develop without tools (-> inefficient) or create your own tools (-> effort). For me, this is one of the reasons why I do think twice about creating a DSL and then think about it again.

And now to something completely different.

In this blog entry Mark Dominus argues that design patterns are a sign for a weakness in the language. Thought about it. Found it a brilliant observation. Agree. (and I'm sure Erich Gamma will not be happy ; )

Maybe there will always be design patterns because the mainstream general purpose languages changes so slowly (i.e. our change from one to the other). So we stick with them for a while (like a decade) until we learned enough to convert to a new general purpose language (think C, C++, Java).

Along these lines I remembered that the decorator pattern can be implemented really easily in Ruby. But still, it has to be implemented. So, maybe Ruby is not the great next thing after Java (it's just nice - which is good enough for me ;) ).

Comments

Popular posts from this blog

NoSQL talk at Developer Summit

Three days ago I had to chance to talk about NoSQL at the Internet Briefing's Developer Summit. On top of general ideas and concepts like the CAP theorem I chose to talk about Apache Jackrabbit, CouchDB and Cassandra. My slides are embedded below.
It was a really good event with interesting speakers and a knowledgeable audience. I was especially pleased that when I talked about CouchDB's HTTP API someone from the audience mentioned that Apache Sling does something very similar for Jackrabbit.
Special kudos to Christian Stocker of Liip for daring to do a live demo of the "real-time web" - he took a picture from his phone and had it pop up on Jabber and Twitter in about 5 secs.
Vlad Trifa has posted a good summary of the whole event (part 1, part 2) - he also gave a great presentation about the application of the REST architectural style to the "Web of Things".

No SqlView more presentations from mmarth.

NoSQL: A long-time relation(ship) comes to an end

(cross-posting from here)

OK, I admit it, declaring that "the RDBMS is dead" is a meme that has been going around the software industry for a while. Remember object-oriented data bases that were supposed to replace the relational ones? Well, guess who is still here. However, despite the RDBMS's amazing survival skills I would like to propose a related prediction:

I believe that the year 2009 will go down in history as the year when the "relational model default" ended. The term "relational model default" was coined by me to describe a peculiar thing that goes on in application development: start talking to your average application developer about some arbitrary business requirement and chances are that simultaneously he mentally constructs a relational model to fit those requirements.
That relational approach to modeling your problem may or may not be suitable. The real problem is that all too often this default does not get challenged. As a consequence,…