Giter VIP home page Giter VIP logo

guoyu07 / php-ddd-cargo-sample Goto Github PK

View Code? Open in Web Editor NEW

This project forked from codeliner/php-ddd-cargo-sample

0.0 0.0 0.0 60.02 MB

PHP 7 Version of the cargo sample used in Eric Evans DDD book

Home Page: http://codeliner.github.io/php-ddd-cargo-sample/

License: BSD 3-Clause "New" or "Revised" License

PHP 18.38% HTML 3.43% Gherkin 0.11% ApacheConf 0.10% CSS 0.18% JavaScript 77.79%

php-ddd-cargo-sample's Introduction

PHP DDD Cargo Sample

PHP 7 port of the cargo sample used in Eric Evans Domain-Driven Design book

Scrutinizer Quality Score Build Status

Cargo Sample Reloaded

After two years of inactivity a new version of the PHP DDD Cargo Sample is available [2015/12/07]. The new version is a complete rewrite of the cargo sample using cutting edge technology.

tl;dr

Click here ๐Ÿ˜„

What Is New?

  • PHP 7 with strict scalar type hints
  • PSR-7 middleware layer using zend-expressive
  • Doctrine ORM ^2.5 Embeddables
  • PHPUnit ^5.0
  • Behat ^3.0
  • Single Page UI using riot.js

Goal of the Project

We want to show the PHP 7 way of implementing Domain-Driven Design with the help of the original Cargo sample used in Eric Evans book Domain-Driven Design: Tackling Complexity in the Heart of Software. This has also been done using Java, C#, Ruby and other programming languages.

It is not the one way to apply DDD and only covers the tactical part of DDD. However, the cargo sample should help you understand the theory and gives you a starting point. Also see the Caveats of the java implementation. The same applies for our version.

Installation

See the Installation file.

Structure

The annotated project overview gives you an idea of the system structure.

PHP 5.6 compatible Version

Looking for a PHP 5.6 compatible version of the cargo sample? @josecelano has downgraded his fork. You can find it here.

Support

If you have any problems with the application please open a GitHub issue. Same applies if you have a question or a feature wish.

Contributing

Contributions of any kind are welcome. The PHP 7 DDD cargo sample aims to help people understand the tactical design part of DDD. So we'd be very happy if you tell your friends about it, link it in discussions and mention it on twitter. If you've found a bug or have an idea for an improvement, just submit a PR like usual.

Behavior Driven Design

All features of the application are described in feature files. You can find them in the features folder of the project. We make use of Behat and Mink to test our business expectations.

You can run the feature tests by navigating to the project root and start the selenium server shipped with the sample app: java -jar bin/selenium-server-standalone-2.46.0.jar After the server started successfully open another console, navigate to project root again and run Behat with the command php bin/behat.

*Note: If it does not work, check that the behat file is executable.

Unit Tests

Unit Tests are of course also available. You can find them in CargoBackend/tests. Got to the directory and simply run phpunit.

Sponsoring

prooph software

This brand new cargo sample version is sponsored by prooph software GmbH. You can follow us on twitter

Become A Member

If you want to share your experience with other DDD enthusiasts or want to ask a question about DDD then the DDDinPHP google group is good place to do so.

You can find more DDD stuff like interesting articles and related libraries on the PhpFriendsOfDdd/state-of-the-union project.

php-ddd-cargo-sample's People

Contributors

codeliner avatar danizord 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.