Giter Site home page Giter Site logo

yuri-sergiichuk / vlingo-xoom-starter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vlingo/xoom-designer

0.0 1.0 0.0 3.03 GB

The VLINGO/XOOM Starter is the quick-start designer for your domain models, REST, Event Sourcing, and CQRS, that provides a project generator for the VLINGO/XOOM quick start components :)

Home Page: https://vlingo.io

JavaScript 4.95% CSS 0.48% HTML 2.10% Java 77.55% Batchfile 0.02% Svelte 14.81% SCSS 0.10%

vlingo-xoom-starter's Introduction

vlingo-xoom-starter

Build Status Gitter chat

Be guided into the Reactive DDD world by the project generator for the VLINGO/XOOM components.

Docs: https://docs.vlingo.io/vlingo-xoom/xoom-starter

Introduction

A common reality of unfamiliarity exists for many developers either when they try to develop either Reactive applications or to implement DDD properly, or both. Many give up on using concepts and paradigms that are proven to be a strong foundation for building modern applications and systems that are robust, modularized, scalable, and that use modern architectures. These developers tend to fall back to familiar, yet outdated, frameworks and tools.

The VLINGO/PLATFORM was created to help developers who face such challenges to confidently move forward and modernize their work. One platform component that greatly accelerates developer modernization efforts is the VLINGO/XOOM Starter. It supports visual model definition, REST API, persistence, and container definitions, followed by project generation that can be immediately built and your services can be running within minutes. With an instantly executable service experience, developers are in a position to quick implement custom business logic within the pre-generated model. This is a great way to learn Reactive architecture and coupled with DDD tactical modeling that are powered by an Actor-based ecosystem.

The next section show you how to run and use the VLINGO/XOOM Starter in your local environment. Let's get started!

Installation

The installation process is short. Before you start, just check if you have these tools already installed:

  • Java 8+
  • Maven 3.x.x
  • Docker Desktop 18.x

Download the vlingo-xoom-starter compressed distribution file via curl:

  • zip file: curl -L -O https://github.com/vlingo/vlingo-xoom-starter/raw/master/dist/starter.zip
  • tar file: curl -L -O https://github.com/vlingo/vlingo-xoom-starter/raw/master/dist/starter.tar

Extract the file content, then set an environment variable named VLINGO_XOOM_STARTER_HOME indicating the absolute path for the uncompressed folder. Additionally, on Unix-based operating systems, it is necessary to allow read and execute access on executable script, placed under the root folder, as following:

 $ chmod 755 xoom

Ensure it's all set by verifying the vlingo-xoom-starter version:

 $ ./xoom -version
 1.4.0

Application Generation

In addition to the command-line interface (see below), vlingo-xoom-starter provides a web/graphical user interface for a rapid application generation. Simply open a terminal window and run the Starter.

 $ ./xoom gui

Following this your preferred browser will open with a wizard-fashioned screen, consisting of five steps.

Context Step

The first step defines the project artifact and service packaging.

screen-sample-image

Currently Maven build is supported. You may easily convert the generated project build to Gradle by using the Gradle conversion version task.

Model - Aggregate Step

The second step is used to design feature-based slices through the architecture. The vital parts of three architecture responsibilities are defined by means of a domain model focus. By first visually defining each domain model aggregate/entity type, its events emitted by each of its command message handlers and the REST API at the frontend, may be correspondingly specified.

screen-sample-image

In a single form, define the model aggregate/entity type, state, events, and REST API for :

  • Aggregates and State: protocol name; message handler methods; state attributes/properties; emitted events
  • Domain Events: name; attributes/properties
  • REST Resources: HTTP method; URI path and path parameters; aggregate message handler method to which the resource dispatches

Following each aggregate definition, add it to the model and see it in the design view.

screen-sample-image

Track each architectural slice, including REST API, aggregate, and emitted events, on the Model - Aggregate design view. It shows an interesting angle of your model through a design-level Event Storming perspective.

Model - Persistence Step

The third step is used to define the persistence, and if CQRS is in used, both command and query models.

screen-sample-image

This step displays persistence preferences. Configuration selections include the storage type, CQRS usage, specific database mechanisms, and when applicable, how events are projected to the query model.

Deployment Step

The fourth step defines the deployment container types.

screen-sample-image

