Vitaly,
Firstly, thanks for taking a look at my book, greatly appreciated!
With respect to the UI code in the book, I'd like to clarify that it's not Node.js but ReactJS being used for the UI. Node and NPM are simply the means of collecting the required dependencies for ReactJS and providing a quick way to run the UI. It's also possible to use `mvn package` and then `java -jar` the resulting uber jar which will run the HTML/JS code using an Undertow web server.
The reason I chose ReactJS is: 1) It gave me a chance to learn a new UI technology, and who doesn't love to learn something new, and 2) I firmly believe that the future of UIs and microservices is that different groups will be implementing each piece of it. Therefore it's less likely that there will be JSF or Spring MVC UIs going forward, as they will be developed by dedicated front end developer teams dealing with HTML/CSS/JS.
Also, it's been close to 6 years since I've used JSF in any way, so learning JS was easier than trying to re-learn JSF, which I would not need to use again.
In the end though, my goal with the UI code was not to distract from the main material of the book, or to have the reader delve into a particular UI technology. It was merely as a way to show how JAX-RS endpoints, and security authentication, can be used in a UI, in particular for those that are not necessarily familiar with how a UI might interact with RESTFul services that server developers create.
Everyone is free to have their own opinion.
Ken
|