Search code examples
intellij-ideaplayframeworkplayframework-2.3typesafe-activatorplayframework-2.4

Create a old Play 2.3.1 framework (current is 2.4.3)


Problem

I'm trying to create a Play 2.3.1 framework, because the lack of info on how to get started with 2.4.3. So much has changed apparently that the tutorials on youtube is useless and I can't get it to work.

Question

How do I do this?

I have tried to go to https://www.playframework.com/download#older-versions but all versions yield the same link to https://downloads.typesafe.com/typesafe-activator/1.3.6/typesafe-activator-1.3.6-minimal.zip

which installs the newest playframework 2.4.3.

Please say that someone knows how to do this?

Also, why should I bother using 2.4.3 > 2.3.1 if I'm only creating a simple mobile app w/database? Security reasons or just "easier"?

Same question for IntelliJ 14 > IntelliJ 13 ?


Solution

  • https://www.playframework.com/download#older-versions is the link you need.

    When you're new to Play! it can be quite confusing so I think a bit of terminology is needed.

    • SBT - Scala build tool. This is a build tool that is baked into every Play! project but totally independent of Play! framework, ie. many Scala projects use this to manage their builds without ever using Play! It's just the Scala equivilient of a Maven, Gradle or Ant. Nothing special.

    • Activator - This is Play!'s commandline, like a build-tool++. It's commandline tool with a superset of the SBT commands clean compile etc etc, with Play! specific ones like 'new', 'run'. It actually just amounts to not much more than a script (.sh/.bat) which bootstraps SBT and some extra goodness for running play commands. In earlier versions like 1.x this command was named play. Version 2.x was a practically a re-write so you can ignore all related advice.

    • Play - the playframework itself is just a regular jar (and all its dependencies). It is declared in the project/plugins.sbt

    So the reason all the download links point to activator-1.3.6 is because that is just the version of the commandline tool. This will default to latest: 2.4.x.

    When you perform an activator new you get a choice of templates. If you REALLY REALLY want to use 2.3.x you could choose this template when prompted hello-play-2_3-scala.

    But I don't suggest you do that because:

    • The documentation for 2.4.x is comprehensive and there are walkthrough guides, it won't take any longer than a youtube video.
    • There are bug fixes and new features in 2.4.x
    • 2.4.x introduced dependency injection which means it will be harder to upgrade once you'ved developed everything in 2.3x.
    • Apart from dependency injection most stuff works the same in 2.4.x

    Intellij: Use 14. Play support is improving all the time. If you can use the Early Access Program and the latest version of the Scala plugin.

    Don't run 'activator idea' - this is deprecated. File -> open project from Intellij should be enough.