justpinegames / Modi

AS3 MVC model library for defining application data with serialization and observing.
MIT License
5 stars 1 forks source link

Generate serialization code instead of doing it via reflection #3

Open tpodhraski opened 10 years ago

tpodhraski commented 10 years ago

We need to generate (de)serialization code for each custom object. This will removed a lot of dynamic code in the ManagedObject and other Modi classes. Biggest offenders are:

deserialize(deserializator:IDeserializator):void
serialize(serializator:ISerializator):void
readUnindentified(name:String, object:*, type:String, deserializator:IDeserializator):Boolean
writeUnindentified(name:String, object:*, type:String, serializator:ISerializator):Boolean

This will solve make serialization more performant; it has potential to solve some of our problems on mobile.

As a small bonus, Modi code will become simpler.