You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: microservices-idempotent-consumer/src/test/java/com/iluwatar/idempotentconsumer/RequestStateMachineTests.java
+24Lines changed: 24 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,27 @@
1
+
/*
2
+
* This project is licensed under the MIT license. Module model-view-viewmodel is using ZK framework licensed under LGPL (see lgpl-3.0.txt).
This example demonstrates a simple pipeline for processing book data and rendering it as an HTML view. It involves three main steps: **data preparation**, **business logic processing**, and **presentation**. The structure of the program aligns with the principles of the **Presentation-Abstraction-Control (PAC)** design pattern.
4
+
5
+
---
6
+
7
+
## Problem Addressed
8
+
This implementation solves the issue described in [Issue #1323](https://github.com/iluwatar/java-design-patterns/issues/1323) of the [java-design-patterns repository](https://github.com/iluwatar/java-design-patterns). The goal is to showcase how to split application logic into phases while keeping the layers loosely coupled.
9
+
10
+
---
11
+
12
+
## Overview of the Solution
13
+
The program is divided into the following parts:
14
+
15
+
1.**Data Layer**
16
+
- The `Book` class represents the raw data for a book.
17
+
- The `BookStore` class holds the processed book data for display.
18
+
19
+
2.**Logic Layer**
20
+
- The `DataPreparation` class handles the business logic. It computes whether a discount is applied and checks stock availability.
21
+
22
+
3.**Presentation Layer**
23
+
- The `Presentation` class generates an HTML view of the book data.
0 commit comments