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 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 javascripts, 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.

Advertisements

I am Siva Prasad Rao Janapati. Working as a software developer. Has hands on experience on ATG Commerce(DAS/DPS/DCS), Mozu commerce, Broadleaf Commerce, Java, JEE, Spring, Play, JPA, Hibernate, Velocity, JMS, Jboss, Weblogic,Tomcat, Jetty, Apache, Apache Solr, Spring Batch, JQuery, NodeJS, SOAP, REST, MySQL, Oracle, Mongo DB, Memcached, HazelCast, Git, SVN, CVS, Ant, Maven, Gradle, Amazon Web services, Rackspace, Quartz, JMeter, Junit, Open NLP, Facebook Graph,Twitter4J, YouTube Gdata, Bazzarvoice,Yotpo, 4-Tell, Alatest, Shopzilla, Linkshare. I have hands on experience on open sources and commercial technologies.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

DZone

DZone MVB

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