Narbase / unicef-pss

Starter project with PEKK stack.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running the project

To run the project, you need to run the server and the frontend.

Running the server

In the terminal, run ./gradlew narcore-server:run

Running the frontend

In the terminal, run ./gradlew :narcore-web:run -t

Understanding the codebase

Naming Suffixes

objectTable -> DB table objectDto -> Data Transfer Object objectDs -> Data Structure (e.g. POJO, POKO) objectRm -> Repository Model (Normally a composition of multiple models)

Data Transfer Objects (DTOs)

DTOs are placed in a common project and shared between the front end and the backend.

DAO vs Repositories

A DAO correspond to a single Table (and a single model) and implement CRUD operations.

Repository is similar to a DAO Facade (Read about the Facade Design Pattern) and it abstracts the access to multiple DAOs. However, it has a single "fat" model. Normally, the repo fat model is a composition of the models of the DAOs.

For example:

ClientsDao -> ClientsTable UsersDao -> UsersTable RolesDao -> RolesTable

Then:

UsersRepository -> ClientsDao, UsersDao, RolesDao

About

Starter project with PEKK stack.


Languages

Language:Kotlin 97.5%Language:Java 1.6%Language:CSS 0.3%Language:HTML 0.2%Language:Shell 0.2%Language:JavaScript 0.1%