Claudio Perrone's Monologues

Personal and professional transformations in an agile .NET world
posts - 22, comments - 42, trackbacks - 407

Tech-Ed and Domain Specific Languages

Wednesday’s session about the DSL tools for Model-Driven Development in VS2005 was truly fascinating. Actually, I think that it justifies the investment of my trip across the Atlantic alone!

After illustrating that domain specific languages are ways to improve effectiveness in communication, Jochen Seemann literally blew my mind by demonstrating what can be done today with the CTP release version of the upcoming Microsoft Domain-Specific Language (DSL) Tools.

This SDK allows you to easily build a graphical designer hosted by Visual Studio 2005 that is able to provide support for a custom domain-specific language.

What does it mean? Once the designer is built, a user can instantiate the designer, drag custom shapes from the toolbox, connect those shapes together (with validation support according to the language rules) and use the template engine to generate code/artifacts!

Building a DSL designer requires several steps, which basically involve the definition of:

  • the elements of our domain in a domain model (classes and relationships)
  • the notational elements (shapes and connectors) for the business entities
  • the legal rules (validation/constraints) from a notational perspective, and the mapping of the notation to the elements of our domain.

Once the designer is built and instantiated we can use template-based generators to generate artifacts from our model (e.g. code, HTML, XML, WordML, etc). The templates have a notation similar to CodeSmith or classic ASP, and in the future some form of Intellisense (to query the model) is likely to be provided.

Some of these steps currently require the editing of an XML file. However Jochen said that this is really an “alpha” version of the toolkit and that better support will be provided in further iterations (indeed, the textual generator engine, code named T4, is only 6 weeks old!).
He plans to release incremental versions of the toolkit every 2-3 months, maybe even after version 1.0 will be shipped.

Currently I have only a few random observations/considerations on DSL designers that I want to dump here for my reference and eventually refine in future posts as I become more experienced in this field:

  • We can build multiple designers to generate different parts in our systems, so we can (and probably should) start small.
  • 2-Way synchronization (e.g. graphical model – to generated code – back to graphical model) is probably not going to be provided with version 1.0. It is a difficult problem to solve and I agree with Jochen's pragmatism that it would be a fundamental feature only in a relatively small number of cases.
  • Template/designer versioning and deployment are going to be difficult issues. We will need a defined structure and guidelines to avoid dealing with a total mess.
  • A DSL designer is likely to work effectively in areas when the domain entities are very well understood. I can see how the use of a ubiquitous language would be core in this context.
  • DSL designers could be used for requirements; however I have some reservation in this direction as the domain model is likely to be refined and changed way too quickly in a real world scenario. Use cases, CRC cards, and UML drafts are still likely to be my preferred option in the short term. I might be totally wrong on this, and I hope somebody can change my ideas soon (any volunteers?).
  • There is a space for graphic tools and a space for code. A guy asked if Microsoft was going to provide basic notational elements that would give us very fine grained control capabilities (ifs, whiles etc). I think that writing code using shapes is insane. This is not a new idea (companies have been trying for years to propose solutions in this direction) but when you get pages and pages of icons you quickly realize that you are in the wrong space.
  • Code generation driven by a designer is very cool. However writing templates is a pain and it feels like going back to messy scripting languages.
  • Aspect Orientation could have a major role in this type of development. You add an attribute to a shape and (with the right template) your code magically gets to be generated. Jochen is not totally convinced by the feasibility of the AO approach as many people got burned. After talking to the guys in Avanade, however, I’ll be willing to take a serious shot in my problem space.
  • It will be fundamental to maintain a clear separation between generated code and custom code. Use of partial classes that can be regenerated would be an option, separate classes and aggregation/inheritance another. 
  • I wish we could have several injection points in the designer and even a link to MSBuild, so that separate tasks could be executed upon code generation.

I hope this post gave you a sense of what this technology can provide. As I said at the beginning, I’ve been totally fascinated by it.
Finally let me just say that this technology gave me a fantastic idea that promises to provide an incredibly elegant solution to a huge problem in Innerworkings’ domain. Unfortunately I’m only teasing you guys because I can’t tell you what it is, as probably Fran (my CEO) would literally kill me if I did :-)

Print | posted on Friday, June 10, 2005 6:37 PM |

Feedback

Gravatar

# My June Backlog - Software Factories Stuff


On Language Workbenches:

Martin Fowler’s original post x and additional readings x
Brad Appleton’s...
7/5/2005 1:17 AM | Rob Caron's Blog
Gravatar

