Chapter 1. An introduction to Play
This chapter covers
- What the Play framework is
- What high-productivity web frameworks are about
- Why Play supports both Java and Scala
- Reactive programming
- Play 2 enterprise features
- What a minimal Play application looks like
Play isn’t really a Java web framework. Java’s involved, but that isn’t the whole story.
The first version of Play may have been written in the Java language, but it also ignored the conventions of the Java platform, providing a fresh alternative to excessive enterprise architectures. Play was not based on Java Enterprise Edition APIs and made for Java developers; Play is for web developers.
Play wasn’t written for web developers, it was written by web developers, and they brought high-productivity web development from modern frameworks like Ruby on Rails and Django to the JVM. Play is for productive web developers.
Play 2 is written in Scala, but that doesn’t mean you have to write your web applications in Scala or even know anything about Scala. This is because Play 2 comes with a complete Java API, giving you the option to pick the language that suits you best. If you’ve used Play 1.x before, you’ll notice that the API has become more type-safe.