On 19:59, Andrew Ochsner wrote:
> On Fri, Sep 4, 2009 at 3:13 AM, Paul Sandoz <Paul.Sandoz_at_sun.com
> <mailto:Paul.Sandoz_at_sun.com>> wrote:
>
>
> On Sep 3, 2009, at 4:53 PM, Andrew Ochsner wrote:
>
>
[deletia]
>
> Ah thank you. Makes sense now. I <personally> don't have a need or
> desire for that. Agree that old habits die hard. It wasn't until I
> started working with the Jersey client that I finally "got" REST. The
> proxy approach feels too RPC. Which isn't to say it's bad or
> anything. It's just not REST. Why not use SOAP/JAX-WS then? If what
> you're looking for is tool support and/or statically generated
> clients, then I think SOAP style services are a better choice. If
> that's your focus, do you really care what goes over the wire?
>
> And, also... agree that providing a library to clients ala Sun Cloud
> API is a great approach and is what we do today. Writing that library
> is at least as easy if not easier for our REST services using the
> Jersey Client API as it exists today... as opposed to our libraries
> that talk to SOAP services.
That is reasonable; but someone still have to help those who write the
libraries. :-)
>
> I still don't think I've seen a good example of a real HATEOS type
> client. Sounds like the holy grail ...but just out of reach.
>
I guess this is why I was thinking about a generated client; because
once we start to take control of that we can make sure our objects
provide some help to walk back over the network. For example
<employee>
<department uri="
http://www.exmaple.com/company/department/HR">HR</HR>
</employee>
Would map to.
public class Employee
{
// Return the underlying property
public String getDepartment()
{
....
}
// Return a pre-configured web resource to get hold of the department
resource
public WebResource<Department> getDepartmentResource()
{
...
}
}
But as you say a pure HATEOAS example is hard to find.
Gerard
--
Gerard Davison | Senior Principal Software Engineer | +44 118 924 5095
Oracle JDeveloper Web Service Tooling Development
Oracle Corporation UK Ltd is a company incorporated in England & Wales.
Company Reg. No. 1782505.
Reg. office: Oracle Parkway, Thames Valley Park, Reading RG6 1RA.
Blog http://kingsfleet.blogspot.com