Search code examples
scriptingfilemakermodular

What is the definition of modular scripting in the FileMaker world?


How do you define modular scripting in the FileMaker context? I am not providing my definition yet on purpose. I want to know what you think. Thanks!


Solution

  • A modular script is one that performs a useful function with no external dependencies outside that script. This is in contrast to what I'll call a 'one-shot' script, which takes few or no parameters but has dependencies specific to the file that it is being used in.

    The ideal modular script takes zero inputs, performs some useful function, and requires no processing of its results. An example of this would be a script that resizes the current window to center the current window on the screen. Because there are no I/O hookups and nothing to be altered outside the script itself, there is no cost to use this script.

    More practical examples will require input parameters and output results. However, keep in mind that as the number and complexity of parameter passing increases, the benefit of modularity decreases. There is a tipping point at which the simplicity of 'one-shot', non-modular scripts that require few or no parameters is the better choice.