Skip to content

Commit 6761a9f

Browse files
committed
fixed renaming problem and added context to main
1 parent e0f4cab commit 6761a9f

File tree

15 files changed

+36
-20
lines changed

15 files changed

+36
-20
lines changed

bloC/src/main/java/com/iluwatar/bloc/Main.java

Lines changed: 0 additions & 18 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.

bloC/pom.xml renamed to bloc/pom.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<artifactId>java-design-patterns</artifactId>
99
<version>1.26.0-SNAPSHOT</version>
1010
</parent>
11-
<artifactId>bloC</artifactId>
11+
<artifactId>bloc</artifactId>
1212
<dependencies>
1313
<dependency>
1414
<groupId>org.junit.jupiter</groupId>
@@ -18,6 +18,7 @@
1818
<dependency>
1919
<groupId>org.testng</groupId>
2020
<artifactId>testng</artifactId>
21+
<version>7.7.1</version>
2122
<scope>test</scope>
2223
</dependency>
2324
<dependency>
@@ -31,6 +32,11 @@
3132
<artifactId>mockito-inline</artifactId>
3233
<scope>test</scope>
3334
</dependency>
35+
<dependency>
36+
<groupId>junit</groupId>
37+
<artifactId>junit</artifactId>
38+
<scope>test</scope>
39+
</dependency>
3440
</dependencies>
3541
<build>
3642
<plugins>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package com.iluwatar.bloc;
2+
3+
/**
4+
* The BLoC (Business Logic Component) pattern is a software design pattern primarily used
5+
* in Flutter applications. It facilitates the separation of business logic from UI code,
6+
* making the application more modular, testable, and scalable. The BLoC pattern uses streams
7+
* to manage the flow of data and state changes, allowing widgets to react to new states as
8+
* they arrive.
9+
* In the BLoC pattern, the application is divided into three key components:
10+
* - Input streams: Represent user interactions or external events fed into the BLoC.
11+
* - Business logic: Processes the input and determines the resulting state or actions.
12+
* - Output streams: Emit the updated state for the UI to consume.
13+
* The BLoC pattern is especially useful in reactive programming scenarios and aligns well with the declarative nature of Flutter.
14+
* By using this pattern, developers can ensure a clear separation of concerns, enhance reusability, and maintain consistent state management throughout the application.
15+
*/
16+
17+
public class Main {
18+
19+
/**
20+
* The entry point of the application. Initializes the GUI.
21+
*
22+
* @param args command-line arguments (not used in this example)
23+
*/
24+
public static void main(String[] args) {
25+
BlocUi blocUi = new BlocUi();
26+
blocUi.createAndShowUi();
27+
}
28+
}

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218
<module>function-composition</module>
219219
<module>microservices-distributed-tracing</module>
220220
<module>microservices-idempotent-consumer</module>
221-
<module>bloC</module>
221+
<module>bloc</module>
222222

223223
</modules>
224224
<repositories>

0 commit comments

Comments
 (0)