Search code examples
microservicesjhipsterjhipster-registry

What is the purpose of generating an Entity into the Jhipster Gateway?


I saw in many tutorials that we need to go back to gateway and generate an entity after generating a microservice application with the same entity.

Can someone explain me, the architectural benefits of doing so?

What is the goal of generating those entities again in Gateway?


Solution

  • One of the points of doing that is to implement the Backend for Frontend pattern. Basically you proxy all calls from your front-end to your microservices through the gateway. For convenience reasons the frontend is packaged together with the gateway. JHipster just adapted the exisiting entity generators from monoliths to let users generate the backend and front-end of an entity separately on microservices and gateways respectively. Of course this is an optional feature and you are free to use it the way you want.