Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
S
sumaris-doc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Metrics
Incidents
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
sih-public
sumaris
sumaris-doc
Commits
03089356
Unverified
Commit
03089356
authored
Sep 10, 2020
by
LAVENIER
Committed by
GitHub
Sep 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create architecture.md
parent
5fd202e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
162 additions
and
0 deletions
+162
-0
architecture.md
architecture.md
+162
-0
No files found.
architecture.md
0 → 100644
View file @
03089356
# App architecture
## Overview
Ionic, Angular, Angular Material, Apollo (graphql)
On Android: Cordova plugins (camera, audio, ...).
## Modules
-
Shared
-
Core
-
Admin
-
Referential
-
Data
*
Trip
*
...
## Core module
### Core :: Storage
-
Local storage (web browser) or SQLlite (Android)
### Core :: Config
-
Load order: pod, local storage, environement (defaults)
-
Allow to get:
*
theme (colors, app logo, partner's logos, background images)
*
App name
*
Software properties (See the pod entity SoftwareProperties)
## Core :: Settings
-
User defined, with defaults
-
Saved locally
-
Allow to store:
*
user locale
*
usage mode (on field mode, or desktop mode),
*
fields preferences (e.g. Display label+Code, or Label only)
*
...
### Core :: Services
-
Base service can be linked each other:
*
Life cycle : start() stop() ready()
#### Network service
-
First service to be started
-
Manage network connection and peer changes.
-
If no peer found (in local storage or environement) ask user to choose a peer
#### Platform service
-
Wait network to be started, then settings, and Cordova plugins
#### Data service
-
Query GQL
*
Fragments
-
EditorDataService: CRUD for editor
*
load()
*
save()
*
delete()
*
listenChanges()
-
TableDataService: CRUD for table
*
watchAll()
*
saveAll()
*
deleteAll()
-
Cache
-
Model entities
-
Entity validators
##### What is GraphQL ?
-
Query
-
Mutation (update, delete)
-
Subscription (listen changes)
##### Model entities
-
Simple beans:
*
only attributes
*
BUT with two required functions:
*
fromObject() : parse GraphQL queries result
*
asObject(): convert to objet for GraphQL mutations
-
Class inheritance (Entity -> DataEntity -> Trip)
-
Interface implementation (IReferentialItem, IWithVesselEntity)
#### Validators
-
Check entities content (e.g. min/max, required fields, etc.)
-
Used in Reactive forms
## Admin module
-
Access to pod managment
*
Users
*
Pod's configuration (see entities: Software & SoftwareProperties)
## Data module
-
Utilities for data editor, data table
-
Use abstract data model entities (.e.g QualityFlag, RecorderDepartment)
## Business modules (e.g. Trip)
-
Final user (business specific) screens
*
Pages,
*
Services
*
Entities
*
Validator
# Pod architecture
## Overview
Spring Boot, Hibernate/JPA, GraphQL-java
## Maven
-
Start pod (-Prun)
-
Liquibase diff
## Database
-
HSQLDB (server mode)
-
Oracle (mapping over a SIH-Adagio database)
## Model entities
-
JPA entities
-
Value Object (VO)
## DAO / Repository
-
Interface + Impl
-
HQL Query
-
JPA Query Builder - toSpecification()
-
Cache (Spring Cache)
-
Unit Tests
## Service
-
Interface + Impl
-
Unit Tests
## GraphQL endpoint
-
Annotations: declare query/mutation, auth
-
Contextual fecth
-
Dev tools: GraphiQL
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment