Concertmaster

Fluent java library that makes it easy to write business logic

License

License

Categories

Categories

GUI User Interface
GroupId

GroupId

com.github.boriswaguia
ArtifactId

ArtifactId

concertmaster
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

Concertmaster
Fluent java library that makes it easy to write business logic
Project URL

Project URL

https://github.com/boriswaguia/concertmaster.git
Source Code Management

Source Code Management

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

Download concertmaster

How to add to project

<!-- 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"]

Dependencies

provided (1)

Group / Artifact Type Version
org.projectlombok : lombok jar 1.18.8

test (3)

Group / Artifact Type Version
junit : junit jar 4.12
org.mockito : mockito-core jar 2.28.2
org.hamcrest : hamcrest jar 2.1

Project Modules

There are no modules declared in this project.

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

Versions

Version
0.1.0