Wednesday, September 9, 2009

DSL - love or hate?

recently I started to work more with DSL's (domain specific language) since I wanted to go away from doing everything in XML.

The approach of XML is great, but I'm not a big fan of the overhead with it.

So the first approach was to create a DSL for the BinBase system, precisely to provide the user with a really simple way of calculating an experiment.

It should look something like this:

* our quantification dsl
quantify {

//define the name of the setup
name "quantification for ${new Date()}"

//define the samples for the calculations
sample "sample 1"
sample "sample 2"
sample "sample 3"
sample "sample 4"
sample "sample 5"
sample "sample 6"
sample "sample 7"
sample "sample 8"
sample "sample 9"
sample "sample 10"

//defines the bins in the table
bin 321, 22.0
bin 322
bin 323
bin 324
bin 325, 22.0

//report definition
report {

sizeDown 50

format "xls"

replace true

And the result should calculate the data, send them to the cluster and generates a quantification report. If this all works out the way we want it. We will than adapt it to schedule BinBase experiment's this way.

My current fazit is that I love the idea of DSL's, but hate the implementations of it.

No comments:

Post a Comment