Binary project file? Better if it was as XML as possible
Posted: Thu Dec 01, 2022 5:09 pm
I am in the process of designing and publishing my first module. I spent several days drawing out my ultimate module with as many features as I could imagine. I am so pleased to not have any crashes in Designer during that several days. The code editor feature is quite simple, I dont get any kind of autocompletion, despite enabling that in preferences and then restarting, but still, in many tests of my module, the designer only seemed to get tripped up a couple of times about whether the module was still in the debug console or not, but otherwise, very stable.
In posting some demos of what I have completed with my module so far, I realized its current version is worthy of being a releasable module. So the decision had to be made, hide all the unimplemented UI with SetVisible(false), or make a copy of the project and delete the unneeded UI stuff and related code? I decided it was simpler to fork my code to a new project.
In the process, of deleting unused UI elements, and adjusting the code, I later realized I deleted some controls that would be really easy to implement. But because the project file is a binary file, I don't see any easy way to add back the 16 UI controls, and avoid going through all the renaming, etc.
If the VM project file was more like XML, it would be trivial to cut and paste visual elements between my projects.
This creates a simple issue for source code tracking, similar to the problems in maintaining .FLA flash project files. Minor tweaks to positions of elements just show up as the entire binary file differing between versions, with no clue as to what changed. At least with VM, if one always does a build of the project, before checkin, the side file of Java code can be checked in and can be diffed between versions. But, eventhough that will help highlight UI changes between versions, there is no easy way to edit the module file to cherry pick some changes, without going into the visual UI and manually tweaking each control individually.
Flash had another file format called .XFL that separated the things that could be represented in XML into separate XML files (DOMDocument.xml, MobileSettings.xml, PublishSettings.xml), and also separate binaries and .AS code files. The .XML files that record visual designer info have the problem that they are very noisy with their "lastModified" fields, when no other field of the given element had any change in value. So diff'ing them was not optimal.
In posting some demos of what I have completed with my module so far, I realized its current version is worthy of being a releasable module. So the decision had to be made, hide all the unimplemented UI with SetVisible(false), or make a copy of the project and delete the unneeded UI stuff and related code? I decided it was simpler to fork my code to a new project.
In the process, of deleting unused UI elements, and adjusting the code, I later realized I deleted some controls that would be really easy to implement. But because the project file is a binary file, I don't see any easy way to add back the 16 UI controls, and avoid going through all the renaming, etc.
If the VM project file was more like XML, it would be trivial to cut and paste visual elements between my projects.
This creates a simple issue for source code tracking, similar to the problems in maintaining .FLA flash project files. Minor tweaks to positions of elements just show up as the entire binary file differing between versions, with no clue as to what changed. At least with VM, if one always does a build of the project, before checkin, the side file of Java code can be checked in and can be diffed between versions. But, eventhough that will help highlight UI changes between versions, there is no easy way to edit the module file to cherry pick some changes, without going into the visual UI and manually tweaking each control individually.
Flash had another file format called .XFL that separated the things that could be represented in XML into separate XML files (DOMDocument.xml, MobileSettings.xml, PublishSettings.xml), and also separate binaries and .AS code files. The .XML files that record visual designer info have the problem that they are very noisy with their "lastModified" fields, when no other field of the given element had any change in value. So diff'ing them was not optimal.