I have been working under the belief that our applications are best implemented as Ignition modules. In response to comments in other topics, I’m revisiting the question of whether to write Jython scripts or modules.
Conceptually, our typical application will act as a kind of middleware between Ignition devices and a database. A device will expose tags. In response to changes in tag values, rows in the database will be updated, new rows added, and existing rows deleted. A single event may result in modifications to multiple tables.
In the typical programming environment, the data, and the manipulations of the data, would be modeled as a set of classes. There would be, say, ten or twenty classes, with inheritance. Because many devices will need access to these classes, there would be a class library that can be imported.
As I read the Ignition Programmer’s Guide, and the online Ignition manual, I infer that the only way to expose a library to a Python script is via ScriptManager, in a module. Is this true?
If so, then we would need to write a module in order to make our class library available to the devices.
The alternative would be to expose only the data to the devices, through the system.db collection of scripting functions. To standardize the manipulation of the data, we could create a psuedo-library of Python scripts that can be copied and pasted into the script editor, where the programmer can edit parameters to suit the circumstances. This would be an error-prone and tedious process.
So it seems to me that we do need to write modules. Have I missed something?