Hi Henrique;

> Thank you, that did it. I was thinking I had to change something on the 
> server, I now realize the 'on the wire' format is always the same, right? 
> It's the client that has to be instructed on how to deserialize.

That's essentially correct.  The LEWOJSONFormat handles WO-specific types a bit 
differently to the vanilla LEJSONFormat.  It is also possible to extend or 
override its behaviour by adding your own serialisers or deserialisers which 
can be registered with the LEJSONFormatFactory.

> But does it mean that If I have the EO Model also on the client it will 
> instantiate the right classes? I get this now :
> ERROR er.extensions.eof.ERXEntityClassDescription  - Entity Obra not found in 
> the default model group!

It should de-serialise EO's to proxy objects on the client, but hmmmmmm... the 
problem here for you is that the LEWOJSONFormat is going to de-serialise GID's 
to their concrete WebObjects types as opposed to my proxy objects!  I guess I 
have not had the situation arise where the entity is not available from the 
default model group in a WO<->WO situation.

Tricky tricky because GID transport is core to how I tend to use JSON-RPC in a 
WOA<->WOA scenario, but in your situation where the "client" WOA is oblivious 
to the EO model, it is undesirable that it should try to de-serialise GID's as 
WebObjects types from that model, but you still want the benefits of the 
KVC-accessible EO proxies in the client.  In general you also probably still 
want access to the GID's as proxies as well in order to be able to manipulate 
data in the "master" WOA.

I guess there a few ways to tackle this; for the short term, are you able to 
just insert the EO model into the client WOA?  I'll sleep on it...

> Also if I'm also using wonder, what's your advice? Better to subclass ERXApp 
> and only implement the bits need for JSONRPC?

I haven't explicitly done a PW-centric app with it, but the arrangement is such 
that it should plug-in fine.

> Thank you again for sharing your work and answering questions.

No worries.

cheers.

___
Andrew Lindesay
www.lindesay.co.nz

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to