The project generator provides default packaging, such as Java JAR, but may also include containerization files facilitating Docker and Kubernetes deployment. Using the Deployment Step, choose among deployment types as needed.

Generation Step

The fifth and final step defines project component types, and generates the project.

screen-sample-image

Enter the project parent folder. In addition, select whether VLINGO/XOOM annotations and auto-dispatch are preferred, or not. Click Finish to generate the defined service project.

Once the five definition steps are completed and the service project is generated, take full advantage of the power of the VLINGO/XOOM acceleration components. Use the VLINGO/PLATFORM comprehensive documentation and its live and collaborative community that supports developers on their journey. Now, go have fun!

CLI

Alternatively, you can also generate applications directly from the terminal through xoom gen command. In this case, the project settings have to be informed in a properties file under the vlingo-xoom-starter folder. See a commented properties file sample below:


    #Maven artifact version
    version=1.0
    #Maven project group id
    group.id=com.company
    #Maven artifact version
    artifact.id=xoom-application
    #Base package name
    package=com.company.business
    #Absolute path for the project parent folder
    target.folder=/home/projects
    #vlingo xoom version
    vlingo.xoom.server.version=1.3.0
    #Deployment Type (NONE, DOCKER, KUBERNETES)
    deployment=DOCKER
    #Docker Image name, required if deployment type is KUBERNETES or DOCKER
    docker.image=xoom-app
    #Published Docker Image, required if deployment type is KUBERNETES
    k8s.image=xoom-application
    #Kubernetes POD name, required if deployment type is KUBERNETES
    k8s.pod.name=xoom-application
    #Storage Type (STATE_STORE or JOURNAL)
    storage.type=STATE_STORE
    #CQRS (true or false)
    cqrs=true
    #Projections Type (NONE, EVENT_BASED or OPERATION_BASED)
    projections=EVENT_BASED
    #Domain Model Database, required if CQRS is false (IN_MEMORY, POSTGRES, HSQLDB, MYSQL, YUGA_BYTE)
    database=HSQLDB
    #Command Model Database, required if CQRS is true or Storage Type is Journal (see database types above)
    command.model.database=MYSQL
    #Query Model Database, required if CQRS is true or Storage Type is Journal (see database types above)
    query.model.database=YUGA_BYTE

Executing xoom gen causes the application generation based on the settings above, which are the same available on user interface.

Docker Commands

vlingo-xoom-starter provides cool shortcuts for interacting with Docker, from the project root folder, as follows:

Command Description Options
xoom docker status Shows the container status. N/A
xoom docker package Builds / update the Docker image from the application current state. tag: relate a tag to the current image build. If not informed, the default value is latest. Example: xoom docker package --tag 1.0
xoom docker push Publishes the image into the configured docker repository. tag: relate the local tag to the remote tag. If not informed, the default value is latest:latest, following the pattern local-tag:remote-tag. Example: xoom docker push --tag 1.0:latest
xoom k8s push Apply the manifest file(s) placed under deployment/k8s on Kubernetes. N/A
xoom gloo init Install the Gloo Gateway API generating an upstream for each running service on Kubernetes. N/A
xoom gloo suspend Uninstall the Gloo Gateway API. N/A
xoom gloo route Create routes, on Gloo Gateway API, for endpoints declared in vlingo-xoom.properties In vlingo-xoom.properties , define the options described below:

gloo.upstream: a Gloo upstream name for the app's service running on K8s. Example: gloo.upstream = default-myxoomapp-8080

gloo.resource.[resource-name]: an endpoint for an application resource identified by resource-name. Example: gloo.resource.balance = v1/balance

gloo.gateway.[resource-name]: a gateway route corresponding to a mapped endpoint identified by resource-name. Example: gloo.gateway.balance= balance

Note that, for each resource, a pair of gloo.resource / gloo.gateway has to be informed for properly creating a route in the Gloo Gateway API.

Collaboration

Our team really appreciates collaboration, not only because it boosts VLINGO to greater value, but also for the fact that the more viewpoints we have the more competent and mature the VLINGO community will become. If you want to be a catalyst for moving the platform forward, take a tour of our development guide.

vlingo-xoom-starter's People

Contributors

danilo-ambrosio avatar vaughnvernon avatar florian-schoenherr avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.