I'm working on a suite of micro-services, with a web-based GUI. We are using a 3rd party state machine via REST calls. Sometimes we get/set state from one of our micro-services, while other times we go straight from the GUI directly to the state machine bypassing our micro-services entirely.
I'm of the opinion that the UI shouldn't do this for a few reasons:
- I prefer GUIs to be dumb; having no knowledge of components such as database, state machine, caching, etc
- I believe the GUI is merely one component of the application, not the application itself.
- I believe micro-services should be able to work independently without a hard requirement on the UI
Some counter-arguments against this have been:
- Proxying a REST call through a micro-service adds complexity to the micro-service
- It is quicker and more efficient to call straight from the UI
- Our calls to micro-services also use REST, so there is no difference in the tooling
I would like to know if there are any best-practice recommendations?