Search code examples
jsfmicroservicesjakarta-ee

Is JSF still relevant with Microprofile


Still lost in the world of Microservices. Is JSF still relevant with Microprofile and how can we migrate the UI part of a monolith application to Microservices when the same view should get data from many Microservices.


Solution

  • If you are developing a JSF frontend, then you can envision having a microservice that could respond to each page, or each piece of specific functionality in your application. So instead of having a "monolithic" JSF backed, you could have multiple microservice backends.

    Although tis is technically possible, you have to consider if it is he best way ahead for your scenario. For example, if you use multiple microservices, what will happen to your session state, or how will your individual microservices talk to each other ?

    When we think of microservices, we typically think of REST endpoints (although a microservice doesn't need to be REST based). So, if you want to use microservice REST endpoints, maybe some sort of JavaScript view would be more efficient?

    In short, you can use microservices, but you need to establish if there is a benefit for this, or if having a traditional JSF application is best.

    MicroProfile itself does not support JSF, but certainly supports REST endpoints. If you want to use JSF, you would need to use parts of Java/Jakarta EE as well as MicroProfile.