From: brett l. <bre...@gm...> - 2012-06-06 17:04:59
|
On Wed, Jun 6, 2012 at 12:55 PM, Stefan Frey <ste...@we...> wrote: > Brett & Erik, > going forward I am considering refactoring the xml initialization of > Rails. Further I did a short comparison of the feature and syntax of a > few xml serialization libraries for java and very quickly found one that > pleases me. > > The idea of the newer libraries add is that it is possible to align the > java classes and xml elements, so that in effect you do not have to > write anymore manually for parsing. Most of them use annotations to > control this mechanism. > +1 from me. Annotation/Decorators are a fantastic way to handle this. Also, the removal of manual parsing code is a huge win, IMO. > So my proposal is to use Simple Serialization Library > (see http://simple.sourceforge.net/home.php) > > Checkout > http://simple.sourceforge.net/download/stream/doc/tutorial/tutorial.php > for documentation and code examples). > > (Reasonable Alternatives were XStream and Jackson with XML extension and > Protostuff, I do not like JAXB) > > I am still considering to choose a more compact format (like Json or > even a binary one like Kryo or Smile) for the planned network play. Given the choice, I'd opt for JSON or YAML over binary formats. They're well-known, well-supported, and (most importantly) easier to debug. Over the wire, we can use compression to slim down the bandwidth requirements of transmitting plain-text data. > > Stefan > ---Brett. |