-
Notifications
You must be signed in to change notification settings - Fork 0
2. SAS (System Architecuture Specification)
- Changelog
- 1. Introduction
- 2. System Overview
- 3. Architectural Concept
- 4. Systemdesign
-
5. Subsystemspecification
- 5.1 <MOD.001>: REST API (Backend)
- 5.2 <SUBMOD.001.001>: Get AML Files
- 5.3 <SUBMOD.001.002>: Upload AML File
- 5.4 <SUBMOD.001.003>: Get AML File by id
- 5.5 <SUBMOD.001.004>: Edit AML File
- 5.6 <SUBMOD.001.005>: Delete AML File
- 5.7 <MOD.002>: Database
- 5.8 <MOD.003>: Graphical User Interface (Frontend)
- 5.9 <SUBMOD.003.001>: Filtering
- 5.10 <SUBMOD.003.002>: Paging
- 6. Technical Concepts
- 7. Figures
Version | Date | Author | Comment |
---|---|---|---|
0.1 | 24.10.2020 | Nils-Christopher Wiesenauer | created |
1.0 | 12.11.2020 | Nils-Christopher Wiesenauer | final version |
The goal of this project is to develop a software that supports the conversion from an AML file to JSON stored in a database. The main part of this software should be the handle of such a storage in a database. There also should be a tool with a graphical user interface, which uses a REST API to upload AML files and to show, edit, delete the converted JSON files.
API | Application Programming Interface |
AML | Automation Markup Language is an open standard data format for storing and exchanging plant planning data. |
Angular | Angular is a TypeScript based front-end framework which is published as open source software |
ExpressJS | ExpressJS is the most popular Node web framework and is the underlying library for several other popular Node web frameworks. It provides many mechanisms. |
GUI | Graphical User Interface |
JSend | JSend is a specification for a simple, no-frills, JSON based format for application-level communication. |
MongoDB | MongoDB is a document-oriented NoSQL database used for high volume data storage. |
ngx-translate | Internationalization (i18n) library for Angular |
NodeJS | NodeJS is a JavaScript free and open source cross-platform for server-side programming that allows users to build network applications quickly. |
npm | Node Package Manager |
REST | Representational State Transfer |
XML | Extensible Markup Language is a markup language to save data in an organized way, to make it human- and machine-readable. |
The system will work as follows: The user specifies an AML file on the web-app and uploads it via a HTTP POST request. The frontend checks the file type via form. The REST API checks the size of that file. If the type and size are valid, the system performs the conversion to the JSON format after uploading it. The result will be saved in the MongoDB database as a document. This saved document will be returned to the frontend as a JSend response. In the Angular GUI it will be listed for the user to perform actions like edit, download, and delete.
There will be a way to access the API via web browser and HTTP requests. Firstly, the REST API can be implemented into other projects. Other developers can use the backend for their own projects and define how the result should be used. Secondly, the GUI will give the user an interface to access the database and the option to either upload an AML file or just show, edit, and delete the converted result as a JSON document.
The system requires a NodeJS version 12.x to download the needed npm packages and run the system. The REST API can be implemented into any kind of frontend framework that knows how to handle HTTP requests and JSend.
The following quality goals listed below should be achieved by the following architecture.
By offering the tool for any web browser, a high degree of user-friendliness is achieved for everybody. This means, users can work with the graphical user interface on any web browser.
Dividing the project into smaller modules should help to make the software easier to analyse, maintain, update, and modify. The result of dividing the software into smaller modules is shown in chapter 3. Architectural Concept.
The front- and the backend will be portable. This means that the functionality to convert an AML file to JSON should be easily integrable by other software products.
The system will be based on the MEAN (MongoDB, Express.js, Angular, Node.js)-Stack with the CRUD (Create, Read, Update, Delete) functionality in the backend.
The system can be divided into three main parts. Firstly, the frontend GUI, where the user can upload, edit, show, and delete an AML file. Secondly, the REST API handles the conversion of the AML file to JSON, CRUD functionalities and the connection to the database. Finally, the database is used to store the files.
Figure 1 - Architectural Model
Figure 2 - Component Diagram
The main part of the whole project is the connection between all the three developed services. It is divided in frontend, backend, and database. Front- and backend can work as a stand-alone project. They communicate via HTTP requests to upload, edit, and delete an AML file.
The backend contains CRUD functionalities for the stored AML files. Only the backend is authorized to store, get, and update data in the defined table in the database.
MongoDB is used as database. It is a document-oriented NoSQL database used for high volume data storage. Every uploaded AML file is stored in it with a well-defined schema.
The GUI allows the user to access the REST API with HTTP requests to interact with the database and to perform actions like show, edit and delete an AML file. Ngx-translate will be used for the internationalization here.
Additionally, the response from back- to frontend will be in the JSend format to get status, status code, description as a message and the data in a better way to handle in the frontend. With an own developed api.service.ts in the frontend, these responses will be shown in a dialog with all needed information.
Figure 3 - Systemdesign
This REST API is the most important module because it contains the logic for converting the AML file to JSON. It also includes the authorization to the database.
<MOD.001> | REST API (Backend) |
System requirements covered: | LF110 |
Service: |
|
Interfaces: |
|
External Data: |
|
Endpoints: |
|
Storage location: | swagger.yaml |
Figure 4 - Swagger UI: REST API Endpoints
This submodule contains the functionality to get all AML files or one AML file base on the ID from the database.
<SUBMOD.001.001> | Get all stored AML Files |
System requirements covered: | LF80 |
Service: |
|
Interfaces: |
|
Endpoint: |
|
External Data: |
|
Storage location: | server.js |
Figure 5 - Swagger UI: GET /file
This submodule performs the conversion and storage of an AML file. It takes the information from the frontend and stores the converted file in the MongoDB database.
<SUBMOD.001.002>: | Conversion from AML to JSON logic |
System requirements covered: |
LF20 ,LF30
|
Service: |
|
Interfaces: |
|
Endpoint: |
|
External Data: |
|
Storage location: | server.js |
Figure 6 - Swagger UI: POST /file
This submodule contains the functionality to get all AML files or one AML file base on the ID from the database.
<SUBMOD.001.003>: | Get AML File based on ID or get all stored AML files |
System requirements covered: |
LF40 ,LF50
|
Service: |
|
Interfaces: |
|
Endpoint: |
|
External Data: |
|
Storage location: | server.js |
Figure 7 - Swagger UI: GET /file/{id}
This submodule allows to edit an existing AML file.
<SUBMOD.001.004>: | Edit AML File |
System requirements covered: | LF60 |
Service: |
|
Interfaces: |
|
Endpoint: |
|
External Data: |
|
Storage location: | server.js |
Figure 8 - Swagger UI: PUT /file/{id}
The functionality to delete an existing AML file in the database is contained in this submodule.
<SUBMOD.001.005>: | Delete AML File |
System requirements covered: | LF70 |
Service: |
|
Interfaces: |
|
Endpoint: |
|
External Data: |
|
Storage location: | server.js |
Figure 9 - Swagger UI: DELETE /file/{id}
This module is about the storage. The uploaded AML file needs to be saved in a MongoDB database.
<MOD.002>: | Database |
System requirements covered: | LF100 |
Service: |
|
Interfaces: | - |
External Data: |
|
Storage location: | BACKEND |
Figure 10 - Database File Schema
This module specifies and implements the graphical user interface and manages all possible in- and outputs.
<MOD.003>: | Graphical User Interface |
System requirements covered: | LF80 |
Service: |
|
Interfaces: |
|
External Data: |
|
Storage location: | FRONTEND |
Figure 11 - GUI Overview
This submodule contains the filtering frontend-side.
<SUBMOD.003.001>: | Filtering of existing AML files |
System requirements covered: | LF60 |
Service: |
|
Interfaces: |
|
External Data: |
|
Storage location: | home.component |
Figure 12 - GUI Filtering
This submodule specified the paging for the existing AML files.
<SUBMOD.003.002>: | Paging |
System requirements covered: | LF70 |
Service: |
|
Interfaces: |
|
External Data: |
|
Storage location: | home.component |
Figure 13 - GUI Paging
One part of this project is to convert an AML file into JSON to be stored in a database. Data persistence is relevant for this kind of project.
Users can access the conversion REST API via HTTP requests. This option is specified in the module specification for the Graphical User Interface (frontend).
The graphical user interface will follow the standard ergonomic design patterns with the help of Angular Material. For example, the font size should be large enough so the user experience is satisfying and the everything should be easy to use.
A developer can implement the REST API in their own software to interact with other IT-Systems. In addition to that, users can use the REST API to convert their files via GUI, so no other communication is needed.
The REST API and GUI will be deployed on a server.
Before a conversion can take place, the input file needs to be correct (an .aml file) to ensure a conversion to JSON is possible. This is archived with a form.
When the input file is correct the user needs to click on the button “upload”. If the REST API throws errors, everything will be shown to the user via an own implemented error handling service.
The main language of the GUI is English and German. It is managed with npm package ngx-translate. If any other language is needed, it can be implemented easily with an additional .json file with translation keys in it.
The software is composed of different modules. These modules are tested separately. To receive an overview about the system tests, the system test plan provides more information, and the system test report contains all the results.
The program and code can be cloned via GitHub.
- Figure 1 - Architectural Model
- Figure 2 - Component Diagram
- Figure 3 - Systemdesign
- Figure 4 - Swagger UI: REST API Endpoints
- Figure 5 - Swagger UI: GET /file
- Figure 6 - Swagger UI: POST /file
- Figure 7 - Swagger UI: GET /file/{id}
- Figure 8 - Swagger UI: PUT /file/{id}
- Figure 9 - Swagger UI: DELETE /file/{id}
- Figure 10 - Database File Schema
- Figure 11 - GUI Overview
- Figure 12 - GUI Filtering
- Figure 13 - GUI Paging
© LMF.software - Jonas Bihr, Namid Marxen, Johannes Emanuel Timter & Nils-Christopher Wiesenauer
For any question regarding our software contact us on here on GitHub.
- Home
- 1. SRS (System Requirements Specification)
- 2. SAS (System Architecuture Specification)
- 3. MODs (Modul Documentations)
- 4. MM (Meeting Minutes)
- 5. User Manual
- 6. Systemtestplan
- 7. Systemtestreport