Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In Grails they stress convention over configuration.  Grails basic structures follow the MVC pattern.  The grails-app/domain directory holds the Models, the grails-app/views directory holds the Views and the grails-app/controllers directory holds the Controllers.  There are are:

%PROJECT HOME%

  • grails-app
    • conf
      • BootStrap.groovy                        <- Initializes the database with given data.
      • BuildConfig.groovy                      <- Holds configurations for the build (dependencies, plugins, repositories, error logging level).
      • Config.groovy                             <- Holds various configurations for the project.
      • DataSource.groovy                     <- Holds database settings for each type of environment.
      • SpringSecurityConfig.groovy        <- Holds additional configuration settings for the Spring Security plugins.  Has to be included at the
                                                             beginning of Config.groovy.
      • UrlMappings.groovy                    <- Allows the changing of the Url scheme.
    • controllers          <- Holds the controller classes.
    • domain               <- Holds the model classes, grails will by default create a corresponding table for each file in this directory.
    • services              <- Directory to hold any services the application will host.
    • views                  <- Holds the view gsps.
  • lib
  • scripts               <- Holds the various grails command scripts as well as any user-defined scripts.
  • src
    • groovy                <- Generic groovy source files that don't have a conventional location.
    • java                    <- Java source files, will be compiled and included in WAR file.
  • test                   <- Holds the test files that will be run by the "grails test-app" script.

...