Condividi tramite


DSL DevCon Takeaways

Those who have worked with me know that I’m totally into “Architecty” stuff like UML modeling, Model-Driven Development (MDD), Model-Driven Architecture (MDA), Software Factories, and Domain-Specific Languages (DSLs). As an Architect I’m constantly looking for new and more effective ways to increase my leverage (a subject I plan to blog about next) with the teams that I lead. In the past I toyed with all of the concepts listed above, but consistently found that the reality hadn’t quite caught up to the theory. I reached a point a few years ago where I put these ideas on the shelf and instead focused on more practical points of architectural leverage by trying to marry UML modeling, Design Patterns, and Agile (a subject that I will be blogging about soon). However, my fascination with the Architecty still tickled the back of my mind even as I worked my Sprint Backlogs and wrote my NUnit tests during those years.

Since coming to Microsoft I’ve had the opportunity to take these Architecty ideas off the conceptual shelf, dust them off, and marvel at how bright, shiny, and full of promise they still are.

I’ve been fortunate enough to land on a team in Microsoft that totally gets the beauty of modeling – and also knows enough to use modeling responsibly. I’ve also been pleasantly surprised by Microsoft’s commitment to modeling as evidenced by UML support in VS 2010, increased integration with the DSL toolkit in VS 2010, and with this little piece of goodness call Oslo (this will be a subject I will blog about soon, as I’ve actually done a 180 on Oslo). If you’re a modeling geek like I am, this is a very good time to be working for the Big Show!

Given all this, it’s no surprise that I was looking forward to last week’s DSL DevCon with such interest – and it was 1.5 days well spent.

In no particular order, here are my top DSL DevCon takeaways:

  1. Martin Fowler’s keynote
  2. Chris Sells rocks
  3. The Java kiddies have some cool toys
  4. Watch Intentional Software
  5. Architects need to get up on DSLs
  6. Gotta learn F#

For those that are interested, I expand on the above list below…

 

Martin Fowler’s keynote

Being a big fan of Mr. Fowler’s work (UML Distilled, PoEAA, and Refactoring have a prominent place on my bookshelf) I was highly interested in what he would say about DSLs, especially since he’s writing a book on the subject.

I have to say I did find Martin’s keynote fascinating, but not for reasons I expected going in. Having read Martin’s blog for years I was very familiar with his thinking on DSLs, Fluent Interfaces, and Language Workbenches. Much of the keynote talked about a number of items that have been on Martin’s blog for quite a while. However, one part of his talk was pure gold – at least for me anyway. I think this bears a little explanation.

I’m a self-admitted UML devotee. I love UML and everything about it. When I first learned about Object Constrain Language (OCL) I literally had trouble sleeping that night due to my excitement (sad, I know – but true nevertheless ;-). I even started a CodePlex project called Tarkin that was to be a C#-based Meta-Object Facility (MOF) implementation (however, like so many OSS projects the author has neglected it) because I was jealous that the Java kiddies had EMF.

Anyway, this love affair with everything OMG lead me to the work of Anneke Kleppe – one of the authors of the OCL specification. Lately Anneke’s work has been focused on an area she has dubbed “Software Languages”. One of the guys on my team let me know that Anneke recently published a book on the subject based on her doctoral thesis (thanx, Stan!) which I’ve been reading with great interest.

In the book Anneke proposes (this is a bit of a simplification) that Software Language Engineering (where DSLs are included as one form of the engineering) is best served using a series of metamodels that capture the essence of the language and can be used to manifest the language in a number of concrete syntaxes (e.g., MGrammar, EBNF, custom graphical representation, etc).

Anneke’s ideas resonated with me in particular during the keynote when Martin was discussing how a DSL script is parsed into an in-memory Semantic Model. What really clicked is when Martin commented that in his thinking the instantiated Semantic Model is not usually the Abstract Syntax Tree of the parsed DSL script, but is usually an object graph of the underlying domain model.

Whoa! Sounds a ton like Anneke’s Abstract Syntax Model concept to me!

