DISQUS

DISQUS Hello!  The comments on this profile are unclaimed and thus are unverified.

Do they belong to you? Claim these comments.

Mats's picture

Unregistered

Feeds

aliases

  • Mats

Mats

1 year ago

in A Brief Adventure with Universal Repositories and REST Web Services on Thinking inside a bigger box
When GETing it's pretty clear that if an object contains a reference to another object, it is either included in the returned document, or it is referenced.
When POSTing or PUTting, however, the situation is more complex. I don't think it matters if you are creating or updating, what to do with direct attributes are clear, but not with referenced objects. A referenced object might exist only on the client side, or it might be in the repository, but with different attributes. Do you have a clear vision of how to handle this?

1 year ago

in A Brief Adventure with Universal Repositories and REST Web Services on Thinking inside a bigger box
No problem, I can manage. Just wanted to give feedback in case you weren't aware. And thanks for the Maven tip.

Another thing is that the repository interface looks a lot like the Map interface. Make me wonder about the differences, such as method names (should "retrieve" be called "get"?), the type parameters (wouldn't it be nicer with a key type parameter?), would it be possible to go so far as to have Repository implement Map?

Also I didn't quite like the "hack" with URLs being used interchangeably with Keys, or the "Long.valueOf(parts[1])" in RESTRepositoryServlet.getKey where Keys are suddenly assumed/restricted to be Longs.

Not "complaining", just trying to provide some humble feedback, hoping it might be of some interest.

2 years ago

in A Brief Adventure with Universal Repositories and REST Web Services on Thinking inside a bigger box
Really elegant construction this.
When trying to run it, I had to add 10 external jars. Makes me wonder
if they're all really needed. Second, in the "trade" package there are
unresolved references to the ...rest.UrlMemoryRepository class.
Still, really cool stuff.
Returning? Login