Home » Tag Archives: Play Framework

Tag Archives: Play Framework

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

java-interview-questions-answers

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 »

How to use Hibernate to generate a DDL script from your Play! Framework project

Ok, so you have been using the hiber­nate prop­erty name=“hibernate.hbm2ddl.auto” value=“update” to con­tin­u­ously update your data­base schema, but now you need a com­plete DDL script? Use this method from you Global Class onStart to export the DDL scripts.  Just give it the pack­age name (with path) of your Enti­ties as well as a file name: public void onStart(Application app) { exportDatabaseSchema("models", ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns