Skip to content

Architecture

MaximilianRoehr edited this page Mar 24, 2022 · 20 revisions

The news service manages news articles. Articles can be saved, deleted, and also be edited. The Service also provides the functionality to filter, search and sort articles. This section describes:

  • general & detailed view of the data structure
  • general & detailed view of the architecture

Data structure

Overview

This diagram doesn't include the data provided by the services appointments, faculties, and persons. The Article is the main Component of this service and holds the entire information relevant for reading an article. An ArticlePreview on the other hand only holds the information relevant for a preview of an Article when scrolling through a listing of articles, for example. Each Article is also an Entry which gives them an ID to work with. Both PreviewRequest and RequestType are relevant for filtering and sorting Articles.

data-structure(1)

Detailed view

This is a more detailed view of the data structure with all the attributes.

data-structure

Service Architecture

Overview

The service news has a 3 layered architecture. These layers are

  • Presentation layer - The interface for using clients and expose the data and functionality.
  • Business layer - Contains the logic of the application for data manipulation and data preparation/mapping
  • Repository - Represents the access layer to the stored data

The yellow marked classes represent dev implementations

The most important class is the NewsController. It manages all the logic of the other classes. It contains information about the current Repository and also uses the ArticleValidator class to validate articles whenever they should be stored. The ArticleRequestHandler manages incoming requests which are passed through the NewsController. Requests have specifc structure (see detailed Data Structure).

The NewsResourceClient is used commmunicate with our Service. On our service side we implement this interface with the NewsResource class. The main reason for this class is used to map between the different article data objects, it also uses the NewsController to get access to the articles

classDiagram-Page-2

Detailed view

This is a more detailed view of the service architecture with all the attributes and functions.

classDiagram drawio .

Clone this wiki locally