Earthly Powers
- All
- Fast Infoset
- General
- Java
- REST
Resourcescala
What's the following?
import com.sun.ws.rest.api.UriTemplate
import com.sun.ws.rest.api.HttpMethod
@UriTemplate("/test")
class MyResource {
@HttpMethod
def getMe = "HELLO FROM A SCALA RESOURCE"
}
It is a resource i wrote in Scala and deployed to the Java light weight HTTP server using the RESTful API in R2 of SWDP. It is really nice when things just work :-)
Scala appeals as an experiment in scriptingfunctional languages because it supports Java annotations and thus i can use the RESTful runtime. So i can experiment with the design of resources and the producing/consuming of information in ways that are not possible with the Java language. Still, it's been a while since i played around with a functional language...
Posted at 04:26PM Jun 07, 2007 by Paul Sandoz in REST | Comments[0]