-
Ida Made Revindra Dikta Mahendra authoredIda Made Revindra Dikta Mahendra authored
BambangShop Publisher App
Tutorial and Example for Advanced Programming 2024 - Faculty of Computer Science, Universitas Indonesia
About this Project
In this repository, we have provided you a REST (REpresentational State Transfer) API project using Rocket web framework.
This project consists of four modules:
-
controller
: this module contains handler functions used to receive request and send responses. In Model-View-Controller (MVC) pattern, this is the Controller part. -
model
: this module contains structs that serve as data containers. In MVC pattern, this is the Model part. -
service
: this module contains structs with business logic methods. In MVC pattern, this is also the Model part. -
repository
: this module contains structs that serve as databases and methods to access the databases. You can use methods of the struct to get list of objects, or operating an object (create, read, update, delete).
This repository provides a basic functionality that makes BambangShop work: ability to create, read, and delete Product
s.
This repository already contains a functioning Product
model, repository, service, and controllers that you can try right away.
As this is an Observer Design Pattern tutorial repository, you need to implement another feature: Notification
.
This feature will notify creation, promotion, and deletion of a product, to external subscribers that are interested of a certain product type.
The subscribers are another Rocket instances, so the notification will be sent using HTTP POST request to each subscriber's receive notification
address.