Sunday, May 8, 2016

Getting started with Play Framework

Getting started with Play framework depends on the Play version. The official site describes the similar installation procedure for Play 2.4.x and almost all releases of Play 2.5. It suddenly changes to the different one starting in the couple of recent releases of Play 2.5.
Let's put all this to order.

The sbt, activator and Play versions

Play uses as the build tool the sbt. The sbt provides the CLI and sbt-shell.

The activator is a superset of the sbt. It supports all sbt commands and has two more commands: new and ui. Practically any example using the activator may be substituted by sbt (except these two commands) and vise versa: the sbt may be totally replaced by the activator.
The sbt version matters very much. The current sbt branch is 0.13. Its turning point is the version 0.13.13, which supports the command new. The sbt releases before 0.13.13 demands the complementary activator for creating a new project (new command). Starting from the sbt 0.13.13 no more activator is needed. According to the Lightbend official site the activator will be EOL-ed on May 24 2017.

The binding between the Play version and the sbt version is configurable (it is explained further, how it is done): the older sbt (before 0.13.13) may be used with the recent Play release or older Play may be used with the most recent sbt. The only difference is what is the command to be used with CLI: sbt or activator. The earlier Play installation procedures are using the activator and means that the sbt is before 0.13.13. The recent installation procedure does not mention the activator at all. So, it means the sbt version 0.13.13 or higher.

Installation with sbt

This procedure should be likely used for the recent sbt versions. Proceed to the post.

Installation with activator

This procedure is relevant for older sbt versions. Proceed to the post.

No comments
:

About the author

I trust only simple code and believe that code should be handsome. This is not a matter of technology, but professional approach, consolidated after years of software development. I enjoy to cause things working and feel very happy, when I manage to solve a problem.