Currently, there is one big View function that communicates with the frontend, the LaTeX service and the Spindle server. It would be best to at least move the communication with the two external APIs to their own module or 'service', with dedicated input validation and error handling.
Currently, there is one big View function that communicates with the frontend, the LaTeX service and the Spindle server. It would be best to at least move the communication with the two external APIs to their own module or 'service', with dedicated input validation and error handling.
Examples of this service approach are found in GrETEL: https://github.com/UUDigitalHumanitieslab/gretel-django/blob/develop/backend/services/alpino.py en ook https://github.com/UUDigitalHumanitieslab/gretel-django/blob/develop/backend/services/apps.py