When to use Libraries

In a Translator project you have the option to organize your logic into local files or creating libraries. But how do you decide where specific logic should live?

Referencing the below diagram, anything on the far right is a good candidate to be a library.

  • Local modules are used for creating functions that are specific to a single component.

  • Libraries are for common code that can be used by multiple components. For example, codemap is a general utility module you can use to perform simple code lookups using defined maps.

Â