concept JavaScript in category akka

This is an excerpt from Manning's book Reactive Web Applications: With Play, Akka, and Reactive Streams.
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.
![]()
Why go through the trouble of using Scala.js and AngularJS, and not simply write the application directly in JavaScript without any library? Indeed, for a simple dashboard application, this approach might look like overkill, but the aim of this chapter is to show you how to use Scala.js together with an existing JavaScript framework, as it helps to increase productivity considerably in the long run. Scala.js enables you to write the entire application in one language (Scala), and it results in more-robust client-side code because the Scala compiler will check it at compile time. Type-safety helps to get rid of many issues that would go unnoticed when writing plain dynamic JavaScript code and makes it possible to refactor the application code with an IDE such as IntelliJ IDEA or Eclipse.