InfoQ

InfoQ

Presentation

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Recorded at:
Recorded at

Writing DSLs in Groovy

Presented by Scott Davis on Jun 29, 2009 Length 00:59:55
Sections
Development,
Architecture & Design
Topics
Domain Specific Languages ,
Architecture ,
Java
Tags
QCon ,
Groovy ,
JVM ,
QCon London 2009
The next QCon is in London March 5-9, Join us!
 

How would you like to view the presentation?

In case you are having issues watching this video, please follow these simple steps to help us investigate the issue:
1. Right click on the video player and select Copy log
2. Paste the copied information in an email to video-issue@infoq.com (clicking this link will fill in the default details in most email clients).
Note: in case your email client hasn't automatically picked up the email subject, please include in your email the URL of the video too.
3. Done.
We will investigate the issue and get back to you as soon as possible. Thanks for helping us improve our site!
Summary
In this presentation recorded at QCon London 2009, after a short introduction to DSLs, Scott Davis plays with the keyboard showing how to approach the creation of a DSL by typing working snippets of Groovy code that get executed in front of the audience.

Bio
Author of the book Groovy Recipes: Greasing the Wheels of Java, Scott has been involved in creating web sites in Grails since 2006. Scott teaches public and private classes on Groovy and Grails for start-ups and Fortune 100 companies. He is the co-founder of the Groovy/Grails Experience conference and ThirstyHead.com, a training company that specializes in Groovy and Grails training.

About the conference
QCon is a conference that is organized by the community, for the community.The result is a high quality conference experience where a tremendous amount of attention and investment has gone into having the best content on the most important topics presented by the leaders in our community. QCon is designed with the technical depth and enterprise focus of interest to technical team leads, architects, and project managers.
Should read "scripting with Groovy" by Hermann Schmidt Posted
Re: Should read by Scott Davis Posted
2.hours and 10.minutes by Hossam Karim Posted
great presentation by Gilad Manor Posted
The video seems to doesn't work anymore... by Dragan Stankovic Posted
Re: The video seems to doesn't work anymore... by Dragan Stankovic Posted
Re: The video seems to doesn't work anymore... by Floyd Marinescu Posted
grade by Gene De Lisa Posted
  1. Back to top

    Should read "scripting with Groovy"

    by Hermann Schmidt

    Most of the talk is about conventional scripting that has always been around in some form. A bunch of interesting Groovy tricks (for newbies) are presented. Calling a console script that understands a few commands a DSL is a bit over the top in my opinion.

    The last 10 minutes or so Scott quickly demonstrates how to extend the meta class of a closed (final) Java class (Integer) to do the ubiquitous "2.hours + 10.minutes" example. That's more like it.

  2. Back to top

    2.hours and 10.minutes

    by Hossam Karim


    class Movie(var title:String, var duration: Int) {
    override def toString = title + " runs for " + duration + " minutes"
    }

    implicit def units(i: Int) = new {
    def hours = i * 60
    def minutes = i
    def and(j: Int) = i + j
    }


    val starWars = new Movie("Star Wars", 2.hours and 30.minutes)

    println(starWars)

  3. Back to top

    great presentation

    by Gilad Manor

    it really made my fingures itch:)

  4. Back to top

    The video seems to doesn't work anymore...

    by Dragan Stankovic

    Does anyone have similar problem?

  5. Back to top

    Re: The video seems to doesn't work anymore...

    by Dragan Stankovic

    Now it works again (don't know what happened in the meantime)

  6. Back to top

    Re: The video seems to doesn't work anymore...

    by Floyd Marinescu

    We recently deployed a fix for some video problems we were having. Thanks Dragan.

  7. Back to top

    Re: Should read

    by Scott Davis

    Thanks for your comment, Hermann. This is admittedly a basic presentation - it doesn't assume previous knowledge of Groovy or DSLs. You clearly preferred the internal DSL over the external. That's cool. If I could've been guaranteed an audience with deep experience in both Groovy and DSLs, I could've spent the entire hour covering just that.

  8. Back to top

    grade

    by Gene De Lisa

    The presenter gets an A for his knowledge of the topic.

    The videographer was a bit clueless on the terminal screenshots when zooming in on the left side of directory listings. We were all wondering what the permissions were and not what he was talking about right?


    As a presenter he gets a D. The first half is mostly about him. Count how many times he uses the word "I".
    That is the problem with these conferences. The entire point is gratifying the ego of the presenter; the anti-pattern to Kathy Sierra's "you rock".

Educational Content

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.

Beauty Is in the Eye of the Beholder

Alex Papadimoulis discusses ugly code, where it comes from, how to avoid it, and how to get rid of it.

Architecting Visa for Massive Scale and Continuous Innovation

John Davies examines Visa’s architecture and shows how enterprises have architected complex integrations incorporating Hadoop, memcached, Ruby on Rails, and others to deliver innovative solutions.

Max Protect: Scalability and Caching at ESPN.com

Sean Comerford unveils ESPN.com’s architecture, what components are used and why, and the current changes the website goes through.

The Seven Deadly Sins of Enterprise Agile Adoption

Are there repeated patterns of failure on Enterprise Agile Enablement efforts? Sanjiv and Arlen discuss Seven Deadly Sins to avoid when adopting Agile in an enterprise.

Questions for an Enterprise Architect

Erik Dörnenburg answers: What is Enterprise and Evolutionary Architecture?, discussing 4 issues: Turning strategy into execution, Ensuring conformance, Where do the architects sit? Buying or building?

Wrap Your SQL Head Around Riak MapReduce

Sean Cribbs explains what Map-Reduce and Riak are, why and how to use Map-Reduce with Riak, and how to convert SQL queries into their Map-Reduce equivalents.