In a microservices architecture where each component does one thing, how do you handle GUI logic? How do you avoid building a front end web application that has a lot of smarts built into it where it knows some of the internal workings of each microservice it calls?
Let's say we have a website for employees in Acme to use to get office supplies delivered to them. We would have a sign in component... an inventory component... and a delivery component. We build a web interface to wrap all 3 components together. Inevitably in order for us to show what's in stock, in addition to calling the inventory API (that provides basic CRUD functionality to maintain inventory), the web application would need some knowledge of inventory "stuff" to be able to display things properly. This means the web developer that is creating the GUI application would need to be in communication with the API devs... who may or may not be in the same time zone etc.
One way to handle this would be to have domain developers include GUI logic as a part of the REST API.... code on demand. So the main GUI guy who is building the main interface can call methods on the APIs that return HTML or javascript or whatever. But the downside of this method is that the code on demand methods would basically hide some implementation details.
Interested in hearing your opinion / thoughts. Thanks.