You are on page 1of 2

Developement Guideline

The source code versioning for Longinus will be Gitlab site

1 https://gitlab.tigocloud.net/longinus

Use Nexus as a library repository source for Longinus artifacts.

1 http://3.208.115.4:30081/repository/maven-public

1 http://3.208.115.4:30081/repository/maven-public-cbs

The logging output must use the format provided by Integration team. At the microservice level, the System.out.println instruction should
be avoided. Every microservice must implement this library.

Link to Logging documentation

Document the code. Comments indicating the "Why" and that the code indicates the "How".
Write Unit Test of the development to meet 80% Code Coverage, this will be valinated with SonarCube.
It is recommended that unit tests, comments, and exception handling be written before implementing the service logic.
Break down large methods/functions (reduce them to 40 lines). Short methods, encapsulated complexity, focused and isolated
functions.
Naming classes singularly, intuitive concept.
Avoid writing duplicate code… in converting it into method.
Structure the names of the packages with meaning, as a recommendation the following is proposed

1 com
2 └── millicom.[micorserviceName] -> root folder should only have application
3 ├── adapters -> contains all external system related classes
4 | ├── externalsystem(customer) -> contains classes related to this system, for example generic filling of
5 | └── dto -> all external structures devided by corresponding system
6 | └── crm -> data structure for external system crm
7 └── configuration -> implementation specific spring boot configuration on startup
8 | └── security -> spring configuration related to security
9 └── ece -> External Communication Engine - engine for all outbound communication (adapters)
10 | ├── action -> All implementations of the action service divided by type
11 | | ├── courier -> All actions related with external system communication
12 | | ├── handler -> All actions that will handle a request or response validation/mapping
13 | | └── mapper -> All actions related to mapping data from/to dtos
14 | ├── condition -> All implementations of the condition service
15 | └── service -> Any service related to a common pipeline implementation, tha can be executed anywhere in
16 └── domain/functionality -> Specific entity/domain for example an entity or a domain like customer domain
17 ├── controller -> Exposed services to the exterior
18 ├── entity -> Table entity class
19 ├── persistence -> Repository class
20 └── service -> Logic to interact with the entity/domain

Do not implement functionality at Database level. The use of database functions, procedures or packages will be strictly defined by
Architecture Team.
At code and/or configuration microservice level, you should avoid writing sensitive hardcoded data, such as passwords, secret, keys,
etc. This must be handled through Secret Manager.
The use of the SDK is suggested to carry out the developments in Longinus. It already implements logging, required package structure,
CI/CD, library management.

SpringBoot Temaplte

You might also like