Wiki
Clone wikignd / 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.
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
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
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
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
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
- openlayer (to show map on view-chart page https://gomockingbird.com/mockingbird/#nq36az7/QGPoqc)
- create GWT wrapper for implemented OpenLayer's JS component: http://gnd.iriscouch.com/ol_trial/_design/app/index.html
- there is commonly used gwt wrapper for openlayers (http://sourceforge.net/projects/gwt-openlayers/)
- graph (to show graph on view-graph page https://gomockingbird.com/mockingbird/#nq36az7/KpX7oX)
- gflot looks like very good library for charts, diagrams, etc (http://code.google.com/p/gflot/)
- Faceted Search
- It looks like ElasticSearch will handle our faceted search quite well. But, we do need multi-select combo boxes (to select sensor(s), platform(s), trial(s), data-type(s) ). GWT doesn't have one. We'll need to find one.
Updated