Get to know Typesafe activator

What is Activator?

Activator is a tool developed by Typesafe Inc. to build reactive applications easily and quickly.  If you are familiar with SBT tool, then you will not have any difficulty to get started with Activator, as this tool is built upon SBT. So, in a simple way, Activator could do everything which SBT could do, plus more.


Activator, as compared to SBT has two more additional commands to give an edge. The first command is Activator’s ui, which fires up a web based GUI, where you can run any program and see the result right there. And, the second command is new, this command lets your get started with a new project, either from the list of available templates or starting from the basic project. Activator tool could be used for both Scala and Java projects. There is a huge collection of templates to get on going from, from minimal-java or minimal-scala project to complex apache-spark-seed template. Activator new command will create a standard directory layout with build files and all the files needed to get started with the project, including ui part. Here is an example of how quick it is:

$ activator new
> 4
> first-scala-project
$ cd first-scala-project
$ activator test
$ activator run

Thats it, a new Scala project is ready within seconds. Here no. 4 on second line of the code block is representation of minimal-scala template in the list. You can also see a full list of templates by hitting tab after you press enter from new command. And, if you want to see templates for specific options such as Spark, then you have to type Spark<tab>, and it will show all the related templates starting with Spark.

Activator has lot of other benefits as well. It will keep it self updated. That means, every time you run Activator, it will check for updates and update itself if necessary. It also replaces Play command in the Play framework. It comes in two package sizes for download, one in 350 MB, which contains all the dependencies bundles and a 1 MB, which downloads the dependencies only when required lazily. There is also a Inspect functionality, which is part of ui mode, lets you track play requests, akka actor inboxes, and actor issues. Activator also comes with remote debugging mode which is consistent for all the Activator projects.


So, what are you waiting for? Give it a try!