Start to develop quick with Ontimize in a few steps

1. Download and import the project

Download the basic Maven project from here and import to your IDE (in this case, eclipse).

To import, unzip the file downloaded in a destination folder. In eclipse select File > Import > Existing Maven Projects

GettingStarted001.PNG

Click in Browse... and select the directory where the project was extracted. Select the parent project and his children modules. Click Finish to import the project

GettingStarted002.PNG

2. Built the application

Once imported, before launch the application, is necessary build all modules and install it in the local repository. The local repository is a folder created in your home directory and where all downloaded binaries and project built are stored.
To build a project, right click in the parent project, Run As... and click in Maven install. This action create a *.jar of your modules project in the target folder on each module. To remove the target *.jar created before, right click in parent folder, Run As... and click in Maven clean.

GettingStarted003.PNG

3. Run the application

After build the application, you can run it. Every application consist in three modules, database, server and client. 

Run the modules in the following order:

  1. Database
  2. Server
  3. Client

Right click in all *.launch file under parent project and select Run As... > and the option with the same name that the file


Database module (Press to expand)


Server module (Press to expand)


Client module (Press to expand)

4. Creating a new entity

DB Table

There are two ways to modify the database, with the application itself or with an external SGBD application.

To connect with an external application, you need the following information:

  • Settings Format: Database URL
  • Driver (JDBC): HSQLDB embedded
  • Database URL = jdbc:hsqldb:hsql://localhost:9003/templateDB
  • Database Urerid : DEMO
  • Database Password : DEMOUSER

Instead of using an external application, you can use the SQL module inside the application. Can be found at: Module > SQL Queries

Write and execute the following sentence:

CREATE MEMORY TABLE CUSTOMERS(CUSTOMERID INTEGER NOT NULL PRIMARY KEY,NAME VARCHAR(255),ADDRESS VARCHAR(255),COMMENTS LONGVARCHAR,STARTDATE TIMESTAMP,PHOTO BINARY,SURNAME VARCHAR(255),ID VARCHAR(50),EMAIL VARCHAR(255),LONGITUDE DOUBLE,LATITUDE DOUBLE)

GettingStarted011.PNG

Server module

Create ECustomers.xml in com/ontimize/demo/server/entities/prop/ECustomers.properties


ECustomers.properties (Press to expand)

Edit entities.properties file to add the new entity


entities.properties (Press to expand)

5. Creating form and tree

Client module

Create the form formcustomers.xml in com/ontimize/demo/client/modules/management/formcustomers.xml


formcustomers.xml (Press to expand)

Create the tree treecustomers.xml in com/ontimize/demo/client/modules/management/treecustomers.xml


treecustomers.xml (Press to expand)

6. Adding a menu and linking forms

Client module

Edit the menu.xml to add a new menu.


menu.xml (Press to expand)

Edit the clientapplication.xml to link the menu and the new forms.


clientapplication.xml (Press to expand)

Etiquetas:
Creado por Systems Imatia el 2015/05/15 12:19
    
This wiki is licensed under a Ontimize license
XWiki Enterprise 8.0