This is the problem: I am designing a framework that is basically getting chemical compounds, perform operation with them (or among them) and return results.At the moment I have a class that holds all the operations(like mix, centrifugate, separate, heat up and so on). I create a sequence basically by hand, including this class and adding the actions one after another. This is OK for me, since I am a developer, but many of my coworkers do work mostly in a lab environment, and they are not willing to get into writing a new file as such.I am planning to shift to JSON, holding in there a sequence of operations; although I am not sure if this is the right way to create a series of operations, for the lab technicians. Is there a better design to accomplish something similar to my needs?By better I mean something that is safe for the data, easy to use and maintain and performant. Term very generic, especially in the design context.
Best way to design flows based on operations
design;python;object oriented design
JSON (as well as XML) are formats made for transferring information in machine readable form. They can be managed by humans, of course, but for many use cases there are more ergonomic ways to accomplish what you are after. The modern buzzword for this is Domain Specific Language, which means you might invent your own mini-language which suits your (and your coworkers) needs, and write a parser and interpreter for it. If your use case just involves a sequence of operations with some parameters, this is very simple and should not be a big issue. Just define one command for each operation, and let your coworkers write the commands into a text file. In our company, we often used spreadsheet files in the past for such command sequences, which makes it a little bit more user friendly, since in a spreadsheet you can add easily some things like comments, integrated examples, validations, separated parameter columns etc. If you need something more sophisticated, google for domain specific language python, and you will find plenty of articles, tutorials and modules.