Here's a tutorial about the powerful Java framework named Play. If it's named this way, let's play a game :)
Play is an open-source modern web framework for writing scalable web applications in Java and Scala. Play is based on a lightweight, stateless, web-friendly architecture. Built on Akka, Play provides predictable and minimal resource consumption (CPU, memory, threads) for highly-scalable applications. It is developer friendly, write code, hit refresh key and see changes. Has powerful console and build tools, has great support for Eclipse and Intellij IDEA.
http://assist-software.net/blog/how-play-work-play-framework-tutorial
2. What is Play Framework
• An open-source modern web framework
• Based on a lightweight, stateless, web-friendly architecture.
• Built on Akka, Play provides predictable and minimal resource consumption
• Developer friendly
• Has great support for Eclipse and Intellij IDEA.
• Provides RESTful by default
• Has a built-in JSON module and extensive NoSQL & Big Data Support.
• There are libraries for everything - most of which can be used in Play.
3. System Requirements
• Install JDK 1.6 or later.
• Install Scala (general-purpose language designed to support clear, concise and
type-safe programming). Optional, but good to have, you may also use Java.
• Install SBT is an open source build tool for Scala and Java projects, similar to
Java's Maven or Ant.
• Install Play Framework through a tool called Typesafe Activator.
• Install PostgreSQL.
• Install pgAdmin is a comprehensive PostgreSQL database design and
management system.
4. Game Play Tutorial
• Let's create a new vanilla Play Scala application and name it scala-game. Here
is the command you need to run it in command-line:
• To start your game from command-line run from your project root folder:
• or (recommanded)
• To view your work go to: http://localhost:9000/
5. Game Configuration Tutorial
• To add more experience to your Play skills add the following dependencies to
your build.sbt file:
• Slick - a modern database query and access library for Scala.
-It allows you to work with stored data and gives you full control
• PostgreSQL JDBC is necessary to connect to PostgreSQL database
6. Game Configuration Tutorial
• Then, create a database and add its credentials to application.config file.
• Add a package named dao to your app folder
• Define database tables and set it in configuration
• Uncomment evolution plugin and set it enabled
• Play Framework's Evolutions will create tables and relations between them
(primary keys, indexes, sequences etc...) for you.
7. Game Configuration Tutorial
• We have to specify to which database to connect creating a trait
named PostgresSupport and define an implicit database