Skip to content

DanTrofimov/java-spring-boot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Spring Boot application

Spring Boot 2.4.4

About

Simple Todo Application, where you can add/change/delete todos and monitor your activity as a user and activity of other users and add todos for them as admin. Made with using MVC pattern.

Model–view–controller (usually known as MVC) is a software design pattern commonly used for developing user interfaces which divides the related program logic into three interconnected elements.

Model

The central component of the pattern. It is the application's dynamic data structure, independent of the user interface. It directly manages the data, logic and rules of the application.

@Entity
@Table(name = "groups")
public class Group {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int id;
    private String name;
}

View

Any representation of information such as a chart, diagram or table. Multiple views of the same information are possible, such as a bar chart for management and a tabular view for accountants.

<div class="user__info">
   <p>${currentUser.getName()}</p>
   <p>${currentUser.getAge()}</p>
</div>

Controller

Mediator between model and view.

@GetMapping("/profile")
public String getPage(@RequestParam Integer userId, Model model) {
    model.addAttribute("currentUser", userService.getUser(userId));
    return "profile";
}

DB structure

db-structure

Stack of technologies

  • Spring Boot 2.4.4
  • PostgreSQL
  • HTML5, CSS3, JS (+ chart.js)
  • Figma (layouts)