Re: Best practices when Implementing acceptingRepresentations?

2008-10-14 Thread Vincent Ricard
Hi Richard, On my project, we have two transport layers (and we also provide a Java Client): - SOAP - REST (which can return several representations of the same data). So, we used the POJO serialization/deserialization way. Since we provide a client API, we realized that our client POJOs could

RE: Best practices when Implementing acceptingRepresentations?

2008-10-14 Thread Jerome Louvel
~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -Message d'origine- De : Richard Hoberman [mailto:[EMAIL PROTECTED] Envoyé : mardi 14 octobre 2008 09:43 À : discuss@restlet.tigris.org Objet : Re: Best practices when Implementing

Re: Best practices when Implementing acceptingRepresentations?

2008-10-14 Thread Richard Hoberman
Hi Vincent Vincent Ricard wrote: Hi Richard, On my project, we have two transport layers (and we also provide a Java Client): - SOAP - REST (which can return several representations of the same data). So, we used the POJO serialization/deserialization way. Since we provide a client API,

Re: Best practices when Implementing acceptingRepresentations?

2008-10-14 Thread Erik Beeson
We use XStream to do all of our serialization, so we get to switch between XML and JSON for free, which is really nice. I've been considering XStream so it's great to hear that it's working for you, especially regarding JSON. Yep, very happy. Joe Walnes has done a lot of great stuff, and

Re: Best practices when Implementing acceptingRepresentations?

2008-10-14 Thread Vincent Nonnenmacher
Erik Beeson a écrit : [...] We use XStream to do all of our serialization, so we get to switch between XML and JSON for free, which is really nice. Our containers end up really cluttered with a lot of XStream related annotations (mainly @XStreamAlias and @XStreamImplicit), so separating them

Best practices when Implementing acceptingRepresentations?

2008-10-13 Thread Richard Hoberman
Hi, My service accepts both XML and JSON representations. Obviously the business logic should be implemented once, so I need to pick a canonical representation. My options seem to be: 1. XML There are great tools for working with XML. I'd update the business layer objects using either XPath

Re: Best practices when Implementing acceptingRepresentations?

2008-10-13 Thread Hugh Acland
Richard Hoberman richard.hoberman at sadalbari.com writes: 2. POJO Deserialize representation into POJOs, directly from JSON or XML as appropriate. This avoids working with XML directly, but requires an extra data model (the legacy business layer uses POJOs annotated for Hibernate, but I