Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Practical CQRS - Newsletter Double Opt-In

Practical CQRS - Newsletter Double Opt-In

Why the MVC pattern solves a problem that doesn't exist in the web, how Command Query Responsibility Segregation
(CQRS) can reduce the complexity of request handling and offers you chances for performance optimizations.
A talk at the PHP USERGROUP DRESDEN.

Holger Woltersdorf

September 23, 2015
Tweet

More Decks by Holger Woltersdorf

Other Decks in Programming

Transcript

  1.               Server    

                Client   MVC  –  Pa=ern  –  Web   Controller   Model   View  
  2.               Server    

                Client   Controller   Model   View   MVC  –  Pa=ern  –  Web  
  3.               Server    

                Client   Controller   Model   View   MVC  –  Pa=ern  –  Web  
  4. MVC  –  Pa=ern  –  Web          

          Server                 Client   Controller   Model   View  
  5.               Server   MVC

     –  Pa=ern  –  Web                 Client   Controller   Model   View  
  6. MVC  –  Pa=ern  –  Web  –  Probleme   •  Systemgrenze

      •  HTTP-­‐Request   •  Subject-­‐Observer   •  Single-­‐Responsibility  
  7. MVC  –  Pa=ern  –  Web  –  Probleme   •  HTTP-­‐Request

      •  Subject-­‐Observer   •  Single-­‐Responsibility  
  8. MVC  –  Pa=ern  –  Web  –  Probleme   •  HTTP-­‐Request

      •  Subject-­‐Observer   •  Single-­‐Responsibility  
  9.               Server   HTTP-­‐Request

                    Client   Controller   Model   View   GET  
  10.               Client    

                Server   HTTP-­‐Request   Read   Controller   Model   View   GET  
  11.               Client    

                Server   HTTP-­‐Request   Read   Controller   Model   View   GET   Write   Controller   POST  
  12.               Client    

                Server   HTTP-­‐Request   Read   Controller   Model   View   GET   Write   Controller   POST  
  13.               Client    

                Server   Single-­‐Responsibility   Read   Controller   Model   View   GET   Write   Controller   POST  
  14.               Client    

                Server   Single-­‐Responsibility   Read   Controller   Model   View   GET   POST   Read   Handler   Write   Handler   Write   Controller  
  15.               Client    

                Server   CQRS   Read   Controller   Model   View   GET   POST   Read   Handler   Write   Handler   Write   Controller  
  16.               Client    

                Server   CQRS  –  Command  Query  Responsibilty  SegregaXon   Read   Controller   Model   View   GET   POST   Query   Handler   Command   Handler   Write   Controller  
  17.               Client    

                  CQRS  +  SOA  –  Our  best  pracXce   Query   Handler   Reposi-­‐ tory   View   GET   POST   GET   GetRequest Handler   PostRequest Handler   Called  dynamically   Command   Handler   ReadService   Query   WriteService   Command   Called  explicitly  
  18. Empfehlungen   •  Einführung  in  CQRS   h=p://marXnfowler.com/bliki/CQRS.html   • 

    MVC  in  Webanwendungen     h=ps://entwickler.de/online/php/model-­‐view-­‐controller-­‐in-­‐ webanwendungen-­‐138762.html   •  Wartbares  Design  dank  CQRS   h=ps://entwickler.de/online/development/wartbares-­‐design-­‐dank-­‐ cqrs-­‐139615.html  
  19. Vielen  Dank   •  Slides  abrubar   h=p://www.phpind.de    

      •  Beispiel-­‐Projekt  abrubar   h=ps://github.com/PHPinDD/cqrs-­‐newsle=er-­‐double-­‐opt-­‐in