Giter VIP home page Giter VIP logo

orkestra's Introduction

Orkestra

Orkestra is an opinionated framework with a plethora of recommendations on architectural design that we use internally at Morebec to develop new products. It also provides technical tools to quickly create products that are easy to maintain and scale.

At its core, Orkestra provides utilities for DDD, CQRS and Event Sourcing.

Orkestra allows to quickly develop products and applications while maintaining a standardized approach that is easy to understand and improve.

Why Orkestra

Given the current nature of Morebec, which is indie software development, in order to provide value to our clients, we need to be able to have a structure that is similar from project to project, while offering a stable platform that can stand the test of time and scale.

Building applications that will be public facing in production is a challenge in itself that requires a lot of thinking and preparation.

To ensure that we can always provide the same level of quality, while being prepared for the potential scale of our clients, Orkestra serves as both a technical and thinking framework to help us achieve these goals.

From a technical stand point, Orkestra tries to be as unobtrusive as possible by relying mostly on interfaces that denote the conceptual contracts it tries to fulfill. Scalable and resilient CQRS and Event Sourcing requires a lot of plumbing that is very easy to get wrong, as such it provides default implementation of these contracts to stay as much as possible at the edges of the different layers (application, domain and infrastructure.) This set of interfaces allows different projects to extend the framework with their own implementations when needed while still remaining compatible with the Orkestra framework and its ecosystem.

Features

  • Domain Driven Design Building Blocks.
  • Command Query Responsibility Segregation (CQRS) building blocks.
  • Event Sourcing building blocks.
  • Intra Application Messaging.
    • Based on Chain of responsibility pattern (middleware pipeline)
    • Synchronous processing by default.
    • Asynchronous processing using workers and scheduling.
    • Scheduling support.
    • Tracing with correlation and causation tracking.
  • Explicit Personal Information Storage Interface.

Installation

To include Orkestra in your projects, it is highly recommended relying on composer.

Run the following composer command:

$ composer require `morebec/orkestra`

Adapters

Orkestra relies on adapters to add functionality to the base classes.

Usage && Documentation

For the documentation on how to use Orkestra and its core principles, please refer to the docs/ directory.

orkestra's People

Contributors

jwillp avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

orkestra's Issues

Module Configuration File - Display the file name that errored on load

Because of this line:

If the configuration of a module is not valid Yaml, it throws an exception, but this exception
does not display the name of the file that errored.

Instead, it would be better to catch the exception and throw a new InvalidModuleConfigurationException and specify the name of the file that caused the error.

This would greatly help debug OC files.

Add call_parent Layer Object Schema Key

Instead of manually doing:

code: |
    parent::__construct();

It would be very useful to add a call_parent key:

call_parent: true #(default to false)

It would just do a basic call parent call passing the parameters of the method.
For custom behaviour, we could always rely on the code key.

This would be good to implement in the Object Generator Component.

Add a `compile` configuration key on Layer Object Configurations, to define how to handle compilation

Sometimes for code scaffolding, the overwrite functionality of the compiler can get in the way.
Instead, we could add a new Layer Object Configuration Key like so:

- schema: ...
  compile: ~ # one in once, never, always

Where:

  • once: Would compile the object only if its Layer Object File does not exist
  • never: Would disable the compiler for this object
  • always: Would always recompile and overwrite the Layer Object File (default value)

Delete Compiled Layer Object Files before Compile

We need to delete compiled Layer Object Files before Compile.

This would ensure that the layer object configurations specified in a module, gets deleted if it gets deleted from the module.
And also when using the watch option, some editor like PHPStorm save the file continually,
meaning sometimes the compiler on watch tries to compile incomplete paths.
It would those files compiled at temporary locations.

It would mean to scan the source directory for all files containing
@Orkestra\Generated
and delete those files.

Add compile:project --watch option

It would be very useful to implement a --watch option that detects changes in the modules configured directory to recompile on file change.
It could look like this:

$ orkestra compile:project --watch

Integrate PHP-CS Fixer on compiled Layer objects

The Object Generator that uses Nette/Php-Generator does not output code that is valid with the default settings of PHP-CS-Fixer.
This causes mismatches of coding styles making commits diff all the generated files.

It would be better to integrate PHP-CS-Fixer in the compilation process, to automatically fix
the compiled files according to its config file if present.

Use alternative to array_key_first

Some places in the code use array_key_first however this is restricted to PHP7 >= 7.3.0
It makes the tests fail for PHP7.2.
The project wants to support at least PHP 7.2 and this impacts Object Generator Component as well.

There is a polyfill proposed here:

<?php
if (!function_exists('array_key_first')) {
    function array_key_first(array $arr) {
        foreach($arr as $key => $unused) {
            return $key;
        }
        return NULL;
    }
}

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.