|
From: Sandro M. <naa...@gm...> - 2006-02-03 17:00:08
|
On 2/3/06, Tyler Close <ty...@wa...> wrote:
>
>
> On Feb 2, 2006, at 3:21 PM, Sandro Magi wrote:
> > I'm making a little headway with these schemas. I'm looking at
> > org.yurl.Author at the moment since it seems to encapsulate most of
> > elements: Link, Embed, methods, etc.
>
> Yes, the org.yurl.Author object is a good example to study to learn
> about schemas.
Unfortunately, it's not an entirely clear intro to the web-calculus for
beginners; it hits you with too much at once (dynamically generated
"objects" and the "missing" classes, revocation, deputization and authority
management, etc.). We need a "hello world!" type example. I suggest an
incrementing counter:
public class Counter {
int current;
public int getCurrent() {
return current;
}
public void add(int i) {
current +=3D i;
}
}
As useless as this really is, it focuses on the core fundamentals:
1. web-calculus doc serialization of a class
2. generating a schema from a class definition
3. generating a custom stylesheet for a schema
4. invoking a method via POST
5. idempotency of GET and non-idempotency of POST
6. how the waterken server marshals arguments for you
These strike me as the fundamentals that need to be grasped in order to do
anything in the web-calculus. Thoughts?
> If so, what determines the Author methods should be of type Link in
> > this particular case?
>
> An Embed link means: "replace this pointer node with the node at this
> address". For a method, the client needs to retain the pointer so that
> POST requests can be sent along it.
Understood. When you view a method URL, it generates a default form with al=
l
of the method's parameters. I would have thought that a method reified as a=
n
Embed could reconstruct this form inline in the containing document.
Sandro
|