Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 14 in printed book and digital formats -- plus a one-year subscription so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 15.3 ('Xojo Beginner's Guide')
Instant purchase and download via GumRoad!

FEATURE

Binary Serialization

How to save and retrieve objects

Issue: 15.3 (May/June 2017)
Author: Sam Rowlands
Author Bio: Sam is a pixelMancer and codeWeaver at Ohanaware.
Article Description: No description available.
Article Length (in bytes): 22,751
Starting Page Number: 12
Article Number: 15302
Resource File(s):

Download Icon project15302.zip Updated: 2017-04-30 19:21:55

Related Web Link(s):

http://www.xdevmag.com

Excerpt of article text...

In this edition, I'm going to cover a topic that comes up periodically and that's Serialization.

Serialization is a fancy term for converting an Object into data suitable for saving to a disk or transferring; deserialization is the opposite process.

The number one reason as to why I'd recommend serialization is complex data structures. Often when you start designing and building an app, the requirements are small and solved really easily, but as the project grows and the app becomes more complicated, so does the data structure.

I personally like to use a dictionary to organize the data. This allows for various data types to be stored in a single object, which in turn makes it easier to write out and read back in. Dictionaries can also grow and adapt as the needs alter.

The advantage of using a binary format is speed. Writing out and reading binary data is faster than any text-based format (JSON, XML, or plain text). Binary also has the advantage that byte data (such as pictures, colors, and other values) do not need to be encoded.

Where to begin?

...End of Excerpt. Please purchase the magazine to read the full article.