My question is I personally spent last 2 years working on a Django project for a factory, it uses the standard MVC pattern. The app uses the factory IP for authentication for terminals in the factory. It was my first web project and I have learnt a lot from it, and hence re-written many aspects of it.
3 Problems with Django MVC
However I have now reached a point where I am wondering if it needs a re-write since I see no great solutions to the following problems with the MVC pattern:
I wish to be able to POST data, and control what happens if it fails on the client side. With a normal POST, once one has submitted the form, one let's go of control. This means if the server is restarting, or receiving an update, and the reverse proxy is not up yet, Nginx shows an error and it parks on the error. I would like to be able to perform updates (take the Fast CGI (Django) down for 5 seconds) and have the website handle it seemlessly. Currrently if a GET is performed while the proxy is down, I serve up a maintenance page that tries to refresh every 5 seconds, so GETs work fine, but POSTs are a problem. SPA uses AJAX so one is still in control after the submission of data.
If the internet connection is down, I would like to cache the POST, like a PWA?, then when online, send all the POSTS through. PWA solve this issue with their offline caching ability.
When the internet goes down, the factory has a back up 3G internet connection, but then their IP address changes, hence IP based authentication then fails. There are public input station in the factory, hence they don't use user based authentication, so I need to figure out a new auth method. SPA use a token method which I think solves this problem.
The above issues seems to be inheritantly solved when one moves to a SPA/PWA (according to my research, but I have never made a SPA/PWA). Would you recommendend changing to SPA/PWA or hammering the MVC to solve the above issues?