Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Isomorphic Templating With Spring Boot, Nashorn, and React

DZone's Guide to

Isomorphic Templating With Spring Boot, Nashorn, and React

The first part of this talk introduces the upcoming Spring Framework 4.2 Script Templating support. While the second part of the talk will explain how to build an isomorphic application that performs the same templates rendering on client and server based on Spring Boot, Nashorn, and React.

· Web Dev Zone ·
Free Resource

Deploying code to production can be filled with uncertainty. Reduce the risks, and deploy earlier and more often. Download this free guide to learn more. Brought to you in partnership with Rollbar.

Recorded at SpringOne2GX 2015.
Speaker: Sebastian Deleuze
Web / JavaScript Track
Slides: http://www.slideshare.net/SpringCentral/isomorphic-templating-with-spring-boot-nashorn-and-react

The first part of this talk introduces the upcoming Spring Framework 4.2 Script Templating support, showing how you can use Nashorn, Jython, or JRuby to render templates with JavaScript, Python, or Ruby-based template engines. We will see how easily you can extend out-of-the-box capabilities on the scripting side.

Based on benchmarks, features available, and code samples, we will see if this can be a production ready alternative to templating technologies usually used with Spring MVC like JSP, Velocity, FreeMarker, or Thymeleaf.

The second part of the talk will explain how to build an isomorphic application that performs the same templates rendering on client and server based on Spring Boot, Nashorn, and React, the latest game changing JavaScript library released by Facebook. The rendering of JavaScript templates is performed initially on the server-side thanks to a Spring MVC + Nashorn integration, then enriched on the client-side with a Server-Sent Events push mechanism.

This kind of isomorphic templating + the disruptive innovation brought by React with its virtual DOM mechanism make it possible to build new kinds of applications: responsive with great UX while being accessible.

Deploying code to production can be filled with uncertainty. Reduce the risks, and deploy earlier and more often. Download this free guide to learn more. Brought to you in partnership with Rollbar.

Topics:
java ,spring ,spring boot ,react ,nashorn

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}