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

「モデル」を考える / Think about "model"

mather
July 12, 2019

「モデル」を考える / Think about "model"

mather

July 12, 2019
Tweet

More Decks by mather

Other Decks in Technology

Transcript

  1. ʮϞσϧʯΛߟ͑Δ
    2019-07-12 ܂ാӳࢿ

    View full-size slide

  2. ࣗݾ঺հ
    • ͘Θ͸͍͚ͨ͑͢(36)
    • גࣜձࣾΞϥλφ
    • όοΫΤϯυͱઃܭ
    • ؔ਺ܕݴޠ͕޷͖Ͱ͢
    • झຯɿμΠϏϯάɺυϩʔϯɺ…
    ʘ͜ͷΞΠίϯͰ͓ͳ͡Έʗ

    View full-size slide

  3. ஫ʣ಺༰͕΍΍ந৅తͰ͢

    View full-size slide

  4. ϑϨʔϜϫʔΫͷϞσϧ
    ϏδωεϞσϧɾυϝΠϯϞσϧ
    ViewModel

    View full-size slide

  5. େࣄͳͷ͸

    View full-size slide

  6. Ͳ͏͍͏ঢ়ଶ͔ΠϝʔδͰ͖Δ͜ͱ

    View full-size slide

  7. ΦϒδΣΫτࢦ޲ͷϑϨʔϜϫʔΫ
    • DBઃܭʹภΓ͕ͪ
    • ϏδωεʹඞཁͳʮϞσϧʯΛࣗ෼ͨͪͰઃܭͨ͠΄͏͕อक
    ੑ͕ߴ͘ͳΔ
    • DDDʢυϝΠϯۦಈઃܭʣͳͲͷઃܭख๏͕͋Δ

    View full-size slide

  8. ϏδωεΛத৺ʹͯ͠ߟ͑Δ

    View full-size slide

  9. Ұํ ViewModel ͳͲ͸…

    View full-size slide

  10. ঢ়ଶΛத৺ʹͯ͠ߟ͑Δ

    View full-size slide

  11. Vue.jsͷ৔߹
    • data(ঢ়ଶͷ͢΂ͯ)
    • methods (ঢ়ଶͷมߋखஈ)
    • computed (ঢ়ଶ͔Βಋग़͞ΕΔ஋)
    • dataΛHTMLͰදݱ͢Δؔ਺ܕʹ͍ۙΞϓϩʔν

    View full-size slide

  12. ؔ਺ܕͷΞϓϩʔν͸
    ঢ়ଶ؅ཧʹ޲͍͍ͯΔ

    View full-size slide

  13. ͨͩ͠ɺ͖ͬͪΓ΍Δʹ͸
    ʢ७ਮؔ਺ܕͰͳ͍ݶΓʣ
    ෆมɾࢀরಁ໌ͳͲΛҙࣝ͢Δඞཁ͕͋Δ

    View full-size slide

  14. ϞσϧΛ෼ղ͢ΔΞϓϩʔνΛ
    ͪΌΜͱ஌Δɾҙࣝ͢Δ

    View full-size slide

  15. ͜Ε΋Ұछͷʮ೴಺Ϟσϧʯ

    View full-size slide

  16. ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠
    ࣍ճʮμΠϏϯάʹֶͿϦεΫ؅ཧʯ

    View full-size slide