[Seaside] callbacks or RESTified?

Norbert Hartl norbert at hartl.name
Thu Jul 3 16:24:04 UTC 2008


I'm building a simple svg authoring tool. You can 
drag'n'drop shapes which updates a Form or you could
change values in the form which updates the SVG element.
My current approach keeping the server side in sync is 
that the selection of an SVG element requests a form 
(for the object representing the SVG element) and makes
it visible on the page. On commit time I trigger the 
submit button and everything is nice thanks to the set
up callbacks in seaside.

Now I'm thinking about not wanting the HTML form being
the model and I like updating the model without needing
a form for it. I can imagine two approaches:

- I can do a url mapping of CRUD actions for the objects/SVG
  elements
- I could set up every possible callback upfront and store
  the _k values in the objects. When I commit I could 
  let the object transfer itself to the server. Maybe via
  JSON or something similar

But I have the impression that the use case of having equal
objects on the server and client and being able to synchronize
them has a much more clever approach than mines.

Do you have any hints?

Norbert 



More information about the seaside mailing list