§Main concepts for Scala
This section introduces you to the most common aspects of writing a Play application in Scala. You’ll learn about handling HTTP requests, sending HTTP responses, working with different types of data, using databases and much more.
Note: The Play APIs for Scala and Java are separated into different packages. All the Scala APIs are under the
play.api
package; all the Java APIs are underplay
. For example, the Scala MVC API is underplay.api.mvc
and the Java MVC API is underplay.mvc
.
Configuration API
HTTP programming
- Actions, Controllers and Results
- HTTP Routing
- Manipulating HTTP results
- Session and Flash scopes
- Body parsers
- Actions composition
- Content negotiation
- Handling errors
Asynchronous HTTP programming
The Twirl template engine
Form submission and validation
Working with Json
- JSON basics
- JSON with HTTP
- JSON Reads/Writes/Format Combinators
- JSON automated mapping
- JSON Transformers
Working with XML
Handling file upload
Accessing an SQL database
Using the Cache
Calling REST APIs with Play WS
Integrating with Pekko
Internationalization with Messages
Dependency Injection
Application Settings
Testing your application
- Testing your Application
- Testing with ScalaTest
- Writing functional tests with ScalaTest
- Testing with specs2
- Writing functional tests with specs2
- Testing with Guice
- Testing with compile-time Dependency Injection
- Testing with databases
- Testing web service clients
Logging
Next: Configuration API