From: Erik V. <eri...@xs...> - 2012-06-06 20:47:26
|
What problems would this solve? For initialization: it would be nice if XML data and objects were anywhere near have a to 1:1 relationship, but in many cases that is far from being the case. So I suppose this would cause much rework. For communication: I would tend to consider XML too verbose for such a purpose. It's not for nothing that (I believe) Google has invented a more compact format. And for all I know XML parsing and creation is slooow, but perhaps that is due to the old libraries we now use? Indeed we need something, but I can't provide much insight. I had in mind something like uuencoded Serialized objects (the Java way), but I suppose that is way too primitive for these days. And of course it would be a big benefit if the transmission is readable. Anyway, don't be put off by my (as usual) somewhat sceptical attitude. I'm way backwards in most of these matters. Erik > -----Original Message----- > From: brett lentz [mailto:bre...@gm...] > Sent: Wednesday, June 06, 2012 7:05 PM > To: Development list for Rails: an 18xx game > Subject: Re: [Rails-devel] Another library to add? > > 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.ph > > p > > 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. > > ---------------------------------------------------------------------------- -- > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and threat > landscape has changed and how IT managers can respond. Discussions will > include endpoint security, mobile security and the latest in malware threats. > http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |