[Grok-dev] What's the shortest path supporting rich clients
faassen at startifact.com
Fri Aug 22 21:06:50 EDT 2008
> Seeing that GROK is at version .13, I'm wondering what the shortest path to
> supporting a rich client interface would be. The YUI integration works fine
> so I'll go with that. But neither grok.JSON or grok.XMLRPC actually know
> how to serialize any schema based domain objects yet.
> I can go json or xml. It's a new project. I'm inclining towards
> z3c.schema2xml, but when I include that in setup.py, and run the buildout
> it' is not found.
That's because z3c.schema2xml hasn't been publically released yet. I use
it a lot for a project though. You can make it (or any non released
package) work by doing the following:
$ svn co svn://svn.zope.org/repos/main/z3c.schema2xml/trunk z3c.schema2xml
(you could make this an svn:external)
Then you can do this in buildout, adding z3c.schema2xml:
develop = . z3c.schema2xml
and of course add z3c.schema2xml as a dependency in setup.py. Re-run
buildout, and you can work with the development version of
z3c.schema2xml. Insider trick: if you want to make sure it's using that
version of the package, you can look at the source of bin/test.py
This works for any package in SVN and it's useful if you want to develop
on a package while using it in an application. If this isn't documented
yet on grok.zope.org, someone should document it. :)
I should make a public release of z3c.schema2xml at some point, too. :)
> Given the state of GROK, what's the shortest path for me to be sending
> serialized domain objects to the client for use with YUI?
If I understand you correctly, you want an easy way to serialize
(schema-described?) models to XML. z3c.schema2xml can certainly do that
for you, though it may not support all schema fields you want (this can
certainly be added, though).
I don't know whether any Zope 3 schema to JSON conversion systems exist.
It'd not be too hard to write one analogously to z3c.schema2xml.
More information about the Grok-dev