Introduction
Who?
Fabian Wesner
$year >= 2012 CTO @ Project A Ventures
$year == 2011 CTO @ Rocket Internet
$year == 2010 Lead developer...
Powered by Yves & Zed
Architecture
Bird‘s eye view
Layered architecture
Structured code with Bundles and Packages
Dependency management with composer
- Code is structured in packages
- Packages may require each other
- We use composer t...
Dependency validation
Zed GUI
Zed user interface

Kendo UI + Bootstrap + jQuery
minified and merged with Grunt
Cronjobs
Scalable job management with Jenkins
/* subscribe users for newsletters */
$jobs[] = array(
'name'
=> 'send_newsletter_sub...
Logging
Logging with Lumberjack
Yves & Zed‘s Big Data infrastructure
Automated processing of orders
Visualization of business logic
protected function addTransitions()
{
$this->setup->addTransition(
self::STATE_NEW,
self::...
Automatic processing of thousands of orders per day
Trigger events
Used in several controllers to start the state machine
...
Data-Warehouse
ETL / job scheduler

<job id="load-order-item-status">
<description>Copies the order item status table into the tmp table
...
Order status mapping
Every color has a
simple meaning!
Not paid
Item returned
Paid
etc.
<perspective name="Sales">
<status...
Entity–relationship model
DWH architecture

ETL

DWH

Cubes

Reports
Thank you!
Yves & Zed @ Developer Conference 2013
Nächste SlideShare
Wird geladen in …5
×

Yves & Zed @ Developer Conference 2013

5.713 Aufrufe

Veröffentlicht am

Yves & Zed is the e-commerce platform of Project A Ventures.

Veröffentlicht in: Technologie
1 Kommentar
4 Gefällt mir
Statistik
Notizen
Keine Downloads
Aufrufe
Aufrufe insgesamt
5.713
Auf SlideShare
0
Aus Einbettungen
0
Anzahl an Einbettungen
862
Aktionen
Geteilt
0
Downloads
75
Kommentare
1
Gefällt mir
4
Einbettungen 0
Keine Einbettungen

Keine Notizen für die Folie

Yves & Zed @ Developer Conference 2013

  1. 1. Introduction
  2. 2. Who? Fabian Wesner $year >= 2012 CTO @ Project A Ventures $year == 2011 CTO @ Rocket Internet $year == 2010 Lead developer @ Zalando $year <= 2009 Entrepreneur and Freelancer Project A Ventures Building successful companies. Company Builder with focus on Internet, advertising technology and mobile. www.project-a.com
  3. 3. Powered by Yves & Zed
  4. 4. Architecture
  5. 5. Bird‘s eye view
  6. 6. Layered architecture
  7. 7. Structured code with Bundles and Packages
  8. 8. Dependency management with composer - Code is structured in packages - Packages may require each other - We use composer to manage dependencies composer.json of dwh-package {     "name": "project-a/dwh-package",     "autoload": {         "psr-0": { "ProjectA": "/src" }     },     "require": {         "php": ">=5.4.0",         "project-a/auth-package": ">=0.0.10",         "project-a/library-package": ">=0.0.27"     } } How to update Yves & Zed? (1) add a new version to a composer.json (2) run php composer.phar install
  9. 9. Dependency validation
  10. 10. Zed GUI
  11. 11. Zed user interface Kendo UI + Bootstrap + jQuery minified and merged with Grunt
  12. 12. Cronjobs
  13. 13. Scalable job management with Jenkins /* subscribe users for newsletters */ $jobs[] = array( 'name' => 'send_newsletter_subscription_queue', 'command' => '$PHP_BIN $CLI_PATH/ index.php --module=newsletter --controller=cronjob --action=sendsubscriptionqueue', 'schedule' => '*/2 * * * *', 'enable' => true, 'stores' => $all_stores, ); /* -- MAIL QUEUE -- */ $jobs[] = array( 'name' => 'send_queued_mails', 'command' => '$PHP_BIN $CLI_PATH/ index.php --module=mail -- controller=cronjob --action=send-queued-mails', 'schedule' => '* * * * *', 'enable' => true, 'stores' => $all_stores, ); /* -- DUMP DB -- */ $jobs[] = array( 'name' => 'generate_database_dump', 'command' => '$PHP_BIN $CLI_PATH/ index.php --module=dbdump --controller=cronjob --action=execute', 'schedule' => '0 0 * * *', 'enable' => true, deployment
  14. 14. Logging
  15. 15. Logging with Lumberjack
  16. 16. Yves & Zed‘s Big Data infrastructure
  17. 17. Automated processing of orders
  18. 18. Visualization of business logic protected function addTransitions() { $this->setup->addTransition( self::STATE_NEW, self::STATE_PREAUTHORIZED, self::EVENT_START_PAYMENT, self::RULE_PAYMENT_TRANSACTION_APPROVED); $this->setup->addTransition( self::STATE_NEW, self::STATE_INVALID, self::EVENT_START_PAYMENT); } protected function addCommands() { $preAuthorizeCommand = $this->factory ->getModelOrderprocessCommandPaymentPreAuthorization(); $this->setup->addCommand( self::STATE_NEW, self::EVENT_START_PAYMENT, $preAuthorizeCommand); } protected function addDefinitions() { $subProcess = $this->factory ->getModelOrderprocessDefinitionSubProcessCancellation() $this->setup->addDefinition($subProcess); } PHP Graph
  19. 19. Automatic processing of thousands of orders per day Trigger events Used in several controllers to start the state machine $this->facadeSales->triggerEvent(„start payment“,items); $this->facadeSales->triggerEventBulk($eventName,items); Commands Classes with logic which are triggered from the state machine class SaoZedPaymentComponentCommand PreAuthorization { public function __invoke ($orderEntity, $context) { ... } } Check conditions Decision which way to go class SaoZedPaymentComponentCondition TransactionApproved { /** @return bool */ public function check($orderItem, $context) { ... } } +++ More details: Talk of Oliver Tischlinger tomorrow „Statemachine – Das Mittel gegen Flags!“ +++
  20. 20. Data-Warehouse
  21. 21. ETL / job scheduler <job id="load-order-item-status"> <description>Copies the order item status table into the tmp table </description> <commands> <run-sql-file file-name="order-statuses/create-order-item-status-tmp-table.sql" echo-queries="false"/> <load-from-mysql mysql-database="zed" file-name="order-statuses/load-order-item-status.sql" target-table="tmp.order_item_status"/> </commands> </job> <job id="transform-order-item-status"> <description>Copies the order item status table into the dim schema </description> <dependencies> <dependency job="load-order-item-status"/> <dependency job="load-order-item-status-mapping"/> </dependencies> <commands> <run-sql-file file-name="order-statuses/transform-order-item-status.sql" echo-queries="false"/> </commands> </job>
  22. 22. Order status mapping Every color has a simple meaning! Not paid Item returned Paid etc. <perspective name="Sales"> <status-group name="Not paid" description="The items are not yet paid" color="#557799"> <status ref="shipped"/> <status ref="waiting for payment"/> <status ref="capture"/> </status-group> <status-group name="Paid" description="The items are paid" color="#559955"> <status ref="paid in money collect"/> <status ref="clarify refund overpayment"/> <status ref="closed"/> </status-group> </perspective> </status-mapping>
  23. 23. Entity–relationship model
  24. 24. DWH architecture ETL DWH Cubes Reports
  25. 25. Thank you!

×