Musings on Architect, MVC, Nested Behaviors

Richard Gaskin ambassador at fourthworld.com
Sat Dec 29 13:03:04 EST 2018


Quentin Long wrote:

 >> From: Richard Gaskin <ambassador at fourthworld.com>
 >> By what means would be indicate which properties we want saved there
 >> and which ones we don't care about?
 >
 > To a first approximation, I'd say that any property which has been
 > changed from the engine's built-in default value should be saved. One
 > would expect that the engine's defaults can be easily accessed for
 > such a purpose?

If completeness were the goal that would of course be a good way to 
handle it.

But is complete representation of all properties the goal with 
script-only stacks?

The binary stack file format we've been using for decades does a 
complete job of retaining all persistent properties as-is, along with 
anything else a stack file can contain.

Script-only stacks were added to the mix of options to allow us to 
factor code from UI in ways that work well with the many existing 
versioning systems.

Expanding on that to transform them into a complete representation of a 
stack file may not be difficult, but is a different mandate.

And if we err on the side of completeness we may find unwanted side 
effects for that intended purpose.

For example, what if you slide a script-only stack out of the way to 
look at something, and then save it.  If the format includes the rect 
the file is marked as changed, yet that change is not something the 
developer using a script-only stack would care about.

So ideally there would be a way to flag rect as a property we don't want 
to track in the file.

Or conversely, there could be a mechanism for flagging only those 
properties we do want, and ignore others.

This seemingly-simple idea turns out to have some sticky implications, 
which is why, after many years of exploring various serialization 
formats for stack files, the team opted for script-only stacks as a 
simple solution for the most common use case.

Breakpoint support may well be a uniquely valuable addition worth 
considering.  I rarely use them myself, but I can appreciate their 
utility for many.

But if we go down that road we should probably ponder whether that's 
where the road ends, and if not how we want to travel the rest of that road.

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the use-livecode mailing list