Understanding Play Project Folder Structure

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 a 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 the 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 endpoints 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 the Play application as our favorite IDE “Eclipse” project. Still then, “Stay Hungry” to learn.

Advertisement

Siva Janapati is an Architect with experience in building Cloud Native Microservices architectures, Reactive Systems, Large scale distributed systems, and Serverless Systems. Siva has hands-on in architecture, design, and implementation of scalable systems using Cloud, Java, Go lang, Apache Kafka, Apache Solr, Spring, Spring Boot, Lightbend reactive tech stack, APIGEE edge & on-premise and other open-source, proprietary technologies. Expertise working with and building RESTful, GraphQL APIs. He has successfully delivered multiple applications in retail, telco, and financial services domains. He manages the GitHub(https://github.com/2013techsmarts) where he put the source code of his work related to his blog posts.

Tagged with: ,
Posted in Frameworks, Play

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Dzone.com
DZone

DZone MVB

Java Code Geeks
Java Code Geeks
OpenSourceForYou
%d bloggers like this: