-
-
Notifications
You must be signed in to change notification settings - Fork 44
Getting started
In this short getting started document we will learn how to create and setup a project for domino-ui.
Let's create your first domino-ui project, steps below will guide you through the whole process it will only take you less than 5 minutes!
There is more than one way to create a new domino-ui project and we will go through them all
recommended for learning the lib
- Java
- Maven
- Crate a new folder for the project, this could be any empty folder
- Open a terminal in the created folder
- Execute the below command, it will create a new domino-ui project.
mvn archetype:generate \
-DarchetypeGroupId=org.dominokit.archetypes \
-DarchetypeArtifactId=domino-ui-archetype \
-DarchetypeVersion=1.0-SNAPSHOT
While executing, it will ask you to fill some values : groupId, artifactId, version, package
- Once the last commands complete cd into the generated project folder, the folder name is the artifact name you entered in the previous step.
- Execute the command :
mvn clean install
.
Execute the below commands each in different terminal:
mvn tomcat7:run -pl *-server -am -Denv=dev
this command will start the application server
mvn gwt:codeserver -pl *-client -am
this command will start gwt super dev mode.
You can run both commands in one terminal:
mvn tomcat7:run -pl *-server -am -Denv=dev | mvn gwt:codeserver -pl *-client -am
find more information about this archetype and the run commands here
OR
Run the application using the shell script included in the generated project
In project root folder make sure the file run.sh is executable then execute
./run.sh
Nalu is a lightweight MVP framework which comes with a project initializer for easy getting started and offers domino-ui as the default widget set
The UI for Nalu project initializer itself is built using domino-ui, find Nalu initializer here
- Java
- Maven
- Open Nalu project initializer
- Fill the the Group id and Artifact id
- Click generate
- Download the generated project
- Extract the downloaded project
- cd into the extracted folder
- execute
mvn clean install
execute the following command mvn gwt:devmode
From the gwt devmode dialog click on Launch default browser
If you want to add domino-ui to an existing project rather than starting one from scratch you will need to follow these steps
- In the index html page add the following into the head section
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" ame="viewport">
<link type="text/css" rel="stylesheet" href="{module-short-name}/css/domino-ui.css">
<link type="text/css" rel="stylesheet" href="{module-short-name}/css/themes/all-themes.css">
- in your pom.xml add the following dependencies
<dependency>
<groupId>org.dominokit</groupId>
<artifactId>domino-ui</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.dominokit</groupId>
<artifactId>domino-ui</artifactId>
<version>1.0-SNAPSHOT</version>
<classifier>sources</classifier>
</dependency>
- in your .gwt.xml file add the following inherits :
<inherits name="org.dominokit.domino.ui.DominoUI"/>
with this you should be ready to use domino-ui in your project.
GWTBoot is a set of starter modules for gwt with spring-boot as a backend that already offer a module for domino-ui: gwt-boot-starter-ui-domino
there is 2 ready samples using this starter modules for domino-ui, gwt-boot-sample-ui-domino which is a pure gwt sample without dependency injection nor mvp framworks and gwt-boot-sample-ui-domino-dagger2 which is the same sample but uses dagger2 for dependency injection.