Additionally, Martin’s ideas around Projectional Editing mesh very well with Anneke’s ideas around transformations between Abstract and Concrete Syntax Models.

Needless to say, I will be picking up a copy of Martin’s DSL book as soon as it is released.

 

<Preview of coming attractions>

I’ve been seeing a lot of connections between the "Software Languages” concepts and the work I’ve been doing over the past few years. I plan to blog about this soon. Think intersection of Anneke’s ideas and Agile Software Architecture with UML.

</Preview of coming attractions>

 

Chris Sells rocks

I have to give a shout out to Chris Sells as the organizer of the DSL DevCon. The content was excellent. I was also very happy to see that DSL DevCon had a number of presenters that came from the Java community. I’m still relatively new to Microsoft, so I don’t know this for sure, but I would assume that Chris had a part in ensuring that the whole DSL community was represented.

Bravo, Chris!

 

The Java kiddies have some cool toys

Markus Voelter gave a great talk about some of the tools used in the Java world for creating and using DSLs. Markus’ talk focused a lot on the practical use of openArchitectureWare (oAW) as a textual DSL toolkit. I particularly liked his idea of creating specific DSLs based on the architectural characteristics of the project/software at hand. I took a look at oAW a while back and it is definitely interesting. Lots of powerful features. Given my penchant for OCL, I was particularly taken with oAW’s support for constraints! Markus’ demo for graphically visualizing the model quickly using Graphviz was some very interesting stuff. Hopefully some of the oAW ideas make it into a shipping version of Oslo!

 

Watch Intentional Software

I’d been following Intentional Software for a while now. Intentional has been building a Language Workbench along the lines of MetaEdit+. The Intentional guys run a tight ship so I was never able to get a lot of deep info on there product, but they came to DSL DevCon and did a demo.

Whoa!

Talk about some impressive stuff. I knew immediately that I wanted to blog about it.

Since Mr. Fowler beat me to the punch (and likely did a better job than I would have), I’ll just refer you to his impressions of the demo.

 

Architects need to get up on DSLs

At the DevCon I saw that that DSL technology has reached the point where it is being used productively in the real world. I also saw pretty clearly that DSLs represent a powerful technology for gaining leverage in delivering software.

However, not all is milk and honey in DSL-land. There was a great discussion sparked by an audience question that essentially boiled down to, “Yeah, this is goodness. No doubt. But do we really expect the average developer to grok this?”.

From what I gathered, the idea that came out of the discussion was while DSL usage will grow over time, the number of users of DSLs (e.g., developers) will greatly outnumber the number of DSL authors. I would argue that the reasons for this are pretty straightforward:

  • Getting proficient with the design of DSLs (including recognizing when to use them) takes time and effort – and requires some sophisticated software design knowledge and experience
  • Getting proficient with DSL tooling takes time and effort
  • Getting the proper ROI for building a specific DSL and associated tools (e.g., code generators) only happens with sufficient usage – typically a lot more people have to use the DSL than authored it

Hmmm

At the risk of sound elitist, sounds like it is time for DSLs to sit smack in the middle of an Architect’s toolkit if you ask me.

 

Gotta learn F#

As I watched the various presentations I noticed a recurring theme – many of the presenters leveraged functional programming explicitly, or used OOP in a very functional style in their DSL examples. A number of presenters also mentioned that F# was very cool and indicated that F# will eventually be big in the .NET community. I’m currently of the mind (and I could be wrong) that F# is likely to be big in the .NET DSL community, but I doubt that it will be big in the overall .NET community. This thinking, which is in line with the ideas discussed immediately above, is based on the likelihood that the cost/benefit ratio to the average .NET developer of incorporating F# expertise in their toolbox probably is just too high (besides, I would much rather see investment in OO and Design Patterns I think that’s going to give the biggest bang for the .NET developer community’s buck).

The potential use of functional programming in DSLs is interesting enough that I need to add F# to my Architect toolbox.

Comments