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

今、我々は、 GUI の設計について 何を考えるべきか

今、我々は、 GUI の設計について 何を考えるべきか

フロントエンドの React Redux Rx などの設計パターンを元に GUI 設計について考えてみました

Koutarou Chikuba

September 20, 2017
Tweet

More Decks by Koutarou Chikuba

Other Decks in Programming

Transcript

  1. Reducer • (prev: State, action: Action) => State w ͨͩͷؔ਺

    w ࠓͷঢ়ଶͱ"DUJPOΛҰͭͱͬͯ࣍ͷঢ়ଶΛ֬ఆ͢Δ w "DUJPOΛେྔʹྲྀ͠ଓ͚Ε͹ঢ়ଶ͸มԽ͢Δ
  2. Redux •predictable state manager (ࣗশ) •combineReducers Ͱ ෳ਺ͷ reducer ΛଋͶͯ৽͍͠

    reducer Λ࡞Δ •Action ͕དྷΔ౓ʹશͯͷ reducer ʹྲྀ͢ •reducer ͸ࣗ෼ʹڵຯ͕͋Δऀ͚ͩั·͑ͯߋ৽ॲཧΛ͢Δ
  3. "DUJPO "DUJPO "DUJPO "DUJPO EventStream Reducer 4UBUF "DUJPO 4UBUF 4UBUF

    "DUJPO 4UBUF 4UBUF "DUJPO 4UBUF  4UBUF Snapshot 4UBUF 4UBUF 
  4. "DUJPO "DUJPO "DUJPO "DUJPO 3FEVDFS 4UBUF "DUJPO 4UBUF 4UBUF "DUJPO

    4UBUF 4UBUF "DUJPO 4UBUF  "DUJPO "DUJPO 3FEVY.JEEMFXBSF4UBDL Redux middleware
  5. Redux Middleware •͋Δ Event Stream Λผͷ EventStream ʹม׵͢Δ૚ •Ұͭͷ Action

    ͕ෳ਺ͷ Action ʹม׵͞ΕͨΓɺMiddleware ಺෦Ͱঢ়ଶΛ࣋ͬͨΓ͢Δ •େ఍͸ૉ௨Γ •͜͜Λཧղ͢Δͷʹ͕͔͔࣌ؒͬͨʢ໊લ͕ѱ͍ʣ
  6. Rx ͱ Redux •EventStream(Observable) ΛΦϖϨʔλʔͰSnapshotʹมܗ͢Δ •EventStreamΛͦͷ··ѻ͏(Observable) ͔ɺ reducer ͱ͍͏ ܗʹݶఆ͢Δ͔͕͓΋ͳҧ͍

    •Redux ͱ͸,ͭ·Γ Rx ͷݶఆܥ •reducer = observable.reduce((state, action) => state) •Redux Middleware = Rx Operator