Home » Play Framework

Tag Archives: Play Framework

Run code on startup with Play and Scala

Depending on various projects, sometimes there is the need to execute some actions on initialization just before our application starts to serve requests. It was a common practice to call the functions that we wanted to get executed through GlobalSettings, however it is not recommended. The other way around to achieve this is to implement a class which will be ...

Read More »

Play and SBT basics

Previously we had an introduction to sbt, its default tasks and how to add extra tasks. Play comes with the sbt console. The SBT console is a development console based on sbt that allows you to manage a Play application’s complete development cycle. Let us create a play application using sbt and see the commands provided. sbt new playframework/play-scala-seed.g8 [warn] ...

Read More »

Use JSON with Play and Scala

Once getting your hands into typing scala code using play, the first thing that comes to mind is JSON. Without doubt JSON is one of the most basic components of web applications. Rest apis use json, your angular app has to consume json and the list goes on. If you are lazy like me, you expect that it is sufficient ...

Read More »

SQL Data Access in Play using Scala

Today’s modern application frameworks come with apromise of easy sql data access. There is no wonder why we have so many frameworks that make it easier to issue queries and handle transactions. SQL is the lingua franca of most applications when it comes to databases. Play comes with the JDBC plugin. We encountered the JDBC plugin previously in order to ...

Read More »

Database Initialization with play and Scala

Once starting your play prototype application one of the priorities is to initialize your database and also manage the database schema changes. Play provides us with evolutions. By utilizing evolutions we are able to create our database and to manage any futures changes to the schema. To get started we need  to add the jdbc dependency and the evolutions dependency. libraryDependencies ...

Read More »

Your first Web application with Play and Scala

Today we are going to develop a simple play application using Scala. To do so we must have sbt installed to our system. Once installed we issue the command sbt new playframework/play-scala-seed.g8 Then we are presented with an interactive terminal in order to pass valuable information. name [play-scala-seed]: PlayStarter organization [com.example]: com.gkatzioura scala_version [2.11.8]: scalatestplusplay_version [2.0.0]: play_version [2.5.13]: Then let ...

Read More »

How We Used Slack, Scala and Play to Automate Our Lunch Order

Automate all the things! Slack slash commands to the rescue Every day at noon, lunch orders are launched. All the places we order our food from support online orders BUT there’s this one spot we like that only accepts orders by phone or email. A local homemade food restaurant with a menu that changes every week. At some point we ...

Read More »

It’s easy to document your Play Framework REST API with Swagger


This post orig­i­nally ran on http://​swag​ger​.io (7/30/2015) I hav­ing been using Play Frame­work as a Java-based, lightning-fast REST back­end frame­work for sev­eral projects. Later, I was was excited to find Swag­ger and worked to inte­grate it into a few projects. As I strug­gled with it the first time, I thought it would be use­ful to share my expe­ri­ence and cre­ate ...

Read More »