Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Understanding Play Project Folder Structure

DZone's Guide to

Understanding Play Project Folder Structure

Continue learning about Play for Java, this time with an emphasis on the project folder structure.

Free Resource

Modernize your application architectures with microservices and APIs with best practices from this free virtual summit series. Brought to you in partnership with CA Technologies.

Play Framework - Build Modern & Scalable Web Apps with Java and Scala

In the last article, we have created “Play for Java” application using Activator. In this article, we will try to explore the project folder structure. In the last article, we have created project name as “Learning_Play_App”. The folder structure follows as shown below.

+---Learning_Play_App
| +---app
| | +---controllers
| | +---views
| +---conf
| +---logs
| +---project
| | +---project
| | +---target
| |
| +---public
| | +---images
| | +---javascripts
| | +---stylesheets
| +---target
| | 
| +---test
  • The “app” folder contains controllers and views. For any enterprise application, if you want to add other source code folder like model, you can very well create “model” folder under “app” and keep all your domain models under it.
  • The “conf” folder contains all the configuration files.
    • application.conf –> contains all the application related configurations like database connectivity details, web application context path details etc…
    • logback.xml –> contains the application logging related configuration details.
    • routes –> you need to configure all the REST services end points over here.
  • The “logs” folder contains the application log file.
  • The “projects” folder contains build.properties and plugins.sbt where you can mention plugin related details.
  • The “public” folder contains all the static assets like Javascript, images, and CSS.
  • The “test” contains all the unit test cases.
  • The “build.sbt” under the root application folder contains all the third party related dependencies.

The below picture represents the entire folder structure.

Play Application Folder Structure

In the coming article, we will see how to export Play application as our favorite IDE “Eclipse” project. Still then, “Stay Hungry” to learn.

The Integration Zone is proudly sponsored by CA Technologies. Learn from expert microservices and API presentations at the Modernizing Application Architectures Virtual Summit Series.

Topics:
play framework ,typesafe ,activator ,integration

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}