Xojo project, Binary, or XML?

Hi all!

I have a pro license and I work alone on Mac for web projects. What is the best project format (xojo project, binary, or xml) in your opinion? In particular in terms of speed (project opening, compilation, execution) and reliability.

Text files to use with version control. The rest of the criteria are irrelevant and probably makes no difference.

In my opinion.

Do not set a 1024 x 1024 Application Icon (better, remove the default ones).

It will be time to set these iconsonce the application is done.

And just because you work alone, don’t make the mistake of thinking version control is not still useful. It is amazingly useful even for a single developer like most of my projects. There are various schools of thought, but if not familiar with any of them (which I am guessing is the case since you asked about potentially storing in binary format), then my personal recommendation is GIT.

A very useful pro guide to using Git is here . There are tons of resources on the web devoted to GIT if you do some simple searches.

I like to keep a binary copy, because I had loss of content with the text version in the past.

LOL… I like to keep an XML(text) copy because I had file corruption with the binary version in the past

I find the text format not very useful. Most of my code lives in multiple projects and there is no good way to handle this with text format. XML with external items works fine. For the speed I haven’t seen a difference between binary and XML - as long as you save your icons externally.

@Rick Araujo: was your previous loss experience with GIT or with another version control system. With GIT, it seems nearly impossible to actually lose anything unintentionally. By design, unlike other VCS systems, it never stores just deltas of files. It stores the exact contents of each file in its database, but internally references by a SHA-1 hash of the contents so that you can even rename or move a file between folders and it still tracks it perfectly.

Take a look at the explanation here

I was happy (years ago) to have a pdf print of a 2 days old project. It allows me to rebuild the project based on a far older surviving project. (And if I didn’t had this one, I would build a brand new one with the pdf, but this wuld take much more time (because of the lost images for example).

The error above was mine. :frowning:

Nope. Was a Xojo bug. Norman explained that the binary code is an “exact image” of the Xojo internals, easy in/out without missing parts; the XML is the same content exposed as text (just a read the structures, translate them as text, write them out, and the opposed when reading them in); and the pure TEXT save have much more interaction, processing and formatting of the content (out and in), so binary saves have no secrets when Xojo changes internal things, those things are saved; XML rarely could have issues; but… bugs can be introduced to the “pure text” if they forget something out or miss something in the “translation”. Seems that that happened.

So the more reliable formats are Binary and XML.

none of the formats should have any more or less “internal secrets”
none is a memory dump

text is, imho, the most useful since there are things that now you have a VERY difficult time dealing with in binary or XML

1 Like

I misinterpreted the previous comment to mean the loss was due to the version control system, not Xojo.

So I understand now where you are coming from, but unlike the binary format, if Xojo did mess up a project save in text format, a version control system can still easily show you EXACTLY what is different between files, and you can still easily go back to a prior commit and pick and choose what changes to merge into a new branch or version. So I’ll stand by my assertion that using source control is better than not doing so – even for a single developer – and that the text format is the easiest way to do that.

And yes, I understand Arbed can make it possible to do with XML, and you can even “version control” binary files but doing so with binary files is mostly an easier way to go back to a prior commit to make a hot fix or something. Then you can’t easily merge those with a develop branch. But it is perhaps better than reverting to Time Machine versions or something.

Any movement on this one since July?

Because I am heavily dependent on SVN and CVS for my company’s code (literally millions of lines in C, ASM, TCL, Python, Java, Xojo, Shell, PowerShell, and Mathmatica) over 32 years of coding history, the text format is the only way that I maintain things.

There have been moments in the past where I’ve saved as Binary, loaded that save into a new version of the IDE, and the re-saved as text to sort out some of the issues mentioned above, but text is my go-to for long saving of projects.

I agree. I just have my trust in it hurt. So that’s why a keep binaries as a backup plan and save open text copies for version control.

To be true, for me, Xojo should give up on “alternative” formats and go all open text. That would ensure the proper fine care to the format and just one point of failure.

The older formats should be only “read only” for conversion for some time, and even this should be abandoned in the future, like 5 to 10 years in the future, and having a separated conversion tool available for historic reasons.

  1. I just don’t accept “saving messed” because of bugs. Sometimes you just noticed that something had gone very wrong starting when you saved the v3.4.2324 when you reached v5.8.6534 (like having lost properties and their values and using defaults messing things, or getting null pointers, or things losing positions or changing colors, and who knows what more in not very noticeable parts of the system) and you don’t know what, and when, things started to be messed or even what Xojo versions did that. Comparing the two last versions wont help you after a large cascade of mess.

  2. I was replying on topic. VCS wasn’t part of the discussion.

No idea
I dont work there any more

Sorry, sorry for the delay and thank you very much for all your answers!

I was asking this question because I’ve been having unexplained slowdowns in my web app for a while now, in debug mode on Mac. After doing a lot of tests and research, I found the problem: it was simply the system.log (or debugLog) sometimes used too often in a method sequence (via a thread or not)!

i work also alone and the useful thing is send to zip and put it into cloud. just that nothing get lost anyhow.
i use also a cheap backup software and save my whole developer drive from time to time.
i think binary is much faster than xml.
this argument for comparing xml files, you can also save it to xml at need and compare it with a tool.
i try always to move forward because if u step back and use a older save state u lost days of unique work.
if something get lost than likely because git auto migration and team work.

I can edit and search them almost trivially with BBEdit or other tools that can handle text files
Diffs are simple
And its dead easy to use with SVN, Git whether you use those locally, or with a remote server

I run SVN locally, backup to a couple Time machine volumes and swap those volumes to an offsite backup (in my safe deposit box) periodically