• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Command-Query Responsibility Segregation: теория и практика
 

Command-Query Responsibility Segregation: теория и практика

on

  • 2,122 views

 

Statistics

Views

Total Views
2,122
Views on SlideShare
1,776
Embed Views
346

Actions

Likes
0
Downloads
14
Comments
0

4 Embeds 346

http://vorotech.wordpress.com 188
http://blog.kievalt.net 153
http://msug.vn.ua 3
http://feeds.feedburner.com 2

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Command-Query Responsibility Segregation: теория и практика Command-Query Responsibility Segregation: теория и практика Presentation Transcript

    • Command / Query ResponsibilitySegregation
      теория и практика
    • О чем пойдет речь?
      • Немного теории
      • С чего мы начали?
      • Куда мы движемся?
      • Чем пользоваться?
      • Что в итоге?
    • Теория
    • Типовые свойства
      • Бизнес развивается
      • Сложность принятия решений
      • Новые роли
      • Масштабируемость
      • Старые компоненты
      • Расходы на разработку
    • С чего все начинают?
      Shared Services
      End User Interface
      Backoffice
      Service Layer
      Application Facade
      Domain Model
      DB1
      DB2
      Services
    • С чего все начинают?
    • С чего все начинают?
    • Как все заканчивается?
    • Command / Query Responsibility Segregation
      • Command / Query Separation
      • Event Sourcing
      • Task Based User Interface
      • Messaging
      • Domain Driven Design
    • Command/Query Separation
      End User Interface
      Application Server
      SELECT * FROM Product
      UPDATE Product
      DB
    • Command/Query Separation
      End User Interface
      Application Server
      Query
      Command
      SELECT * FROM Product
      UPDATE Product
      DB
    • Command/Query Separation
      End User Interface
      Application Server
      Query
      Command
      SELECT * FROM Product
      UPDATE Product
      DB
    • Command/Query Separation
      End User Interface
      Application Server
      Query
      Command
      SELECT * FROM Product
      UPDATE Product
      Queries Cache
      Domain Persistence
    • Command/Query Separation
      End User Interface
      Reporting
      Domain Model
      UPDATE Product
      SELECT * FROM Product
      Queries Cache
      Domain Persistence
    • Command/Query Separation
      End User Interface
      AddProductToTheCart
      Reporting
      Domain Model
      INSERT INTO CartINSERT INTO CartItem
      Queries Cache
      Domain Persistence
    • Command/Query Separation
      End User Interface
      AddProductToCart
      Reporting
      Domain Model
      INSERT INTO CartINSERT INTO CartItem
      ProductToCartAdded
      View Data Cache
      Domain Persistence
    • Command/Query Separation
      End User Interface
      AddProductToCart
      Reporting
      Domain Model
      INSERT INTO CartINSERT INTO CartItem
      INSERT INTO ProductsInCart
      ProductToCartAdded
      View Data Cache
      Domain Persistence
    • Command/Query Separation
      End User Interface
      AddProductToCart
      SELECT * FROM ProductsInCart
      Reporting
      Domain Model
      INSERT INTO CartINSERT INTO CartItem
      INSERT INTO ProductsInCart
      ProductToCartAdded
      View Data Cache
      Domain Persistence
    • Event Sourcing
    • Event Sourcing
      КАК?!
      У Вас на счету: -19435.89₴
    • Event Sourcing
      У Вас на счету: -19435.89₴
      Перемещение средств:
    • Event Sourcing
      End User Interface
      Reporting
      Domain Model
      ProductToCartAdded
      ProductFromCartRemovedProductQuantityChanged
      …..
      View Data Cache
      Domain Persistence
      Events Storage
    • Event Sourcing
      End User Interface
      Reporting
      Domain Model
      ProductToCartAdded
      ProductFromCartRemovedProductQuantityChanged
      …..
      View Data Cache
      Domain Persistence
      Events Storage
    • Task Based User Interface
      1. As a Tourist I want to Book a Hotel
    • Task Based User Interface
      1. As a Tourist I want to Find and Book a Hotel
    • Task Based User Interface
      1. As a Tourist I want to Find and Book a Hotel
    • Task Based User Interface
      1. As a Tourist I want to Find and Book a Hotel
    • Messaging
      Book Hotel
      Domain Model
      View Data Cache
      Events Storage
    • Messaging

      BookHotelCommand
      Book Hotel
      Domain Model
      View Data Cache
      Events Storage
    • Messaging

      BookHotelCommand
      Book Hotel

      Domain Model
      HotelBooked
      View Data Cache
      Events Storage
    • Domain Driven Desingn
      Ожидайте
    • Практика
    • С чего начали мы?
    • С чего начали мы?
      Shared Services
      End User Interface
      Backoffice
      Service Layer
      Application Facade
      Domain Model
      DB1
      DB2
      Services
    • Как это выглядит?
    • Шаг №1
      User Interface
      Service Layer
      Application Facade
      Domain Model
      Database
    • Шаг №1
      User Interface
      Domain Model
      Database
    • Шаг №2
      User Interface
      Domain Model
      Reports
      Database
    • Шаг №2
    • Шаг №3
      В контроллерах нет
      • Навигации
      • ViewResult
    • Шаг №3
      В контроллерах нет
      • Навигации
      • ViewResult
      В контроллерах остались
      • Void-методы
    • Шаг №4
    • Шаг №4
    • Шаг №4
    • Шаг №4
    • Что дальше?
      • Event Sourcing
      • NoSQL
      • Cloud
    • Утилиты
      • NServiceBus, MassTransit
      • RavenDb, CouchDb, MongoDb
      • Lokad.CQRS
    • Выводы
    • Вывод всего один
      Можно, но осторожно!