Concertmaster

Fluent java library that makes it easy to write business logic

Лицензия

Лицензия

Категории

Категории

GUI Взаимодействие с пользователем
Группа

Группа

com.github.boriswaguia
Идентификатор

Идентификатор

concertmaster
Последняя версия

Последняя версия

0.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

Concertmaster
Fluent java library that makes it easy to write business logic
Ссылка на сайт

Ссылка на сайт

https://github.com/boriswaguia/concertmaster.git
Система контроля версий

Система контроля версий

http://github.com/boriswaguia/concertmaster/tree/master

Скачать concertmaster

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.boriswaguia/concertmaster/ -->
<dependency>
    <groupId>com.github.boriswaguia</groupId>
    <artifactId>concertmaster</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.boriswaguia/concertmaster/
implementation 'com.github.boriswaguia:concertmaster:0.1.0'
// https://jarcasting.com/artifacts/com.github.boriswaguia/concertmaster/
implementation ("com.github.boriswaguia:concertmaster:0.1.0")
'com.github.boriswaguia:concertmaster:jar:0.1.0'
<dependency org="com.github.boriswaguia" name="concertmaster" rev="0.1.0">
  <artifact name="concertmaster" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.boriswaguia', module='concertmaster', version='0.1.0')
)
libraryDependencies += "com.github.boriswaguia" % "concertmaster" % "0.1.0"
[com.github.boriswaguia/concertmaster "0.1.0"]

Зависимости

provided (1)

Идентификатор библиотеки Тип Версия
org.projectlombok : lombok jar 1.18.8

test (3)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.mockito : mockito-core jar 2.28.2
org.hamcrest : hamcrest jar 2.1

Модули Проекта

Данный проект не имеет модулей.

Build Status

Concertmaster

Fluent java library that makes it easy to write business logics

Why Concertmaster

As a developer we sometime wants the code to reflect the logic in which we want it to be executed. Concertmaster master let you abstract the implementation details of your logic, and let you write only what the program should do not how it should be doing it.

Example

Here is an example usage of the api where the business logic is to:

  • Create a user
  • Send an email to the user if the creation was successful
Action createUserActionAs = new CreateUserActionImpl();
Action sendEmailToUserActionAs = new SendEmailToUserActionImpl();

// Describe your business logic sequence in an expressive way, in term of state machine
Set<ActionNode> actionNodes = StateMachine.builder()
        .when(new ActionId("create-user-action-impl"))
            .success(new AbstractId("send-email-to-user-action-impl"))
            .append()
        .when(new ActionId("send-email-to-user-action-impl"))
            .append()
        .getMachine()
        .getActionNodes();
        
// Populate the service repository
// The framework will use this later to get services implementations by their ids and execute them
ActionRepository actionRepository = ActionRepository.init().add(createUserActionAs).add(sendEmailToUserActionAs);

// Let the framework run the whole thing for you, and handle all the possible branchings.
ActionRunner.instance().run(actionNodes, actionRepository);

Advantages

Concertmaster provide the following advantages:

  • Clean separation between what the program should do and how it should be doing it
  • This force you to write a SOLID object oriented code. (By composing independent business logic)
  • Clear understanding of what the system should do

Версии библиотеки

Версия
0.1.0