Chapter 8. Responsive user interfaces

 

This chapter covers

  • Setting up a Play project to work with Scala.js
  • Integrating the AngularJS framework with Scala.js
  • Writing your own integration of JavaScript libraries with Scala.js
  • Best practices for building responsive user interfaces

To monitor the Twitter SMS service from chapter 7, we now need an administrative dashboard that will allow us to visualize a few key performance indicators of the service.

To increase our developer happiness, we’ll employ Scala.js (http://scala-js.org), which will allow us to work in a type-safe fashion. Scala.js allows us to write Scala code that compiles down to JavaScript and to leverage existing JavaScript libraries. We’ll also use the AngularJS framework (http://angularjs.org). Figure 8.1 shows how all these parts fit together.

Figure 8.1. The Scala.js application is written in Scala, leverages existing JavaScript libraries through bindings, and compiles down to JavaScript.

8.1. Integrating Scala.js and Play

8.2. Integrating Scala.js and AngularJS

8.3. Integrating existing JavaScript libraries with Scala.js

8.4. Handling client-side failure

8.5. Summary