Wiki

Clone wiki

gnd / GND Gwt app design

Design of GWT application

Package structure

Every GWT app has a requirement of package structure. Package hierarchy of our application is shown on figure 1.

GWT App package hierarchy
Figure 1 - GWT App package hierarchy

Our main package is: org.pml.gnd.gwt. In this package no classes are placed. Only GWT descriptor is placed there.
Every client side code (code that will be compiled to javascript) is placed in "client" package. Server side code is placed in "server" package, because our application is only client side application we don't have it.

Main classes

Main package classes
Figure 2 - Classes of main package

In the top package of our application GWT EntryPoint is placed. EntryPoint is main class of any GWT application, it's bridge between html page and GWT application.


UI Classes

UI classes
Figure 3 - UI classes

All UI classes are placed in ui package (Figure 3). MainPage class is page template which has Menu and PageContent (currently I don't see more elements for template but I believe it will be extended in development process). PageContent is abstract class that contains some base methods for every possible page. Every page in mock (https://gomockingbird.com/mockingbird/#nq36az7/sCsPR) has implementation of PageContent class (for example BrowsePageContent - implementation of browse page in GWT app)

There are a lot of pages which has wizard style layout (for example "Adding a file" page: https://gomockingbird.com/mockingbird/#nq36az7/wE9LdV), for such pages another template is created - WizardPage. It works with instances of WizardStep interface and manage steps with chooseNextStep method.


Transport classes

Transport classes
Figure 4 - Transport classes

This package contains all classes which are used to communicate with CouchDB database. DatasetDescription is used to get only dataset's metadata without any coordinates and should be used on Browse page in table. Dataset extends DatasetDescription and also contains data of dataset (for example: coordinates of track). It should be used for example on View page.


DAO Classes

DAO classes
Figure 5 - DAO classes

ConversionUtils - class that has methods to convert JSON received from CouchDb to our transport objects which are placed in "to" package. TracksDAO and TracksDAO impl class is used to communicate with CouchDb.

Technologies

Updated