Douglas Purdy

“MUrl”: A DSL for RESTful Clients

with 20 comments

This is the first of three posts about our MIX talk/announcements.

Today we showed off “MUrl”, which is a DSL and runtime for interacting with HTTP services.

murl

We think “MUrl” has a lot of potential and we are still working on it, but we didn’t want that to stop you from getting your hands on it.

As such, you can download the “MUrl” source code today from the “Oslo” Developer Center.

We are doing this for three reasons:  we want you to have something that will make your life a little easier, we want to provide concrete proof of how “M” can be used to make your life easier, and we want to show how you can write your own “M”-based DSLs and runtimes.

I will be clear that “MUrl” is a work in progress and you are going to find things that don’t work the way you want/expect.  You do have the source code however.  Enjoy.

March 20th, 2009 at 7:17 pm

20 Responses to '“MUrl”: A DSL for RESTful Clients'

Subscribe to comments with RSS or TrackBack to '“MUrl”: A DSL for RESTful Clients'.

  1. I’m wondering if you could generate a CodeDom for MUrl with Oslo, or would I be forced to dynamically generate MUrl code with .Write(”GET “); .WriteLine(url); etc?

    George Tsiokos

    20 Mar 09 at 20:03

  2. [...] addition to “MUrl” (which works on the CTP bits today), we showed off an early look [...]

  3. [...] information about MUrl can be found in the Doug’s blog, http://www.douglaspurdy.com/2009/03/20/murl-a-dsl-for-restful-clients/ . An example is also available to download from the Oslo Dev Center, [...]

  4. “MUrl”: A DSL for RESTful Clients – Douglas Purdy…

    Thank you for submitting this cool story – Trackback from DotNetShoutout…

    DotNetShoutout

    20 Mar 09 at 22:15

  5. [...] We put MURL out on the Oslo dev center. MURL is a textual DSL for doing web client work. ChrisAn and I showed [...]

  6. [...] addition to “MUrl” (which works on the CTP bits today), we showed off an early look at [...]

  7. We need a run-time code generation story instead of the current string builder approach. I can appreciate the run-time parsing usage, but I believe Oslo could generate a complier-friendly way to “code-generate” DSL code at run-time.

    Instead of this:
    var statements = runtime.Parse (@”? http://twitter.com/statuses/user_timeline.xml authenticate using [Twitter]“);

    We could write this in c#:
    var statements = new MUrl.Get(”http://twitter.com/statuses/user_timeline.xml”, Authentication.Twitter);

    This could give you c# compile-time checking of some of the MUrl code. Behind the scenes, the above c# syntax could just convert the code to a string and parse.

    George Tsiokos

    24 Mar 09 at 18:37

  8. How would one post POX (plain old xml) to a site using MuRL?

    Delbert Aud

    26 Mar 09 at 23:58

  9. POST http://site
    with []
    as application/xml

    douglasp

    27 Mar 09 at 01:16

  10. Im probably a bit thick but could anyone explain to me the authenticate with [Twitter] part?

    How is this credential retrieved?

    elgrego

    30 Mar 09 at 16:14

  11. There is a message giving me the respone

    Expect: 100-continue

    elgrego

    30 Mar 09 at 20:09

  12. Twitter is the name of a credential in CredMan. If you watch the video, you can see how to configure that.

    douglasp

    30 Mar 09 at 23:22

  13. Are you hitting Twitter?

    Add the below to ipad.exe.config

    douglasp

    30 Mar 09 at 23:23

  14. Doug, It was indeed very simple to find CredMan!

    As always, I expect something hard and it is usually very simple.

    (I must have slept at that point in the presentation)

    elgrego

    31 Mar 09 at 06:01

  15. “Add the below to ipad.exe.config”

    I think you left something in your post?

    elgrego

    31 Mar 09 at 06:10

  16. It now works.

    I added System.Net.ServicePointManager.Expect100Continue = false;
    in public WebResult Execute(WebStatement statement)

    elgrego

    31 Mar 09 at 06:23

  17. that works or you can do in in the app.config.

    douglasp

    31 Mar 09 at 16:08

  18. [...] book called RESTful .NET by Jon Flanders. After reading this book I enjoyed playing around with the MUrl which is a DSL for RESTful clients and I am looking really forward trying out the MService – a [...]

  19. [...] spending a bunch of team writing iPhone code — LocoFoto and something new) is an update to MUrl sample that I used as part of the MIX09 talk with [...]

  20. [...] “MUrl” is updated to the latest CTP (thanks SNinja and the rest of the Intellipad team). [...]

Leave a Reply