This post originated from an RSS feed registered with Java Buzz
by Chuck Hinson.
Original Post: Parallel Universe
Feed Title: Chuck Hinson
Feed URL: http://chuckhinson.blogspot.com/atom.xml
Feed Description: Observations, questions and musings related to my life in the software industry.
I've reached the chapter that talks about WS-Addressing and the WS-Resource Framework (chapter 8 in Building Web Services with Java). Apart from having a hard time getting my ahead around the authors' concepts of stateful and stateless resources, I couldn't help but feel like I was traveling through a parallel universe. I was left with the impression that the whole WS-Resource framework is an attempt to duplicate what we already have in the existing web - but crammed inside of the WS-* world and using none of the existing mechanics already available. It's as if their charter was to reinvent the web without using any of the existing technologies - and to make sure it doesnt interoperate with the existing web.
I've also noticed that as I've been reading I keep finding myself wishing that some of the things in WS-* could be extracted and applied to a more RESTful environment. In particular, I keep wondering whether having something like WSDL would be useful.
Let's say that I have a real estate 'application' that deals with real estate listings. A listing resource has state that includes things like an address, a listing agent, a homeowner, a description, a listing status and a unique identifier. In order for client software to effectively use my 'application', I need to be able to define how the client can interact with resources of this type (e.g., listing resources). It seems to me that in order to construct a client that can interact with a particular type of resource, I need to know the following things:
the resource's state or data model; i.e., what elements make up a listing resource's state (I guess this would essentially be a type definition) a list of valid transformations that can be applied to a listing resource; i.e., what parts of the resource's state can I change, and how do I go about effecting those changes a definition of valid values for the various parts of the resource's state (maybe this is really part of the data model)
For web services, this kind of stuff appears to be mostly defined via WSDL. But if I want something more RESTful, I'm not sure what the answer might be. For that matter, I'm not even sure I'm asking the right question.
I'm pretty sure that the first and last items are reasonable things to want. Its the middle one that I'm not so sure of. I can't help but think that I'm effectively trying to define new operations that can be performed on a resource, and that would seem to violate the constrained interface.
I did look at RDF Forms, but I'm not sure whether that's what I want or not. It seems like something is missing, but maybe I'm just making it more complicated than it needs to be