In the process of writing a module, you will likely encounter certain situations multiple times, including situations that have been faced many times by the developers on Ignition as well. For these very common cases, it's useful to be aware of various helpful "utility" classes that exist in the platform that can help.
The necessity of coercing values to a certain type is extremely common. The TypeUtilities class is extremely useful, and supports a large number of coercion scenarios. It goes far beyond basic casting, and can translate between many different types intelligently. For example, it can convert an enum to integer through the invocation of , first looking for a getIntValue() function on the enum, and then using the ordinal position, and vice-versa.
Provides several methods for easily closing connections, statements, result sets, etc. without having to perform all of the normal fault checking. For example, this common code: