Wednesday Sep 22, 2010

JavaOne presentatons available

Advanced Java API for RESTful Web Services (JAX-RS) and examples

Building Powerful WebSocket, Comet, and RESTful Applications Using Atmosphere

What's Next for Java API for RESTful Web Services (JAX-RS)

Thanks to all the those who attended the presentations.

I also moderated the ScriptBowl session, standing in for Rags at the last minute, with Clojure, JRuby, Scala and Groovy represented by Rich Hickey, Nick Sieger, Dick Wall and Graeme Rocher respectively. Roberto Chinnici was the judge. Congratulations to Groovy that won, by the loudest clapometry reading from the audience, with Scala a close second. JRuby was at a slight disadvantage since the ScriptBowl clashed with a JRuby session but i hope the EngineYard developers got lots of attendance at their JRuby event last night.

For me though Scala was the winner with Clojure a close second. The REPL support in the Scala console is getting really good and gives the feel of a dynamic language, and the tooling is also getting good taking advantage of the static typing features of Scala. Scala and Clojure are i think the only languages that are really attempting to correctly tackle immutability and state change. Clojure is disruptive and i expect some of it's innovations to feed through into other languages, as is already the case with Scala, efficient persistent collections, and the Scala-based Akka framework.

Wednesday Jun 30, 2010

JavaOne session schedule

All done in the first half of the week (unless a repeat is requested), i like that :-)

D#: S313265
Title: Advanced Java API for RESTful Web Services (JAX-RS)
Track: Enterprise Service Architectures and the Cloud
Date: 20-SEP-10
Time: 13:00 - 14:00
Venue: Hilton San Francisco
Room: Golden Gate 6/7

ID#: S313035
Title: Building Powerful WebSocket, Comet, and RESTful Applications Using Atmosphere
Track: Java EE Web Profile and Platform Technologies
Date: 21-SEP-10
Time: 11:30 - 12:30
Venue: Hilton San Francisco
Room: Yosemite C

ID#: S313266
Title: What's Next for Java API for RESTful Web Services (JAX-RS)
Track: Enterprise Service Architectures and the Cloud
Date: 21-SEP-10
Time: 20:00 - 20:45
Venue: Hilton San Francisco
Room: Yosemite B 

Thursday Jun 04, 2009

JavaOne slides for JAX-RS and Jersey

Here are the slides for the JAX-RS technical session Marc and I presented on Wednesday.

Here are the slides for the Jersey BOF @ 7.30pm on Thursday.

Wednesday Apr 01, 2009

JavaOne and CommunityOne sessions and BOFs

Where will YOU be June 2?

Thankfully JavaOne 2009 is a little later this year, 2nd to 5th of June. Which gives my co-speakers and I more time to prepare (or at least more time to leave things until something needs to be done!).

Three talks have been accepted:

  • Technical session TS-4875.
    Developing RESTful Web Services with the Java™ API for RESTful Web Services (JAX-RS). Marc Hadley, Paul Sandoz.
  • BOF-4878.
    Developing RESTful Web Services with Jersey and Java™ API for RESTful Web Services (JAX-RS). Craig McClanahan, Jakub Podlesak, Paul Sandoz.
  • BOF-5009.
    Atmosphere: Comet for Everyone, Everywhere. Jean-François Arcand, Paul Sandoz.

For BOF-4878 Craig will provide some interesting details on how Jersey is being utilized in Sun's Cloud offerings.

Atmosphere, although a young project, is already starting to get some good adoption. Atmosphere provides portable ease of use APIs to support Comet-style interactions. BOF-5009 will introduce Atmosphere and we will demonstrate using Atmosphere combined with Jersey.

If you plan to attend JavaOne and any of these sessions please contact me at Paul.Sandoz@Sun.Com and i can send you a special priority code you can utilize when registering.

For CommunityOne West one session has been accepted:

This session will be a combination of the JavaOne technical session TS-4875 and the BOF-4878.

Friday Jun 06, 2008

JavaOneDemo in Scala

For some light entertainment I converted the JavaOneDemo over to a Scala-based version, see here. It is by no means complete, there is still some Java code (which shows how one can mix the two in the same project) and i know it can be improved by using Scala's native XML support.

I am getting increasingly grumpy with the verbosity of Java and the reduction that Scala offers is good (i wish i could write Jersey completely in Scala, i would be more productive and i think the code would be better, but the downside is it would limit adoption for those wishing to mess around with the code base).

Here is a bit of the Java code:

@ProduceMime("application/xhtml+xml")
public class SystemProperty {
    Properties properties;
    String name;    
    String value;
    SystemProperty(Properties properties, String name) {
        this.properties = properties;
        this.name = name;
        this.value = properties.getProperty(name);
        if (value == null)
            throw new WebApplicationException(Response.Status.NOT_FOUND);
    } 
    @GET
    public Property getProperty() {
        return new Property(name, value);
    }    
    @PUT
    @ConsumeMime("text/plain")
    public void updateProperty(String newValue) {
        properties.setProperty(name, newValue);
    }    
    @DELETE
    public void deleteProperty() {
        properties.remove(name);
    }
}

Now compare that with the equivalent Scala code:

@ProduceMime(Array("application/xhtml+xml"))
class SystemProperty(properties : Properties, name : String) {
    val value = properties.getProperty(name)
    if (value == null)
        throw new WebApplicationException(Response.Status.NOT_FOUND)
    @GET
    def getProperty = new Property(name, value)
    @PUT
    @ConsumeMime(Array("text/plain"))
    def updateProperty(newValue : String) : unit = 
        properties.setProperty(name, newValue)    
    @DELETE
    def deleteProperty() : unit = properties.remove(name)
}

This class uses Scala concise constructors and the Scala compiler is smart enough to know whether the constructor parameters need to be fields on the class. Unfortunately Scala does not perform auto-boxing of arrays, which is why you see Array("application/xhtml+xml") in the @ProduceMime annotation (this gets more annoying when using the JAX-RS builder-related methods). Notice how you can write the equivalent constructor logic directly in the class.

For first @GET method Scala does not require that you declare the return type, it works it out. So this can be written concisely in one line.

I would like to write some "Scala-sugar" for classes like UriInfo and Response to improve EOU in Scala in addition to further investigating use of Scala features like closures as experimented with previously.

Monday May 26, 2008

JavaOne slides and demo

Here are the JavaOne slides Marc and I presented.

Here is the zip of the completed demo written in Java as a NetBeans project.

Tuesday Feb 05, 2008

JavaOne and Jazoon

We submitted a technical session on JAX-RS and a BOF on Jersey to JavaOne and both have been accepted.

In terms of the technical session our current thinking is we would like to describe the REST style (grounded in the Resource Oriented Architecture terminology), how it connects to the JAX-RS API,  and how you code to that API in a series of logical steps (for example the Resource Oriented Architecture properties) to build an example. I think this would be better than lots of talk (cue hand waving) followed by a 5 to 10 minute demo. Intermixing these three things is a tricky balancing act but i think its worth the effort to better communicate about JAX-RS. We need to choose an example, if you have any ideas on what you would like to see, write a comment or send me some email.

In terms of the BOF i deliberately made the abstract "loose" and would like to drive the content based on feedback before or at the BOF. We can come up with some pre-prepared slides on the Jersey architecture, additional features, JAX-RS, and some demos but i would really like things driven by what developers want to see. So again if you have any ideas/requests write a comment or send me some email.

I have also been invited to present at Jazoon08 (and very much enjoyed Jazoon07 last year). I suspect we are going to reuse a lot of material that was prepared for JavaOne :-) but we will endeavor to improve it based on feedback we receive.

About

sandoz

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today