Add general description for the example code

This commit is contained in:
Ilkka Seppälä 2016-04-10 21:50:02 +03:00
parent c2f4194c07
commit e546d5dacc

View File

@ -38,7 +38,33 @@ import com.iluwatar.hexagonal.service.LotteryServiceImpl;
/**
*
* Example application demonstrating Hexagonal Architecture
* Hexagonal Architecture pattern decouples the application core from the
* services it uses. This allows the services to be plugged in and the
* application will run with or without the services.<p>
*
* The core logic, or business logic, of an application consists of the
* algorithms that are essential to its purpose. They implement the use
* cases that are the heart of the application. When you change them, you
* change the essence of the application.<p>
*
* The services are not essential. They can be replaced without changing
* the purpose of the application. Examples: database access and other
* types of storage, user interface components, e-mail and other
* communication components, hardware devices.<p>
*
* This example demonstrates Hexagonal Architecture with a lottery system.
* The application core is separate from the services that drive it and
* from the services it uses.<p>
*
* The primary ports for the application are {@link LotteryAdministration}
* through which the lottery round is initiated and run and
* {@link LotteryService} that allows players to submit lottery tickets for
* the draw.<p>
*
* The secondary ports that application core uses are {@link WireTransfers}
* which is a banking service, {@link LotteryNotifications} that delivers
* notifications as lottery events occur and {@link LotteryTicketRepository}
* that is the storage for the lottery tickets.
*
*/
public class App {