cmiles – blog

Charles Miles – Tucson Hiking, Outside and Adventures, Excel, .net, Life

A beginner’s view – Textual DSL with OSLO

For just over a month I have been working on a project at work that lets users select inventory items from a database using a textual DSL. This is the first DSL I have ever produced! I thought that it was interesting that with no significant experience in building DSLs I was able to produce a useful application in a relatively short period of time. Below are the best resources I found and a few remarks:

 

Overview/Perspective: The Herding Code interview with Markus Völter (who you might know from Software Engineering Radio) is interesting – while not strictly focused on textual DSLs he gives a great overview/critique of Microsoft’s OSLO effort and interesting information on the Eclipse tools in this space (some recent news related to topics in the interview from Douglas Purdy and a short post by Markus). If you want to see some of the Eclipse tools he mentions the second link will take you to a nice presentation.

Useful MGrammar/OSLO focused podcast: This podcast features Shawn Wildermuth and has some great discussion around DSLs with a focus on OSLO:

Bits and samples: The Oslo Developer Center – official downloads and samples (I thought the MGrammar samples were good study material):

Focused start: This three part series by Shawn Wildermuth was incredibly valuable because the focus of the articles matched what I was trying to accomplish quite well:

Digging deeper: There is a good chance that you will need to dig into some of the details of MGraph and MGrammar – I found the following references useful:

Skeptical? The application I developed is currently being tested by a handful of users, so far these are the points I would make in support of the DSL:

  • Less dev time than you might guess: this is a small business app with a tight focus, it was coded by one dev working part-time on the app in about 4 weeks. There are always more features to implement, but the app is useful now with a fairly low investment.
  • Powerful/Flexible Searching: For advanced users the DSL exposes many more search fields/categories/options than I know how to expose via a reasonable list/wizard/combo box/text box style query build screen, and it is not nearly as tedious! The textual interface allows advanced users to be more efficient and creative and gives them access to more options than they had in the past.
  • Conventional UI feeds the DSL: I found the ‘conventional’ query build screen to be fast and pleasant to develop because it simply constructs the text to be parsed! This means that anything I build for the conventional interface needs to be supported by the DSL – this forces all features to remain ‘exposed’ in the textual interface for more advanced users.

Pain points:

  • I was surprised by the amount of work that I had to to to turn the AST produced by parsing the user’s input into usable objects/actions. There are some samples/posts/ideas out that can help build objects automatically – but this seems like an obvious area for Microsoft to enhance since we are talking about an all MS tool chain. I imagine that most scenarios are going to involve walking the tree to build/modify objects? Is there an approach or scenario that really does not do that?
  • The lack of a text editor component to put in your application in conjunction with your DSL is disappointing. There is an obvious need to deliver an editor for your DSL embedded in your app with syntax highlighting and keyword completion, if that is currently available I am not aware of it… While inputting text into a vanilla textbox may be a good test of the simplicity and logic of your DSL I doubt it is really the user experience you want. If a commercial product is an option then Actipro’s WPF SyntaxEditor might be interesting – they have MGrammar support which sounds encouraging, but I have not made time to test it out.

While the jury is still out if the application mentioned in this post will be successful I think that it was the right choice to build and try a DSL – hopefully if you are interested in trying out a textual DSL in .NET the links and information above will be interesting!

CM

Advertisement

Filed under: .net, ,

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

twitter -> twitterings

  • Just saw the new Resharper 6.1 Early Access version has Async CTP support listed - downloading now... 2 months ago
  • Quick post about FeedDemon/Pinboard/Save to Pinboard on Android as my choice for Google Reader Sharing http://t.co/EupWQupM 3 months ago
  • FeedDemon+Custom Sharing XML->Pinboard; NewsRob + Save to Pinboard on Android - replacing Google Reader sharing, Reader now just for sync... 3 months ago
  • Doing a few Max - http://t.co/wL8dpWk4 - tutorials - what fun, first time in a decade I have played with this... 4 months ago

RSS pinboard -> links

