Skip to content

Commit e546d5d

Browse files
committed
Add general description for the example code
1 parent c2f4194 commit e546d5d

File tree

1 file changed

+27
-1
lines changed
  • hexagonal/src/main/java/com/iluwatar/hexagonal

1 file changed

+27
-1
lines changed

hexagonal/src/main/java/com/iluwatar/hexagonal/App.java

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,33 @@
3838

3939
/**
4040
*
41-
* Example application demonstrating Hexagonal Architecture
41+
* Hexagonal Architecture pattern decouples the application core from the
42+
* services it uses. This allows the services to be plugged in and the
43+
* application will run with or without the services.<p>
44+
*
45+
* The core logic, or business logic, of an application consists of the
46+
* algorithms that are essential to its purpose. They implement the use
47+
* cases that are the heart of the application. When you change them, you
48+
* change the essence of the application.<p>
49+
*
50+
* The services are not essential. They can be replaced without changing
51+
* the purpose of the application. Examples: database access and other
52+
* types of storage, user interface components, e-mail and other
53+
* communication components, hardware devices.<p>
54+
*
55+
* This example demonstrates Hexagonal Architecture with a lottery system.
56+
* The application core is separate from the services that drive it and
57+
* from the services it uses.<p>
58+
*
59+
* The primary ports for the application are {@link LotteryAdministration}
60+
* through which the lottery round is initiated and run and
61+
* {@link LotteryService} that allows players to submit lottery tickets for
62+
* the draw.<p>
63+
*
64+
* The secondary ports that application core uses are {@link WireTransfers}
65+
* which is a banking service, {@link LotteryNotifications} that delivers
66+
* notifications as lottery events occur and {@link LotteryTicketRepository}
67+
* that is the storage for the lottery tickets.
4268
*
4369
*/
4470
public class App {

0 commit comments

Comments
 (0)