/
When to use Libraries

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 diagram below, 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.

 

Related content

Configuration Management
Configuration Management
More like this
The Rules of Three
The Rules of Three
Read with this
Structuring Component Translators
Structuring Component Translators
More like this
Libraries
More like this
Main.lua
More like this
Libraries are stored as Git Submodules
Libraries are stored as Git Submodules
More like this