# Clipcode-GoF-DSL and the One-To-One Mapping Anti-Pattern

8/29/2005 2:15 PM | Chris Breisch
Gravatar

# Clipcode-GoF-DSL and the One-To-One Mapping Anti-Pattern

Last week Eamon O'Tuathail of Clipcode released a Domain Specific Language (DSL) for some of the Gang...
1/31/2006 5:09 PM | Claudio Perrone
Gravatar

# Clipcode-GoF-DSL and the One-To-One Mapping Anti-Pattern

Last week Eamon O'Tuathail of Clipcode released a Domain Specific Language (DSL) for some of the Gang...
2/8/2006 4:35 AM | Claudio Perrone
Gravatar

# Clipcode-GoF-DSL and the One-To-One Mapping Anti-Pattern

Last week Eamon O'Tuathail of Clipcode released a Domain Specific Language (DSL) for some of the Gang...
2/8/2006 4:44 AM | Claudio Perrone
Gravatar

# Clipcode-GoF-DSL and the One-To-One Mapping Anti-Pattern

Last week Eamon O'Tuathail of Clipcode released a Domain Specific Language (DSL) for some of the Gang...
2/8/2006 4:47 AM | Claudio Perrone
Gravatar

# Clipcode-GoF-DSL and the One-To-One Mapping Anti-Pattern

10/22/2006 2:34 PM | Claudio Perrone's Monologues
Gravatar

# nqfdvzdd

nqfdvzdd
10/25/2007 1:44 PM | nqfdvzdd
Gravatar

# prozac

prozac
5/13/2008 6:25 AM | prozac
Gravatar

# fioricet online

fioricet online
5/13/2008 8:15 AM | fioricet online
Gravatar

# rqpkqsqx

rqpkqsqx
5/13/2008 3:24 PM | rqpkqsqx
Gravatar

# sivbjfas

sivbjfas
5/13/2008 3:24 PM | sivbjfas
Gravatar

# tramadol

tramadol
5/13/2008 8:52 PM | tramadol
Gravatar

# purchase viagra

purchase viagra
5/13/2008 8:52 PM | purchase viagra
Gravatar

# hzmxdvza

hzmxdvza
5/14/2008 4:17 AM | hzmxdvza
Gravatar

# ninagwzq

ninagwzq
5/14/2008 4:17 AM | ninagwzq
Gravatar

# dqjmkpba

dqjmkpba
5/14/2008 4:17 AM | dqjmkpba
Gravatar

# fofvwwds

fofvwwds
5/14/2008 4:17 AM | fofvwwds
Gravatar

# lunranes

lunranes
5/14/2008 4:17 AM | lunranes
Gravatar

# pzfatwoh

pzfatwoh
5/14/2008 4:17 AM | pzfatwoh
Gravatar

# lzgmapxh

lzgmapxh
5/14/2008 4:20 AM | lzgmapxh
Gravatar

# okkfalrp

okkfalrp
5/14/2008 4:20 AM | okkfalrp
Gravatar

# generic finasteride

generic finasteride
5/14/2008 9:45 PM | generic finasteride
Gravatar

# buy tramadol

buy tramadol
5/14/2008 9:45 PM | buy tramadol
Gravatar

# enpujnnt

enpujnnt
5/15/2008 5:47 AM | enpujnnt
Gravatar

# viagra online

viagra online
5/16/2008 10:08 PM | viagra online
Gravatar

# generic propecia

generic propecia
5/16/2008 10:08 PM | generic propecia
Gravatar

# generic xanax

generic xanax
5/16/2008 10:08 PM | generic xanax
Gravatar

# cheap soma

cheap soma
5/16/2008 11:20 PM | cheap soma
Gravatar

# alprazolam

alprazolam
5/17/2008 12:34 AM | alprazolam
Gravatar

# ambien

ambien
5/17/2008 12:34 AM | ambien
Gravatar

# tadalafil

tadalafil
5/17/2008 1:43 AM | tadalafil
Gravatar

# qgqkqmiv

qgqkqmiv
5/17/2008 11:51 AM | qgqkqmiv
Gravatar

# tkpuvgzi

tkpuvgzi
5/17/2008 11:51 AM | tkpuvgzi
Gravatar

# grnfjilu

grnfjilu
5/17/2008 11:52 AM | grnfjilu
Gravatar

# npinvsei

npinvsei
5/17/2008 11:52 AM | npinvsei
Gravatar

# nasacort

