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

Drupal 9 Web開発ことはじめ〜なにそれ?おいしいの?

Drupal 9 Web開発ことはじめ〜なにそれ?おいしいの?

OSC2021 Online/Nagoya F会場 14:00-14:45 の発表スライドです。
https://register.ospn.jp/osc2021-online-nagoya/modules/eventrsv/1.html

Takahiro Komatsu

May 25, 2021
Tweet

More Decks by Takahiro Komatsu

Other Decks in Programming

Transcript

  1. ࣗݾ঺հ - খদߴኍʢ͜·ͭ ͔ͨͻΖʣ - Ѫ஌ݝמ୩ࢢ - ϑϦʔϥϯεͷΤϯδχΞ - ճ࿏ઃܭɾج൘ઃܭ͔Β

    αʔόߏஙɾΞϓϦ։ൃ·Ͱ޿͘ઙ͘ - ࠷ۙͷڵຯ: Rust / WebAssembly / WebRTC Kubernetes / FPGA / ௿ϨΠϠ / ࣗ࡞OS ίϯύΠϥ / ΞΫηγϏϦςΟ NLP (ࣗવݴޠॲཧ) / KR (஌ࣝදݱ) 2
  2. 11

  3. Drupal Meetup ๛ా - 2018/5 ͔Β։࠵ - 2020/4 ͔ΒΦϯϥΠϯ։࠵ -

    Ѫ஌ݝ಺΍ݝ֎ͷDrupalʹڵຯ͋Δ ਓ͕ू·͍ͬͯΔίϛϡχςΟ - ษڧձͱ͍͏ΑΓ͸Drupalؔ࿈ͷ࠲ ஊձͳงғؾ - https://drupal-meetup- toyota.connpass.com 19
  4. - Φʔϓϯιʔε(GPLv2+)ͷCMS - Dries Buytaert @Dries ͕ PHPͰॻ͖࢝Ίͨ - ॳϦϦʔε

    2001/1/15 - ࠷৽൛ 9.1.9 (2021/5/29 ݱࡏ) 22 https://www.acquia.com/jp/blog/drupal-celebrates-20-years https://www.drupal.org/project/drupal https://www.drupal.org/about/licensing
  5. Drupal 9 ಈ࡞؀ڥ - Apache 2.4.7 Ҏ߱ Nginx 0.7.x Ҏ߱

    - PHP 7.3 Ҏ߱ (Drupal 9.1.0 ͔Β PHP 8 ʹରԠ) - MySQL 5.7.8 Ҏ߱ MariaDB 10.3.7 Ҏ߱ SQLite 3.26 Ҏ߱ PostgreSQL 10 Ҏ߱ (pg_trgm ඞਢ) 23 https://www.drupal.org/docs/user_guide/en/install-requirements.html
  6. CMSγΣΞʢ2021/5/29ݱࡏʣ 24 ˔ WordPress 64.9 % ˔ Shopify 5.5 %

    ˔ Joomla 3.2 % ˔ Squarespace 2.6 % ˔ Wix 2.5 % ˔ Drupal 2.3 % ˔ ͦͷଞ 19.0 % https://w3techs.com/technologies/history_overview/content_management/ms/y
  7. DrupalΛར༻͍ͯ͠ΔαΠτྫʢւ֎ʣ - Pfizer https://www.pfizer.com - Moderna https://www.modernatx.com - Astellas Pharma

    https://www.astellas.com - Tesla https://www.tesla.com 25 - NASA https://www.nasa.gov - Nasdaq https://www.nasdaq.com - University of Oxford https://www.ox.ac.uk - LUSH https://lush.com - IBM https://www.ibm.com - Red Hat https://www.redhat.com - AMD https://www.amd.com - NOKIA https://www.nokia.com
  8. DrupalΛར༻͍ͯ͠ΔαΠτྫʢࠃ಺ʣ - ࡾඛॏ޻ https://www.mhi.com - ࡾҪԽֶ https://jp.mitsuichemicals.com - ژ౎େֶ https://www.kyoto-u.ac.jp

    - ౦ژେֶ ࠃࡍߴ౳ݚڀॴ ΧϒϦ਺෺࿈ܞӉ஦ݚڀػߏ https://www.ipmu.jp/ja 26 - ԭೄՊֶٕज़େֶӃେֶ(OIST) https://www.oist.jp - Think IT https://thinkit.co.jp - খֶؗ https://www.shogakukan.co.jp - ॣՏ԰.JP https://www.suruga-ya.jp
  9. Drupal ͷ޷͖ͳͱ͜Ζ - ػೳΛߏ੒͢Δ֤Ϟδϡʔϧ͕͔ͳΓ௚ަ ʢಉҰػೳͷ GUI ͸ผϞδϡʔϧʹ෼཭ʣ - αΠτϖʔδɾ؅ཧϖʔδ ͦΕͧΕʹݸผͷςʔϚΛઃఆͰ͖Δ

    ʢ؅ཧϖʔδΛઃܭ͠қ͍ʣ - ϢʔβݖݶΛৄࡉʹઃఆͰ͖Δ ʢϫʔΫϑϩʔΛઃܭ͠қ͍ʣ - ଟݴޠԽͷػೳ͕σϑΥϧτͰଘࡏ 27
  10. Drupal is Simple - Simple ≠ Easy - ֓೦͕ચ࿅͞Ε͍ͯΔ =

    ௚ަԽ - Simple ͳ΋ͷ͸ந৅౓͕ߴ͘ͳΔ ʢe.g. ਺ֶɾ෺ཧʣ 28
  11. ίϯςϯπ - text - audio - image - video -

    binary data - ग़དྷ্͕Δ΋ͷ͸ඞͣ͠΋ ʮWebϖʔδʯͱ͸ݶΒͳ͍ 30
  12. API API Headless / Decoupled architecture 32 Tablet Digital Signage

    APP Server Smart Phone Personal Computer Smart Speaker API SPA / Native App API Drupal abc 123 DB Server
  13. ֶशίετ - ॳΊͯ৮Δਓʹ͸Ͳͷ෦෼ͷߏஙΛͯ͠ ͍Δͷ͔ཧղͮ͠Β͍ - Custom Content Type - Taxonomy

    - Views - Block - ઌͷઌΛݟ௨ͨ͠ઃܭΛ͢Δ͜ͱ͸ඇৗ ʹ೉қ౓͕ߴ͍ - ·ͣ͸ͨ͘͞Μʮ࡞ͬͯ͸յ͢ʯܦݧΛ ॏͶΔ͜ͱ͕େ੾ 35 http://www.codem0nk3y.com/2012/04/what-bugs-me-about-modx-and-why/cms-learning-curve/
  14. ίϯςϯπλΠϓͷྫ 37 ༗അه೦ ౦ژ༏ॣ 1993೥ 1998೥ 12݄26೔ 6݄7೔ 15:20 15:30

    தࢁ ౦ژ ࣳ ࣳ ӈ ࠨ ฏ஍ ฏ஍ 2500 2400 Ϩʔε໊ ։࠵೥ ։࠵݄೔ ൃ૸࣌ࠁ ։࠵৔ അ৔ ํ޲ छผ ڑ཭ ίϯςϯπλΠϓɿϨʔε ίϯςϯπ
  15. λΫιϊϛʔͷྫ 40 Ϩʔε ίϯσΟγϣϯ അ৔ঢ়ଶ അ৔ ํ޲ ࣳ μʔτ ྑ

    ᜗ॏ ӈ ࠨ അ ඼छ ໟ৭ ੑผ നໟ Ἑໟ αϥ Ξϥϒ Դ ໒
  16. ઌΛݟ௨ͨ͠σʔλߏ଄Λ࡞Δ೉͠͞ - ౰ॳ͸੩తͩͱࢥͬͯͨσʔλߏ଄͕ಈతʹ มΘΔՄೳੑ - σʔλଐੑͷରԠؔ܎ 1:1 / N:1 /

    1:M / N:M - ྫ֎తͳσʔλͷѻ͍ - σʔλߋ৽ͷཤྺɾมભ͕ཉ͍͠ͱ͖ - ߋ৽ස౓ͷߴ͍σʔλ͸ͦ΋ͦ΋σʔλߏ଄ ͱѻ͍ํΛม͑Δ΂͖ʁ ʢe.g. Φοζʣ 44 Ϩʔε໊ ։࠵೥ ։࠵݄೔ ൃ૸࣌ࠁ ։࠵৔ അ৔ ํ޲ छผ ڑ཭ അ໊ ໟ৭ ੑผ ੜ೥݄೔ ੜ࢈ऀ അओ ௐڭࢣ ઓ੷ ֫ಘ৆ۚ
  17. ಉਓࢽΛॻ͍ͨ - ٕज़ॻయ10ͷग़లక੾೔ʢ2020/11/30ʣʹ ࢥཱ͍ͬͯͱΓ͋͑ͣਃ͠ࠐΈ - ࣥචظؒ͸໿3िؒʢ2020/12/1 — 12/24ʣ - ຊΛશ͘ॻ͍ͨ͜ͱͳ͍ϝϯόʔ͹͔Γ

    - ؔ౦ɾ๺ւಓɾѪ஌ͷϝϯόʔ8ਓͰݪߘΛ GitHub্ͰCIճ͠ͳ͕ΒϚʔδͯࣥ͠ච - ͳΜͱ͔క੾DrivenͰॻ্͖͛ͨʂ - ࣥචܦҢͷৄࡉ https://www.acquia.com/jp/blog/published-drupal-ebook-in- techbookfest10 48 Drupal 9 Web։ൃΛ͸͡ΊΔͨΊͷബ͍ຊ
  18. ಉਓࢽͷ໨࣍ - Drupal ͱ͸Կ͔ʁ - Drupal ͷαΠτΛߏஙͯ͠ΈΔ - CentOS 8

    Λ࢖ͬͨ Drupal 9 α Πτ؀ڥߏங - Drupal ΛίϚϯυϥΠϯͰૢ࡞ ͢Δ - Drupalͷߏ੒؅ཧ 49 - αΠτϏϧμʔ෉්߹֨ମݧه - GoogleϩάΠϯΛ࣮ݱ͢Δ - ؅ཧը໘Λ΋ͬͱศརʹʂ Ϟδϡʔϧ3બ - Migrate ೖ໳ - Drupal.org ͷา͖ํ
  19. "If you want to go fast, go alone. If you

    want to go far, go together." 52 ૣ͘ߦ͖͚ͨΕ͹ɺͻͱΓͰߦ͚ɻ ԕ͘·Ͱߦ͖͚ͨΕ͹ɺΈΜͳͰߦ͚ɻ
  20. ঎ۀࢽΛॻ͍ͨ - ಉਓࢽͷ಺༰Λमਖ਼&Ճච - ίΞͷΞοϓσʔτ - ςʔϚ։ൃ - 2021/4/16 ϦϦʔε

    - ిࢠॻ੶ or ϓϦϯτΦϯσϚϯυ - DrupalΛॳΊͯ৮Δਓ͕ͻͱ·ͣαΠτ Λ࡞ΕΔΑ͏ʹͳΔ·Ͱͷཁૉ͸આ໌͠ ͍ͯΔ...͸ͣ https://nextpublishing.jp/book/12999.html 53 Drupal 9 Web։ൃ͜ͱ͸͡Ί
  21. Umami - PHP ͷϏϧτΠϯ Web Server ͱ SQLite Ͱ Drupal

    ؀ڥΛϩʔΧϧʹ ߏஙͯ͠ࢼͤΔ - ͋͘·Ͱςετ༻ϓϩϑΝΠϧͳͷ Ͱຊ൪؀ڥʹσϓϩΠ͠ͳ͍Α͏ʹ ஫ҙ - UmamiΛ೔ຊޠԽ͢Δهࣄ https://annai.co.jp/article/drupal8- umami-install-profile-japanese ͏·Έ 57 https://www.drupal.org/docs/installing-drupal/drupal-quick-start-command
  22. ͨͬͨ2ߦ͚ͩͰࢼͤ·͢👍 58 mkdir drupal && cd drupal && curl -sSL

    https://www.drupal.org/ download-latest/tar.gz | tar -xz --strip-components=1 php ./core/scripts/drupal quick-start demo_umami $ $
  23. ʢิ଍ʣPHP Fatal error: Allowed memory size of xxxxxxxxx bytes exhausted

    $ php ./core/scripts/drupal quick-start demo_umami Λ࣮ߦͨ͠ࡍʹ্هΤϥʔ͕දࣔ͞Εͨ৔߹ ʢݪҼʣPHP࣮ߦ༻ʹׂΓ౰ͯΒΕ͍ͯΔϝϞϦ͕গͳ͍ ʢ֬ೝʣ $ php -i | grep memory_limit ʢରԠʣ/etc/php.ini ಺ͷ memory_limit Λ 256M Ҏ্ʹमਖ਼͢Δ 59 memory_limit => 128M => 128M
  24. Acquia Certification - Acquia ͕ओ࠵͍ͯ͠Δ Drupal ೝఆࢼݧ - αΠτϏϧμʔ -

    σϕϩούʔ - ϑϩϯτΤϯυεϖγϟϦετ - όοΫΤϯυεϖγϟϦετ - डݧྉ $155 — $350 - https://www.acquia.com/jp/solutions/ customer-success/acquia-certification ΞΫΠΞೝఆࢼݧ 62
  25. ݱࡏΦϯϥΠϯͰ։࠵͍ͯ͠Δ Drupal Meetup - ͲΕ΋݄1ճ͙Β͍ͷϖʔεͰ։࠵͍ͯ͠Δ - Drupal Meetup ๛ా https://drupal-meetup-toyota.connpass.com

    - Drupal Meetup Ӌా https://drupal-meetup-haneda.connpass.com - Drupal Meetup Tokyo https://drupal-tokyo.connpass.com 65
  26. ࢀߟࢿྉ2 - ٕज़ॻయ10ͰDrupalͷബ͍ຊΛൃߦ͠·ͨ͠ https://www.acquia.com/jp/blog/published-drupal-ebook-in- techbookfest10 - ঎ۀࢽʮDrupal 9 Web։ൃ͜ͱ͸͡Ίʯ https://nextpublishing.jp/book/12999.html

    - Drupal Quick Start Command https://www.drupal.org/docs/installing-drupal/drupal-quick-start-command - Drupalೝఆࢼݧ ΞΫΠΞೝఆϓϩάϥϜ https://www.acquia.com/jp/solutions/customer-success/acquia- certification 70