项目作者: spike31

项目描述 :
Symfony Prooph project
高级语言: PHP
项目地址: git://github.com/spike31/projectDDD.git
创建时间: 2017-02-09T13:25:59Z
项目社区:https://github.com/spike31/projectDDD

开源协议:

下载


Project DDD

Simple demo project:

Prooph : https://github.com/prooph

This project is inspired by https://github.com/prooph/proophessor-do-symfony

You can just test a registration and change your information with fake information.
The important here is to look at the events and snapshot created in your database.
Look also in the symfony profiler how doctrine queries are processed.

RxPHP : https://github.com/ReactiveX/RxPHP

RxPHP is used to handle asynchronous call. Prooph uses a React\Promise to
handle queries; With RxPHP you can wrap a promise with an Observable.

An pseudo code example :

Example of RxPHP

  1. Get User for a given userId and return an Observable
  2. array [
  3. "userId" => UserId
  4. "emailAddress" => EmailAddress
  5. "username" => "syzof@yahoo.com"
  6. ]
  1. Loads events and return an Observable
  2. array [
  3. 0 => UserWasRegistered
  4. ]
  1. Zip user and events then return an Observable
  2. array [
  3. "userId" => UserId
  4. "emailAddress" => EmailAddress
  5. "username" => "syzof@yahoo.com"
  6. "userEvents" => array
  7. ]
  1. Get publisher for a given publisherId
  2. array [
  3. "publisherId" => PublisherId
  4. ]
  1. Loads events and return an Observable
  2. array [
  3. 0 => LightPublisherWasRegistered
  4. 1 => BusinessInformationsUpdated
  5. 2 => BusinessInformationsUpdated
  6. 3 => BusinessInformationsUpdated
  7. 4 => BusinessInformationsUpdated
  8. 5 => BusinessInformationsUpdated
  9. 6 => BusinessInformationsUpdated
  10. 7 => BusinessInformationsUpdated
  11. 8 => BusinessInformationsUpdated
  12. 9 => BusinessInformationsUpdated
  13. 10 => BusinessInformationsUpdated
  14. ]
  1. Zip publisher and events then return an Observable
  2. array [
  3. "publisherId" => PublisherId
  4. "publisherEvents" => array
  5. ]
  1. Zip user Observable and publisher Observable
  2. And return an Observable
  3. array [
  4. "userId" => UserId
  5. "emailAddress" => EmailAddress}
  6. "username" => "syzof@yahoo.com"
  7. "userEvents" => array
  8. "publisherId" => PublisherId
  9. "publisherEvents" => array
  10. ]

Installation:

  1. git clone
  1. composer install
  1. bin/console do:mi:mi
  1. bin/console ser:run