State serialization

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

State serialization

Bernat Romagosa
Hi list,

I'm looking for something similar to Fuel, not as powerful but that can at least serialize a simple object graph and materialize it back later on.

That'd be a great plus for Ludus, as it'd make saving and loading games a breeze.

Thanks in advance,
Bernat.

--
Bernat Romagosa.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: State serialization

Herby Vojčík
JSON. If you want, it can do fancy things, read it in ECMAScript refetence. Both stringify and parse methods have additional parameter where you can supply a transformation function - so you can encode your domain objects on the way there and decode them on the way back.

Bernat Romagosa <[hidden email]>napísal/a:

Hi list,

I'm looking for something similar to Fuel, not as powerful but that can at least serialize a simple object graph and materialize it back later on.

That'd be a great plus for Ludus, as it'd make saving and loading games a breeze.

Thanks in advance,
Bernat.

--
Bernat Romagosa.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: State serialization

aglynn42
In reply to this post by Bernat Romagosa
What about modifying something like Apache Tuscany?  it already works with Java and C++, no reason a binding for Amber couldn't be written.  Adding support for persisting object maps in a TupleSpace such as Blitz would be useful as well.

Andrew

On Monday, May 26, 2014 12:42:44 PM UTC-5, Bernat Romagosa wrote:
Hi list,

I'm looking for something similar to Fuel, not as powerful but that can at least serialize a simple object graph and materialize it back later on.

That'd be a great plus for Ludus, as it'd make saving and loading games a breeze.

Thanks in advance,
Bernat.

--
Bernat Romagosa.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: State serialization

aglynn42
In reply to this post by Bernat Romagosa
Tuscany SCA/SDO has also been ported to PHP, the methodology used in porting the C++ infrastructure might be useful (the Java version was an original implementation, not a port):

http://pecl.php.net/package/SCA_SDO

Here is the Tuscany SDO main overview:   http://tuscany.apache.org/sdo-overview.html

The big advantages of SCA/SDO over just serializing using something like JSON is the ability to generate model based transforms in native code (saving vast amounts of repetitive coding) and accurate, dynamic validation of changes to data in a disconnected model.  (Try using REST and JSON to do any complex changes involving back end data and validation becomes a major problem ->  it gets difficult to keep what the representation in fact represents sorted out even conceptually, and much worse in the client side JS).

Andrew Glynn


On Monday, May 26, 2014 12:42:44 PM UTC-5, Bernat Romagosa wrote:
Hi list,

I'm looking for something similar to Fuel, not as powerful but that can at least serialize a simple object graph and materialize it back later on.

That'd be a great plus for Ludus, as it'd make saving and loading games a breeze.

Thanks in advance,
Bernat.

--
Bernat Romagosa.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: State serialization

Vicnet-2
In reply to this post by Bernat Romagosa
Hello,

You could look at my little app:
https://github.com/vicnet/benevoles

There is a FdJStockage class in Benevoles package that do the job.
You have to add a fromJSON message in class you want to serialize and sometime a asJSON when auto jsonify is not correct.

I do it quickly so not a good code (not think to be reused as is). Comment (sometime) are in french.

Serialization is done on localStorage (or just sessionStorage if you want)..

a+
Vicnet

Le lundi 26 mai 2014 19:42:44 UTC+2, Bernat Romagosa a écrit :
Hi list,

I'm looking for something similar to Fuel, not as powerful but that can at least serialize a simple object graph and materialize it back later on.

That'd be a great plus for Ludus, as it'd make saving and loading games a breeze.

Thanks in advance,
Bernat.

--
Bernat Romagosa.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.