ThinkGeo.com    |     Documentation    |     Premium Support

How robust is serialisation

Hi,
I have a scenario where users may have spent a considerable time on a print layout and have added many different printerlayer, e.g. for a legend, title box, images and labels and so on. Currently I persist these settings during a session but if the application is closed and reopened then they are, of course, lost.

I was wondering how robust serialising the various PrinterLayers would be?
For example if you (ThinkGeo) modified the PrinterLayers code would deserialising fail?

If so do you have any suggested models / patterns for handling this type of scenario?

Thanks,
Jonathan

Hey @Jonathan3,

Our PrinterLayers are pretty stable. It would be pretty rare to mess up serialization because it does not change much as far as added/changed properties and such. Mostly just bug fixes to existing code.

That said, however, we can’t guarantee that an update won’t break old serialized PrinterLayers. Additionally, given that PrinterLayers essentially container other layers like AdornmentLayers and FeatureLayers, those are also kind of in a realm of possible breakage in future versions. But breaking changes like that usually don’t happen without going to the next major release revision of ThinkGeo.

At the end of the day though, I think it’s pretty safe to do it that way. We did that back when we had our own GIS Editor and it worked pretty well. I just wanted you to be aware of the risks for future updates especially after you just upgraded to v12.

Thanks,
Kyle

Hi Kyle,

Thanks, that’s useful to know. I was reading around a little after posting the question and noticed the geoserializer, and wondered if that had any added functionality to manage version updates? Or what other advantages using the geoserializer would have over standard serializers?

Regards,
Jonathan

Hey @Jonathan3,

Yeah, the GeoSerializer class uses our own built in GeoObjectModeler and XmlGeoSerializationFormatter that helps mold the data for our data types specifically. It will be much more reliable to use that than other serializers because it also attempts to fix issues surrounding styles and other things like that to help it along. So, yeah, I would recommend you use the GeoSerializer.

Thanks,
Kyle

Hi Kyle, thanks we will use that.
Jonathan

Hey @Jonathan3,

Great, sounds good. Closing.

Thanks,
Kyle