Title: Deutscher Wetterdienst
1Deutscher Wetterdienst
The NinJo Client Framework Sibylle
Haucke Deutscher Wetterdienst Sibylle.Haucke_at_dwd.d
e
2The NinJo Client FrameworkOverview
- NinJo (Common Graphics System) Client -
Requirements And Solutions - MVC And PAC - A Simple Introduction
- PAC - Agents In NinJo
- PAC - The Framework
- PAC - How To Create a New Layer ?
3NinJo Client Important Requirements
- User Requirements
- provide all capabilities of older systems (MAP,
GeoBert, IGS, SWC) in one - heavily interactive
- nevertheless easy to use, intuitive user
interface - effective, safe and quick to use
- Developer/project Requirements
- expandable, easy to maintain
- portability
- country and language independency
- capability to configure various workplaces
- to be built by distributed teams with long
distances to each other - build working environment for each team member to
take advantage of his capabilities and
experiences (e.g. RADAR expert , SAT image
expert, analysis expert)
4The NinJo ClientCan we live up to our customers
expectations
- It seems to be not solvable
- We started with the analysis of the existing
systems - their advantages and disadvantages from user side
- kinds of presentation of meteorological data
- different kinds of user interaction
- requirements on products to be produced
- experiences with maintenance
- Then we begun to design lookfeel of GUI
- We could identify tasks for different modules of
the future software
5NinJo Client Example-MAP-Software
NowcastingObservation DataSatellite ImageModel
Field
6NinJo Client Solutions Layer For Presentation
- We realised that all kinds of presentation in
geographical area need layers - Idea of a Layer-Framework
- each (presentation) layer is responsible for one
kind of data, for example - surface observation (SYNOP, SHIP, METAR,..)
- radar imagery
- satellite imagery
- geography (several layers for coasts, rivers,
borders, towns, orography) - model fields (isoline)
- aerological (FM35)
- nowcasting
- lightning data ...
7NinJo Client Solutions Layer 2
- Layer-Framework
- Each layer can process events and holds its own
data - Layers have common and special behaviours
- Layers must be combined in one window (Canvas)
- We need a mechanism to manage layers, process
events and user actions - Design of the Layer Framework
8NinJo Client Conclusions Programming
Environment
- We have to construct an open architecture to make
the system expandable - Design modular software with clear distribution
of responsibilities - Object oriented design gives possibility to build
expandable, well structured software - Object oriented techniques are very suitable for
solving such a problem - Early decision
- pure Java Application
- Graphics based on Java 3D / Java 2D
- Use design patterns for reusable software modules
9Overview
- NinJo Client
- MVC And PAC - A Simple Introduction
- PAC - Agents In NinJo
- PAC - The Framework
- PAC - How to Create a New Layer ?
10MVC And PAC Design Patterns What is that?
- A Design Pattern is a solution to a multiply
recuring problem in OO software design - Patterns collect solutions, that were found
during software development all over the world - To handle the problems and their solutions as
patterns, make it easier to recognize problem
situation and solve it. - Using design patterns makes the software more
reusable, more flexible, more modular. - The Gang of Four has collected and described
important design patterns 1 - Now we could look for a suitable design pattern
and found the PAC paradigm, a hierarchical
Model-View-Controller MVC - Literature 1 Gamma,Helm,Johnson,Vlissides
Design Patterns, Addison Wesley 1995
11MVC And PAC MVC- Pattern Model, View, Controller
- Model
- holds application data
- can have several views and informs them of any
data changes
actualise
actualise
Model
- Views
- visualise data on screen
- get data from model
View1
View2
getData
getData
modify
Controller
- Controller
- controls gui
- receives events
- provides possibilities for handling the user
inputs - controls model and view
modify
modify
events
12MVC And PAC PAC - Presentation/Abstraction/Contro
l
- PAC paradigm, a hierarchical Model-View-Controller
MVC - Abstraction (Model) - a logical model of the
problem. - Presentation (View) the screen representation of
the complete or of a special part of the model.
Views can be nested, allowing a view of
high-level to comprise views of its subsystems. - Control (Controller) defines how the UI reacts
to user input. - In an event-based system, it's the controller
that catches any fired events.
13Overview
- NinJo Client
- MVC And PAC - A Simple Introduction
- PAC Agents In NinJo
- PAC - The Framework
- PAC - How to Create a New Layer ?
14PAC Agents MVC Triples In NinJo
- NinJo Client consists of a tree of MVC triples,
called PAC Agent - These agents are used like GUI components
- Hierarchy of agents as aggregation represents
the GUI - Build different NinJo (DWD, MeteoSWISS, GeoPhys,
DMI ) clients with a building kit
15PAC Agents MVC In NinJo
- PAC agent hierarchy in NinJo
- models hold raw data
- views can be nested
- controllers map the hierarchy of the agents as a
tree - control flow always goes along the controllers
- Objectives of the PAC framework design
- configurability of agent-hierarchy (XML)
- configurability of representation of an agent
- strict decoupling of agents
16PAC Agents Identify Agents In GUI
17PAC Agents Composition Of View Components
- Lower views provide to compose into higher
- component (for instance JPanel)
- menu, optional
- toolbar, optional
- graphical objects (GOF-Layer, visualising
meteorological data) - Higher view actively integrates the delivered GUI
components into itself - Lower view retains control about the delivered
GUI components - Client is composed with a building kit (like
LEGO)
18PAC Agents Composition Of View Components
19Overview
- NinJo Client
- MVC And PAC - A Simple Introduction
- PAC Agents In NinJo
- PAC - The Framework
- PAC - How Creating A New Layer ?
20PAC Framework The Layer Architecture
- What is a Layer Architecture ?
- Layer Architecture strong rules of how to
create a layer in NinJo. - Why a Layer Architecture ?
- uniform design
- less cost of teaching
- less complexity
- simpler documentation
- better quality of design
- helps to create reusable components
21PAC FrameworkThe Layer Architecture
- GOF basic graphic methods, abstracts from
Java2D/3D - VisLib higher level visualisation techniques
independent from concrete data - Layer different abstractions or technical level
of visualisation of meteorological data - Layer Data Model deals with specific details of
particular kind of data - Access Layer access to server objects
- Layer Framework control of course, vertical to
the layers
22PAC Framework Base Classes
- Base classes are abstract, so they cannot be used
without derivation - They contain all common functionality of agents
and so the programmers of agents are relieved of
the implementation of basic functionalities. - Following capabilities are completely provided
by the PAC-framework - building of controller-hierarchy (methods and
attributes for the parent- child-relation), - shared models
23PAC Framework The Layercontainer
- The LayerContainer controls all common
functionality of activating and visualising
layers. - Following capabilities are completely provided
by the LayerContainer - visualising a set of layers
- geographical projections and map areas
- zooming, panning
- date
- switching layers on/off
- arranging legends
- interaction with mouse
- updating layers
24Overview
- NinJo Client
- MVC And PAC - A Simple Introduction
- PAC - Agents In NinJo
- PAC - The Framework
- PAC - How to Create a New Layer ?
25PAC Framework - How to Create a New Layer ?
- 7 Steps To Create A New Layer Agent
- Design the data classes for effective storing of
data - Design classes for a specific visualisation using
- common visualisation classes and GOF classes
- Derive from basic PAC classes to create a new
kind of PAC (Layer-) agent with model, view and
controller - Use the new specific data classes inside the PAC
model - Derive from basic GUI classes to create the menu
of the new kind of data - Develop specific GUI-elements like Toolbar,
Dialog boxes - Extend the client configuration file to integrate
the new Layer Agent into NinJo client by
inserting a tag for the new BottomLevel Agent
26Conclusions What do you need to create a new
2D-visualisation layer
NinJo PAC (Layer) Framework including
LayerContainer and GOF the building kit
The rules of Layer Architecture
A Layer Team some people, well familiar with OO
and JAVA
One-Week-Course
Last, but not least A good idea of What your
layer shall do ?
27Overview
- NinJo Client
- MVC And PAC - A Simple Introduction
- PAC - Agents In NinJo
- PAC - The Framework
- PAC - How Creating A New Layer ?