Although the slides cover aspects of Play Framework, but it will be much more beneficial for readers to go through these slides with tutorials present at tech-phile.com.
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Play Framework Intro-I
1. Play Framework
Note: The slides will be synchronous to the Tutorials at tech-phile.com
for Play Framework.
2. Introduction : Why Play?
●
●
●
●
●
●
●
●
●
Lightweight
Stateless
Type safety
Built in testing tools
Built on Akka
Non-blocking I/O
RESTful by default
Minimizing Mutability
Reactive model
3. Play Framework : Layout I
app
→ Application sources
└ assets
→ Compiled asset sources
└ stylesheets
→ Typically LESS CSS sources
└ javascripts
→ Typically CoffeeScript sources
└ controllers
→ Application controllers
└ models
→ Application business layer
└ views
→ Templates
build.sbt
→ Application build script
conf
→ Configurations files and other non-compiled resources (on
classpath)
└ application.conf
→ Main configuration file
└ routes
→ Routes definition
4. Play Framework : Layout II
public
→ Public assets
└ stylesheets
→ CSS files
└ javascripts
→ Javascript files
└ images
→ Image files
project
→ sbt configuration files
└ build.properties
→ Marker for sbt project
└ plugins.sbt
→ sbt plugins including the declaration for Play itself
lib
→ Unmanaged libraries dependencies
logs
→ Standard logs folder
└ application.log
→ Default log file
target
→ Generated stuff
└ scala-2.10.0
└ cache
└ classes
→ Compiled class files
└ classes_managed → Managed class files (templates, ...)
└ resource_managed → Managed resources (less, ...)
└ src_managed
→ Generated sources (templates, ...)
test
→ source folder for unit or functional tests
5. /app Directory
●
●
●
●
●
Contains all executable artifacts: Java/Scala Source Code
Templates (views package)
Compiled assets sources(CoffeeScript, LESS etc) : app/assets
Three standard packages in the app directory
app/controllers
app/models
app/views
Own packages can be added.
7. conf/ Directory
●
●
Contains the application’s configuration files.
Two main files are:
application.conf -> the main configuration file for the application, which
contains standard configuration parameters.
routes -> the routes definition file.
8. lib/ , project/ Directory
●
●
lib/ : all JAR files you want to manually manage outside the build system.
project/ : plugins.sbt defines sbt plugins used by this
project