Creating a Play application is pretty easy and fully managed by the
Play command line utility. This encourages a standard project layout
across all Play applications.
Open a new command line and enter:
Open a new command line and enter:
$ play new myProject
The play new myProject
command creates a new directory myProject
/
and populates it with a series of files and directories. The most important are as follows.app/
contains the application’s core, split between models, controllers and views directories. This is the directory where .java source files live.conf/
contains all the application’s configuration files, especially the mainapplication.conf
file, theroutes
definition files and themessages
files used for internationalization.project/
contains the build scripts. The build system is based on sbt. But a new play application comes with a default build script that will just work fine for our application.public/
contains all the publicly available resources, which includes JavaScript, stylesheets and images directories.test/
contains all the application tests. Tests can be written as JUnit tests.
Comments
Post a Comment