play framework
anatomy of a play project
• Master student of Information
Systems and Computer @ IST
!
• 2 years of experience developing in
Scala
!
• Currently doing awesome stuff @
Codacy
Who am I?
Rodrigo Fernandes
@rtfpessoa
SBT
Scala (Simple) Build Tool
SBT
• Play Framework seamlessly integrated with SBT
• Play Framework is an SBT plugin (since v2.3.x)
How to integrate?
SBT
• build.sbt — define the project
and sub-projects relation and
configuration!
• project — root project plugins
and extra definitions!
• plugins.sbt
• [Common.scala]
• [Dependencies.scala]
How to configure?
SBT build.sbt
SBT
plugins.sbt
SBT
Common.scala
SBT
Dependencies.scala
Play Framework
application setup
Routes
Default routes and asset optimisations
Multi Layer Application
rules
services
controllers
models components/database
(Slick)
components/rules
components/services
framework
root application
Multi Layer Application
rules
services
controllers
models
Native UI (C#) API (REST)
HTML
Service Level Permissions
services.account.AccountServices
Response
Forms
Frontend
Forms
Backend
Controller Authentication
Database
Slick — Scala Language Integrated Connection Kit
Features
•fully type-checked
•no SQL-injections
•no typos
•code completion
•can still crash in runtime :’(
Example Table
Base Table
Security
Security
SecureString
Questions?
Thank you
For more info check out:!
https://github.com/codacy/codacy-playframework-seed
https://www.playframework.com/documentation/2.3.x/Home
http://www.scala-sbt.org/0.13/tutorial/index.html
@codacy @rtfpessoa
Play Framework (anatomy of a play application) @ Codacy

Play Framework (anatomy of a play application) @ Codacy