Xojo project, Binary, or XML?

Binary files are hard to fix when, as it happened to me, the computer was powered out and the project was unable to be save properly (i guess), because I was unable to load it again.

Although I manage to save manually a copy as XML, it produces the same error.

I am no good managing the source code, but i expect to find the issue and fixed, which under binary code is seems totally hopeless for me.

With a text file, you’d probably get an incomplete file as well (and perhaps worse, since Xojo converts the data to text, this takes more time so your file would have been even shorter at the time of the outage).

I never saved otherwise than with the binary format myself. Surely enough, I’ve had corrupted projects once (or twice?) but Time Machine backups allowed me to just bring back the previous version and restart from there (and anyone should have a backup).
My opinion: text files are just as bad as variables of type “variant” (if you use them too easily). Converting from/to text can lead to loss of precision (like any conversion, like video/audio formats, etc.) or, worse, different values on reading than what was written.

Just a matter of taste, I guess.

With external files it doesn’t matter if you use binary or xml. If the main project gets corrupt just make a new one. I think that the solution with xml files is much better than the text project because it allows me to share classes etc with different projects easily.

I would always use the Version control system and not Xojo to handle sharing of classes between projects.

3 Likes