nasacort
5/17/2008 2:16 PM | nasacort
Gravatar

# famvir

famvir
5/17/2008 3:37 PM | famvir
Gravatar

# sertraline

sertraline
5/17/2008 3:37 PM | sertraline
Gravatar

# buy meridia

buy meridia
5/17/2008 3:37 PM | buy meridia
Gravatar

# phentermine online

phentermine online
5/17/2008 3:38 PM | phentermine online
Gravatar

# propecia

propecia
5/17/2008 3:38 PM | propecia
Gravatar

# zoowdjus

zoowdjus
5/17/2008 10:36 PM | zoowdjus
Gravatar

# purchase xanax

purchase xanax
5/18/2008 3:42 AM | purchase xanax
Gravatar

# zccdltcj

zccdltcj
5/18/2008 10:41 AM | zccdltcj
Gravatar

# order carisoprodol

order carisoprodol
5/19/2008 4:35 AM | order carisoprodol
Gravatar

# amoxicillin

amoxicillin
5/19/2008 5:46 AM | amoxicillin
Gravatar

# order vicodin online

order vicodin online
5/19/2008 7:11 AM | order vicodin online
Gravatar

# zithromax

zithromax
5/19/2008 7:12 AM | zithromax
Gravatar

# diazepam

diazepam
5/19/2008 7:15 AM | diazepam
Gravatar

# effexor

effexor
5/19/2008 8:23 AM | effexor
Gravatar

# sumatriptan

sumatriptan
5/19/2008 8:24 AM | sumatriptan
Gravatar

# qtysxymr

qtysxymr
5/19/2008 3:42 PM | qtysxymr
Gravatar

# generic prevacid

generic prevacid
5/19/2008 9:21 PM | generic prevacid
Gravatar

# cephalexin

cephalexin
5/19/2008 9:22 PM | cephalexin
Gravatar

# jijkdleq

jijkdleq
5/20/2008 5:30 AM | jijkdleq
Gravatar

# hqiwprne

hqiwprne
5/20/2008 5:30 AM | hqiwprne
Gravatar

# generic zoloft

generic zoloft
5/20/2008 10:29 PM | generic zoloft
Gravatar

# bupropion

bupropion
5/20/2008 10:30 PM | bupropion
Gravatar

# fknadocl

fknadocl
5/21/2008 6:23 AM | fknadocl
Gravatar

# dxzphrgy

dxzphrgy
5/21/2008 6:23 AM | dxzphrgy
Gravatar

# cheap adipex

cheap adipex
5/22/2008 11:49 PM | cheap adipex
Gravatar

# aleve

aleve
5/22/2008 11:49 PM | aleve
Gravatar

# cheap carisoprodol

cheap carisoprodol
5/22/2008 11:49 PM | cheap carisoprodol
Gravatar

# ultram

ultram
5/22/2008 11:50 PM | ultram
Gravatar

# Ephedrine graphs.

Vasopro ephedrine. Biotek ephedrine. Ephedrine faq.
5/21/2009 11:00 PM | Ephedrine products.
Gravatar

# Buy amoxicillin without prescription.

Amoxicillin. Amoxicillin dosage. What is amoxicillin.
5/22/2009 11:42 PM | Amoxicillin.
Gravatar

# Ephedrine faq.

Ephedrine. Ephedrine products. Ephedrine in salt licks and chicken feed. Sell ephedrine. Ephedrine weight loss products. Health risks of ephedrine. Vaspro ephedrine. Ephedrine..
5/24/2009 11:49 PM | Biotek ephedrine.
Gravatar

# Adderall.

Adderall. Adderall treating anxiety in adults.
5/25/2009 11:58 PM | Adderall.
Gravatar

# Adderall.

Adderall women weight loss. Adderall coupons. Buy adderall. Adderall xr. Adderall prescription. Adderall online. Adderall.
5/27/2009 12:06 AM | Adderall.
Gravatar

# Hartford ephedra attorneys.

Baltimore ephedra lawyers. Ephedra yellow jackets. Denver ephedra lawyer. Diet pills with ephedra.
5/29/2009 12:11 AM | Ephedra.
Gravatar

# Amixicillin.

Amixicillin.
6/2/2009 10:30 PM | Amixicillin.
Gravatar

# Adderall.

Lower back pain and adderall.
Gravatar

# Prescription free amoxicillin.

Amoxicillin. Amoxicillin to treat acne.
6/5/2009 10:25 PM | Amoxicillin.
Comments have been closed on this topic.

Powered by: