Next Wednesday

Published 04 September 07 06:11 PM | andersnoras 

Next Wednesday I’ll be giving my talk on plain old Java Domain Specific languages at the JavaZone conference in Oslo. During my talk, I’ll reveal a project I’ve been putting quite a lot of work into during the last few weeks (now you know why this blog has been a little quiet lately). For now, I’ll just leave you with a riddle:

List<Talk> talks=JavaZone2007.getTalks();
List<Topic> topics=
        asList(
            from("t").in(talks).
            where(eq("t.speaker","Anders Norås")).
            select("t.topics")
        );

    Assert.assertTrue(topics.get(topics.size()-1).isQuiteInteresting);

See you at Gate 5 at 14:15 on September 12th…

Filed under: , , ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Johannes Brodwall said on September 5, 2007 12:47 PM:

Coming from Anders, a reformed .NET-victim, I think I know what inspired this code. It almost looks like LINQ code.

When Hibernate was standardized into JPA, they forgot the object query expressions - this will be rectified in the upcoming JPA 2 spec. I hope it'll look something like this code.

PS: Neat use of static imports.

# Thomas Ferris Nicolaisen (nitpicker) said on September 11, 2007 5:18 AM:

I hope you'll make a public getter method for the Topics.isQuiteInteresting member though ;)

By the way, I just scoped over something like this in Rick Hightower's Crank framework:

http://www.jroller.com/RickHigh/entry/i_implemented_a_detached_criteria

Will most likely catch your talk. Good luck!

Leave a Comment

(required) 
(optional)
(required) 
Enter the code you see below