RSS cmiles-consuming -> posts

  • Beats, Rhymes & Life: The Travels of a Tribe Called Quest 2012 January 30
    I have no idea when I first heard a Tribe Called Quest (official site) – but it was the early 2000s before I really ‘found’ them and started listening. I would not call myself a devotee – casual fan is probably the best description – but even as a casual fan I was excited when [...]
  • Hull Zero Three, Greg Bear 2012 January 15
    I am sad to say that the first time I saw Hull Zero Three by Greg Bear (official site) on Amazon I skipped over it because of the rating – in retrospect a somewhat sad reminder to myself about the value of ratings… Thankfully on the Potpourri of Science Fiction Literature blog I came across [...]
  • Happy New Year! End of 2011 Notes… 2012 January 1
    This blog made it thru 2011! A few notes about my media/reading that I thought might be fun if this blogs lasts a few years… -Reading: I am mostly reading on my Sprint Evo 4G Android Phone via the Kindle app. While the reading experience on such a small screen is unexciting the compelling feature [...]
  • Revelation Space Universe, Alastair Reynolds 2011 December 31
    I don’t have a good enough memory or record of what I was reading in the late 1990s or early 2000s to know if this is the truth – but the way I remember it is that after a lull where I had trouble finding any science fiction I was interested in reading I came [...]
  • Sea of Glass, Barry B. Longyear 2011 December 20
    I don’t remember seeing Sea of Glass, by Barry B. Longyear, on ‘top’ science fiction lists – or stumbling across it in website recommendations; but I do remember this novel from reading it in (about…) 1990. What I remember is the brutality, terror and a dystopian future world on the brink of war. The novel [...]
  • String Quartets 2 & 3, Kevin Volans, Balanescu Quartet, Kronos Quartet 2011 December 12
    I believe I first heard Kevin Volans‘s (homepage) String Quartet No. 2 – ‘Hunting: Gathering’ in the mid-1990s on a Kronos Quartet CD. While I can not say this was immediately one of my favorite pieces, I will say that sounds from and sections of the 2nd String Quartet have stayed with me – coming [...]
  • Norwegian Wood, Haruki Murakami 2011 December 6
    Norwegian Wood was not quite what I was expecting – the Murakami novels that I have read – A Wild Sheep Chase, Hard-Boiled Wonderland and the End of the World, Dance Dance Dance, The Wind-Up Bird Chronicle, Sputnik Sweetheart, Kafka on the Shore and After Dark – all seem to me to have some place [...]
  • Looking Glass, James R Strickland 2011 November 27
    Cyberpunk! James Strickland delivers the classic elements in Looking Glass – a future United States now carved into different countries, powerful corporations, cyber space, techy jargon, decks, jacking in and action! The strength of this novel is not in offering something insightful and new – but rather in being an intelligent and fascinating rec […]
  • Await Your Reply, Dan Chaon 2011 November 21
    Dan Chaon gives us a clever plot – with several converging stories – and disturbed characters that work together to create an enjoyable and slightly uncomfortable novel. There were sections that certainly made me think about my own life and identity, but overall I was not quite completely hooked/pulled in. Rating: 3 of 5 First [...]
  • Running the Sahara 2011 November 16
    Running the Sahara – directed by James Moll – follows three athletes as they run across the Sahara Desert. They run (and sometimes walk) thru Senegal, Mauritania, Mali, Niger, Libya and Egypt. The film does a great job of showing some of the amazing landscapes that they cross – with small glimpses of the people [...]
email: charles@cmiles.info

flickr -> pictures

1202 Group Picture 2 after the Colossal Cave Run

1202 Group Picture 1 after the Colossal Cave Race

1202 Charles And Joe After the Colossal Cave Run

1201 View from about 4 miles down the trail

1201 Water coming down Sycamore Dam

1201 Life of an Outdoor Footwear Buyer

1201 Blacketts Ridge Night Run, Dana near the top

1201 Arizona Trail in the Colossal Cave Area (Rincon Valley)

1201 Richard Coming Up to hill after the turn off the AZ Trail

1112 Sunset from Pontatoc Canyon

More Photos
Follow

Get every new post delivered to your Inbox.