Giter VIP home page Giter VIP logo

lumen-doctrine-ddd-example's Introduction

Lumen-Doctrine-DDD-Example

Domain Driven Design Application Example, built with Lumen 5.3 and Doctrine.

Introduction

Domain Driven Design approach help us write and maintain our core business preserved from technology dependencies. With the aid of ubiquitous language you could model your Domain and use thirdy part technologies to fit your needs. There are some DDD concepts, that application does not implement as: ValueObject, multiple Entites. The main purpose of this example is to give you a start point in terms of architecture, given the density of DDD, a simple example could not exhaust all the subject. The follow example implements a Store with products and product categories.

Assumptions

The Application Services are understood as Entrypoint for Domain. There is one Controller, Service Application and Service Provider by Domain. Providers map Contracts and Implementations.

Usage

composer install
mv Application/Lumen53/env_example Application/Lumen53/.env
cd Application/Lumen53/
php artisan migrate --path="../../database/migrations/"

API Calls

e.g. GET localhost/Lumen-Doctrine-DDD-Example/Application/Lumen53/public/api/v1/products

Requirements

"php": ">=5.6.4",
"laravel/lumen-framework": "5.3.",
"laravel-doctrine/orm": "1.2.
",

Credits

https://github.com/GrahamCampbell/Laravel-Throttle
https://github.com/tecnom1k3/sp-simple-jwt
https://github.com/krisanalfa/lumen-jwt/blob/develop/app/Http/Middleware/CORSMiddleware.php

References

Domain Driven Design

https://github.com/dddinphp
http://www.zankavtaskin.com/2013/09/applied-domain-driven-design-ddd-part-1.html https://www.youtube.com/watch?v=pL9XeNjy_z4&list=PLx4mLirQvMeV0uNpo1UaculL-djjI8eTz https://www.youtube.com/watch?v=yPvef9R3k-M https://www.youtube.com/watch?v=dnUFEg68ESM

Hexagonal Architecture

http://fideloper.com/hexagonal-architecture http://alistair.cockburn.us/Hexagonal+architecture https://www.yordipauptit.com/hexagonal-architecture-in-php

Laravel Doctrine

http://www.laraveldoctrine.org

YML Doctrine Mapping

http://docs.doctrine-project.org/projects/doctrine-orm/en/stable/reference/yaml-mapping.html

Criteria Array to Doctrine Criteria

https://gist.github.com/jgornick/8671644

Foreign Key

https://maltronblog.wordpress.com/2015/02/15/fkrelation/ https://engineering.thetrainline.com/2015/07/23/foreign-keys-dont-go-there/ http://microservices.io/patterns/data/database-per-service.html

Generators

https://github.com/InfyOmLabs/laravel-generator https://github.com/motamonteiro/gerador

Author

Davi dos Santos - [email protected]

Contributors

Nicolas Escouto - [email protected]

Release Notes

Isolation of framework dependency in Application concerns
Use of YML for mappings
Use of JMS serialization with YML

lumen-doctrine-ddd-example's People

Contributors

davists 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.