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

モデルとはなにか / what is model?

モデルとはなにか / what is model?

PHPカンファレンス関西2024にて発表。
トーク概要: https://fortee.jp/phpcon-kansai2024/proposal/b3f6ed97-8551-40da-90b1-3a14697df303

Hiromi Hishida

February 10, 2024
Tweet

More Decks by Hiromi Hishida

Other Decks in Programming

Transcript

  1. UI'FC JO1)1$POGFSFODF,BOTBJ CZ!XFC
    Ϟσϧͱ͸ͳʹ͔

    View full-size slide

  2. w 1)1FSྺ೥
    w ೥ʙ೥ϑϦʔϥϯε։ൃऀ
    w ೥ࣗࣾαʔϏεاۀʹब৬
    w స৬ΛܦͯɺݱࡏʢגʣϦϯέʔ
    δΤϯδχΞ
    w #UP#UP&༧๷ҩྍϓϩμΫτΛ࡞ͬ
    ͍ͯ·͢
    w ೔ຊ4ZNGPOZϢʔβʔձ /BHPZBQIQ
    XFCʢͳͳ͏͐Ϳʣ
    ঁੑͷ݈߁՝୊αϙʔτ
    '&.$-&
    ͔͔Γ͚ͭอ݈ࢣGPS-*/&

    View full-size slide

  3. -BSBWFMͷ&MPRVFOUͷ.PEFM
    w ΠϯελϯεͭʹσʔλϕʔεͷϨίʔυͭ
    w ͍ΘΏΔ"DUJWF3FDPSEύλʔϯΛ࣮૷

    View full-size slide

  4. ࠓ೔࿩͢Ϟσϧ

    View full-size slide

  5. Ϟσϧ
    w ϑΝογϣϯϒϥϯυͷ෰΍άοζΛ͔
    ͬ͜Α͘਎ʹண͚ͯಈ͍ͯݟͤΔ͜ͱ
    ͰɺͦͷϒϥϯυͷΠϝʔδΛ࡞Δ໾ׂ
    Ͱ͢ɻ

    View full-size slide

  6. Ϟσϧ
    w ໛ܕ

    View full-size slide

  7. Ϟσϧʢ໛ܕʣʹ͢ΔͱԿ͕خ͍͠ͷ͔ʁ
    w ݱ࣮ʹଘࡏ͢Δ΋ͷΛͳʹ͔ͷ໨తͷͨΊʹ໛ܕʹ͍ͯ͠Δ

    View full-size slide

  8. ʢݱ࣮ͷ৯඼ͷϞσϧʣ
    w ࣮෺ΑΓ௕࣋ͪ͢Δ
    w ෗Βͳ͍
    w ࣮෺ΑΓ৭઱΍͔ʹͰ͖Δ
    w མͱͯ͠΋࢖͑ͳ͘ͳΒͳ͍
    w େ఍ͷ৯඼͸མͱͯ͠ԚΕͨ
    Β΋͏৯΂ΒΕͳ͍ʢ࢖͑ͳ
    ͍ʣͷͰ
    ྫ৯඼αϯϓϧ
    IUUQTUXJUUFSDPN*8"4",*@4".1-&TUBUVT

    View full-size slide

  9. ʢݱ࣮ͷ֗ͷϞσϧʣ
    w ࣮෺ΑΓখ͘͞Ͱ͖Δ
    w ࣮෺ͱҟͳΓɺਅ্͔ΒݟͨΓ
    ճͨ͠ΓͰ͖Δ
    ྫ஍ਤ

    View full-size slide

  10. Ϟσϧʢ໛ܕʣʹ͢ΔͱԿ͕خ͍͠ͷ͔ʁ
    w ࣮෺ΑΓ௕࣋ͪ͢Δ
    w ࣮෺ΑΓ৭઱΍͔ʹͰ͖ΔˠσϑΥϧϝͰ͖Δ
    w ࣮෺ͱҟͳΓɺམͱͯ͠΋ഁյ͞Εͳ͍ˠࡶʹѻ͑Δ
    w ࣮෺ΑΓখ͘͞Ͱ͖Δ
    w ࣮෺ͱҟͳΓɺਅ্͔ΒݟͨΓճͨ͠ΓͰ͖Δˠࢹ఺Λม͑ΒΕΔ

    View full-size slide

  11. Ϟσϧʹ͢ΔͱԿ͕خ͍͠ͷ͔ʁ
    w Ϟσϧʹ͢Δ͜ͱͰɺΑΓগͳ͍ࢿݯͰ༻్Λຬͨ͢
    w Ϟσϧʹ͢Δ͜ͱͰɺΑΓগͳ͍ࢿݯͰࢼߦࡨޡͰ͖Δ

    View full-size slide

  12. ݱ࣮ͷ΋ͷΛϞσϧʹ͢Δͱ͖ɺԿΛ͍ͯ͠Δ͔ʁ

    View full-size slide

  13. ʢݱ࣮ͷंͷϞσϧʣ
    w ܗ͸͍͍ͩͨಉ͡
    w ৭͸͍͍ͩͨಉ͡
    w খͯ͘͞͠Δ
    w ॏ͞͸͍ܰ
    w ਓؒ͸৐Εͳ͍ʢখ͍͔͞Βʣ
    w Τϯδϯ͕͍ͭͯͳ͍ͷͰ૸Εͳ͍
    w νϣϩ2λΠϓ͸ಈ࡞ݪཧ͸ҧ͏͕૸ΕΔ
    w ࢠڙ͕खͰӡಈΤωϧΪʔΛ༩͑Ε͹૸Ε
    Δ
    ྫϛχΧʔ

    View full-size slide

  14. ݱ࣮ͷ΋ͷΛϞσϧʹ͢Δͱ͖ɺԿΛ͍ͯ͠Δ͔ʁ
    w ݱ࣮ͷࡉ෦͔Βɺ໨తͱؔ܎ͳ͍ಛ௃Λ࡟͍ͬͯΔ

    View full-size slide

  15. Ϟσϧͱ͸ʁ
    w ΑΓগͳ͍ࢿݯͰ༻్Λຬͨͨ͠Γࢼߦࡨޡ͢ΔͨΊʹɺݱ࣮ͷࡉ෦͔Βෆ
    ཁͳ΋ͷΛ࡟ͬͯ࡞ͬͨ໛ܕ

    View full-size slide

  16. 1)1FS͕։ൃʹ࢖͏Ϟσϧ

    View full-size slide

  17. ʢݱ࣮ͷه࿥ͷϞσϧʣ
    w ແݶʹ૿΍ͤΔʢ࣮ࡍʹ͸ແݶ
    Ͱ͸ͳ͍͔΋͠Εͳ͍ʣ
    w ه࿥Λϛεͬͯ΋ిྗ͙Β͍͠
    ͔࿘අͤͣʹగਖ਼Ͱ͖Δ
    ྫσʔλϕʔε
    IUUQTLBLBLVNBHDPNIPVTFXBSF JE

    View full-size slide

  18. 1)1FS͕։ൃʹ࢖͏Ϟσϧ
    w ։ൃΛศརʹ͢ΔͨΊʹɺݱ࣮ͷࡉ෦͔Βෆཁͳ΋ͷΛ࡟ͬͯ࡞Δ֓೦తͳ
    ໛ܕ

    View full-size slide

  19. -BSBWFMͷ"DUJWF3FDPSEύλʔϯͷ.PEFM
    ʢ͓ͦΒ͘1)1FSʹ΋ͬͱ΋ೃછΈ͕͋ΔϞσϧʣ
    w ݱ࣮ʢʁʣͷ3%#ͷVTFSTςʔϒϧ
    w JOTFSUͰ͖Δ
    w VQEBUFͰ͖Δ
    w EFMFUFͰ͖Δ
    w TFMFDUͰ͖Δ
    w GPSFJHOLFZΛ࣋ͯΔ
    w JOEFYΛ࣋ͯΔ
    w ओΩʔΛ࣋ͯΔ
    w ෳ߹ओΩʔΛ࣋ͯΔˠগͳ͘ͱ΋&MPRVFOUͰ͸ࣺͯΒΕ͍ͯΔ

    View full-size slide

  20. "DUJWF3FDPSEύλʔϯҎ֎ͷ.PEFM
    ʢ&MPRVFOUͷ.PEFM͚͕ͩ։ൃͷͨΊͷϞσϧͰ͸ͳ͍ʣ
    w γεςϜΛ࣮૷͠Α͏ͱࢥ͏ͱ͖ɺݱ࣮ͷ͋ΒΏΔܭࢉ΍ۀ຿͕։ൃͷͨΊͷϞσϧʹͳΓ͏Δ
    w ৽װઢͷӡ௞ܭࢉϞσϧ
    w ফඅ੫ͷܭࢉϞσϧ
    w ૹྉͷܭࢉϞσϧ
    w ݩ߸ͷ൑ఆϞσϧ
    w ೥ྸͷܭࢉϞσϧ
    w Ψνϟͷ֬཰Ϟσϧ
    w ͳͲͳͲ

    View full-size slide

  21. ͋ͳͨͷγεςϜ͸ԿΛϞσϧͱ͍ͯ࣋ͬͯ͠·͔͢ʁ

    View full-size slide

  22. ͋ͳͨͷγεςϜ͸ԿΛϞσϧͱ͍ͯ࣋ͬͯ͠·͔͢ʁ
    w .7$ͷ.ͬͯͳΜ͚ͩͬ
    w 5IFNPEFMPCKFDUUBMLTUPUIFEBUBTPVSDFBOEEPFTFWFSZUIJOH
    JOEJDBUFECZUIFSFRVFTUBTXFMMBTHBUIFSJOGPSNBUJPOGPSUIF
    SFTQPOTF'PXMFS .ଞ
    1BUUFSOTPG&OUFSQSJTF"QQMJDBUJPO
    "SDIJUFDUVSF

    View full-size slide