SparkJava – A tiny Sinatra inspired framework for creating web applications in Java 8 with minimal effort
So I began to play around with the possibility of creating a light-weight Java 8 micro-service but leveraging the richness of React to perform server-side rendering. To what end? I wasn’t even sure it would work. But it did, surprisingly well.
Head on over to my GitHub repository for a closer look and more details. There really isn’t much code once you understand the basic pieces that have been pulled together.
When might you want to use this?
- If you have an Enterprise Java stack and concerns about adding NodeJS
- When you want to serve fully server-side generated SEO friendly pages
- When most of the data rendered on the page does not need to be dynamic
It would be interesting to come back and see if this project could make use of the isomorphic capabilities of ReactJS, to provide dynamic updates from the client-side too. But for now, I think this fills a niche use-case for serving up server-side pages of data extracted right out of a Java process without the need for another layer of middleware.