Skip to content
This repository has been archived by the owner on Dec 6, 2021. It is now read-only.

Flow_of_Data_and_Processes en

Tetsuya Mori edited this page Sep 11, 2018 · 2 revisions

Data, Process flow

Consider the flow of data and processing with diagrams taken as an example of the implementation assumed at the time of actual development.

Events

events

Advance preparation

  1. Initialization processing
    • Bind IInitializable with Zenject Installer to fire it
  2. UseCase gets Observable to notify the timing of projectile launch from Presenter
  3. Presenter gets Observable to notify the timing of bullet shot from View
  4. View returns an Observable which fires when clicked
  5. UseCase subscribes to the returned Observable and creates a bullet shooting method as a process on OnNext

Actual processing

  1. Screen tapped
  2. OnNext message flows to Observable for click notification of View
  3. Subscribed Observer.OnNext is executed in preparation
  4. Bullet shot process called
  5. UseCase instructs Presenter a bullet description
  6. Presenter instructs View to bullet drawing
  7. Bullets are rendered

Render server error in error dialog

render server errors

Advance preparation

  1. Initialization processing
  2. Build Presentation Structure
  3. Connect Subject to notify communication result with server defined in Injected Entity to Structure's Observer
  4. Pass Structure from UseCase to Presenter
  5. Pass Structure from Presenter to View
  6. Subscribe to Observable in View and register processing at the time of error occurrence

Actual processing

  1. Process activation by some trigger
  2. Construct Data Structure for server query
  3. Connect Structure's Observable to Entity's Subject
  4. Pass Structure from UseCase to Repository
  5. Pass Structure from Repository to DataStore
  6. Query the server from the DataStore
  7. The server returns an error
  8. An OnError message flows to Observer of Structure
  9. A message flows to OnError which has already been subscribed in preparation
  10. An error dialog is rendered