Development and projects
How are applications and libraries put together built and delivered
The XP project structure is based on the Maven project structure.
Below is an extensive version of a project structure, listing all standard folders and files that can be used
sample-project/ build.gradle gradle.properties gradlew gradlew.bat settings.gradle src/ test/ java/ main/ java/ resources/ admin/ widgets/ tools/ application.svg application.xml assets/ error/ i18n/ idprovider/ main.js services/ tasks/ site/ content-types/ layouts/ mixins/ pages/ parts/ processors/ x-data/ site.xml webapp/
Every file and folder has a specific function and purpose as described below:
- gradlew | gradlew.bat
Gradle wrapper file. Downloads and runs Gradle without having to install it manually.
Mandatory gradle file to boostrap the build process
Optional folder where you place Java code that might be included directly in the project.
Optional folder where you place Java test code.
Non-Java files. The majority of XP project code goes here,
Admin tools are defined here. Tools are administrative apps listed in the admin console menu.
Admin widgets are essentially user interface components that can be embedded within other admin tools.
Application icon in SVG format.
Application information in XML format.
The application’s error handler
Main controller executed every time an app is started.
Contains Http services controllers
Short for internationalization, this folder contains app localization files
ID Providers application files are placed her
Contains task controller for running asynchronous jobs.
Contains site configuration schema and declares that the app can be added to sites
Content type definition files.
For post processing of HTML from pages.
Layout controllers are placed here.
Reusable schemas are placed here.
Page controllers are placed here.
Part controllers are placed here.
eXtra data schemas.
The Webapp controller file