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

アクイア認定サイトビルダー試験対策講座 第1回 Drupalの理解 / Prep for ex...

アクイア認定サイトビルダー試験対策講座 第1回 Drupalの理解 / Prep for exam Site Builder vol.1

More Decks by アクイアジャパン Acquia Japan

Other Decks in Programming

Transcript

  1. ΞΫΠΞೝఆαΠτϏϧμʔ ࢼݧରࡦߨ࠲γϦʔζ – ʮΞΫΠΞೝఆαΠτϏϧμʔ - Drupal 9ʯࢼݧ͸ɺίΞϞδϡʔϧ͓Αͼ֦ுϞδϡʔϧ Λ࢖༻ͯ͠DrupalαΠτΛߏங͢ΔϓϩϑΣογϣφϧ޲͚ͷࢿ֨Ͱ͢ɻ͜ͷࢼݧ͸ɺ DrupalαΠτϏϧμʔͷεΩϧɺ஌ࣝͷݕূΛ໨తͱͯ͠σβΠϯ͞Ε͍ͯ·͢ɻ –

    ຊ΢ΣϏφʔ͸ɺʮΞΫΠΞೝఆαΠτϏϧμʔ - Drupal 9ʯࢼݧͷग़୊ൣғΛ໢ཏͨ͠ɺ શ7ճͷࢼݧରࡦରࡦߨ࠲Ͱ͢ɻࢼݧ߹֨Λ໨ࢦ͢ํ͸΋ͪΖΜɺDrupalΛମܥతʹֶͼͨ ͍ํʹ΋͓͢͢ΊͰ͢ɻ – DrupalΛҰ௨Γૢ࡞ͨ͜͠ͱ͕͋ΔํΛର৅ͱ͍ͯ͠·͢ɻ·ͩDrupalΛ৮ͬͨ͜ͱ͕ແ ͍ํ͸ɺॳ৺ऀ޲͚DrupalνϡʔτϦΞϧಈըʢ೔ຊޠʣΛઌʹݟ͓ͯ͘ͱΑΓཧղ͕ਂ ·Γ·͢ɻ
  2. Drupalͷ֓ཁ – PHP੡ͷΦʔϓϯιʔεCMS – σδλϧମݧΛఏڙ͢ΔͨΊͷϓϥοτϑΥʔϜ – ૑࢝ऀɿDries BuytaertʢυϦεɾόΠλϧτʣ – 2001೥͔ΒOSSͱͯ͠ެ։

    – GPL όʔδϣϯ2Ҏ߱ͰϥΠηϯε 100ສ+ WebαΠτͰՔ ಇ 46,000ਓ+
 Drupal։ൃऀ 8,000ਓ+ ίϯτϦϏϡʔ λʔ 130ສਓ+ ίϛϡχςΟ 51%+
 ੒௕཰(લ೥ൺ)
  3. ެࣜαΠτ – Drupal.org – https://www.drupal.org/ – ओͳϖʔδ – DrupalίΞͷϦϦʔεҰཡ –

    https://www.drupal.org/project/drupal/releases – Ϟδϡʔϧͷݕࡧ/μ΢ϯϩʔυ – https://www.drupal.org/project/project_module – ςʔϚͷݕࡧ/μ΢ϯϩʔυ – https://www.drupal.org/project/project_theme – σΟετϦϏϡʔγϣϯͷݕࡧ/μ΢ϯϩʔυ – https://www.drupal.org/project/project_distribution – υΩϡϝϯτ – https://www.drupal.org/documentation
  4. – ߏ੒؅ཧ – Drupalͷߏ੒ΛYAMLܗࣜͰΤΫεϙʔτɾΠϯϙʔτग़དྷ Δ Drupalͷओͳػೳ – ಠࣗʹ࡞੒Ͱ͖ΔίϯςϯπλΠϓͱϑΟʔϧυ – جຊϖʔδʢWordPressͰݴ͏ॴͷݻఆϖʔδʣɺχϡʔε

    ʢ࣌ܥྻʣͳͲͷίϯςϯπͷछྨͱϑΟʔϧυΛఆٛ͢ Δ͜ͱ͕ग़དྷΔ – λΫιϊϛʔͱϘΩϟϒϥϦʔ – λάͳͲͷίϯςϯπΛ෼ྨ͢ΔͨΊͷϘΩϟϒϥϦʔΛఆ ٛ͢Δ͜ͱ͕ग़དྷΔ – Ϣʔβʔͱϩʔϧ؅ཧ – ࡉ͔ͳϢʔβʔݖݶΛ؅ཧ͢Δ͜ͱ͕ग़དྷΔ – Views – ΫΤϦϏϧμʔπʔϧɻ؅ཧը໘্Ͱίϯςϯπͷදࣔ Λૢ࡞ग़དྷΔ – ϝσΟΞ؅ཧ – ίϯςϯπʹදࣔ͢Δը૾΍ಈըΛ؅ཧͰ͖Δ – ଟݴޠػೳ – αΠτΛଟݴޠల։͢Δࡍʹ࢖༻͢Δ – Ωϟογϯά – ಈతίϯςϯπΛΩϟογϡͯ͠ύϑΥʔϚϯεΛ޲্Ͱ͖ ΔɻBigPipeͳͲͷٕज़͕࠾༻͞Ε͍ͯΔɻ – JSON:API – Drupal಺ͷίϯςϯπΛWeb APIͱͯ͠ѻ͏͜ͱ͕Ͱ͖Δɻ ϔουϨεCMSͱͯ͠ϚϧννϟωϧʹίϯςϯπΛ഑৴Ͱ͖ Δɻ
  5. Ϟδϡʔϧ – খ͞ͳػೳͷ୯Ґ – ෳ਺ϞδϡʔϧΛ૊Έ߹ΘͤͯαΠτΛߏங – 3ͭͷछྨʹ෼ྨ – ίΞϞδϡʔϧ –

    ίΞ։ൃऀ͕؅ཧ͢Δ – ඪ४ػೳ΋ෳ਺ͷϞδϡʔϧͰߏ੒ – ྫʣϒϩοΫɺviews(ΫΤϦϏϧμʔ)
 ϑΟʔϧυɺݕࡧɺϢʔβʔ؅ཧ...etc – ίϯτϦϏϡʔτϞδϡʔϧ – ίϯτϦϏϡʔλʔ͕؅ཧ͢Δ – 4ສݸҎ্ͷެ։Ϟδϡʔϧ
 https://www.drupal.org/project/project_module – ΧελϜϞδϡʔϧ – ֤ϓϩδΣΫτͷͨΊʹಠࣗͰ։ൃ͢Δ Ϟδϡʔϧ͸౓ʑϨΰϒϩοΫʹྫ͑ΒΕΔ
  6. ςʔϚ – αΠτͷݟͨ໨Λఆٛ͢ΔϑΝΠϧͷू߹ମ – CSSɺJSɺςϯϓϨʔτϑΝΠϧʢTwigʣɺઃఆϑΝΠϧͳ Ͳ – ςʔϚͷछྨ – ίΞςʔϚ

    – DrupalͷίΞʹؚ·ΕΔ – ClassyɺBartikɺSevenɺStableɺStark – ίϯτϦϏϡʔτςʔϚ – Drupal.orgͰެ։͞Ε͍ͯΔ – https://www.drupal.org/project/project_theme – ΧελϜςʔϚ – θϩ͔Βɺ͋Δ͍͸αϒςʔϚͳͲΛϕʔεʹࣗ࡞͢Δ DrupalͷσϑΥϧτςʔϚʮBartikʯ
  7. σΟετϦϏϡʔγϣϯ – ಛఆͷ༻్ʹ߹ΘͤͯϞδϡʔϧ΍ςʔϚΛ
 ύοέʔδԽͨ͠΋ͷ – Drupal.orgͰެ։͞Ε͍ͯΔ – https://www.drupal.org/project/project_distribution – ༗໊ͳσΟετϦϏϡʔγϣϯ

    – Open Social – SNS ʹಛԽ – Thunder – ϝσΟΞαΠτʹಛԽ – Acquia Lightning – ։ൃऀ͕εϐʔσΟʔʹշదʹ։ൃ͢Δ͜ͱΛࢧԉ ϨΰϒϩοΫΛύοέʔδԽ
  8. Drupalͷϑϩʔ https://www.drupal.org/docs/understanding-drupal/overview-of-drupal 1. σʔλ a. ϊʔυɺλΫιϊϛʔ... 2. Ϟδϡʔϧ a. ػೳΛఏڙ

    b. ίΞϞδϡʔϧɺ
 ίϯτϦϏϡʔτϞδϡʔϧ... 3. ϒϩοΫɾϝχϡʔ a. ϒϩοΫ...ϦʔδϣϯʹϞδϡʔϧ͔Βͷग़ྗΛ഑ஔ b. ϝχϡʔ...֤ϝχϡʔύεʢ૬ରURLʣʹ
 ؚ·ΕΔίϯςϯπΛఆٛ 4. Ϣʔβʔݖݶ a. Ϣʔβʔͷ໾ׂΛఆٛ 5. ςϯϓϨʔτ a. CSSɺHTMLɺTwig
  9. Drupalͷσʔλͷछྨ – DrupalαΠτͰѻΘΕΔσʔλ͸4छྨʹ෼ྨ – Content – αΠτ๚໰ऀʹදࣔ͢Δ͜ͱΛ໨తͱͨ͠ςΩετɺը૾ͳͲͷ৘ ใ – Configuration

    – αΠτͷಈ࡞ɺදࣔํ๏ͳͲΛఆٛ͢Δ৘ใ – ௨ৗ͸খ͞ͳςΩετͰදݱ͞ΕΔ܏޲ – State – cronδϣϒ͕࠷ޙʹ࣮ߦ͞Εͨ࣌ࠁͳͲɺαΠτͷݱࡏͷঢ়ଶʹؔ ͢ΔҰ࣌తͳੑ࣭ͷ৘ใ – Session – ϩάΠϯ͍ͯ͠Δ͔Ͳ͏͔΍CookieͳͲɺݸʑͷαΠτ๚໰ऀͷα Πτͱͷ΍ΓऔΓʹؔ͢Δ৘ใ ͦΕͧΕҟͳΔํ๏Ͱ
 ฤूɺ຋༁ɺอଘ͞ΕΔ https://www.drupal.org/docs/user_guide/en/understanding-data.html
  10. DrupalίΞͷϦϦʔεαΠΫϧ – ύονϦϦʔε͸ຖ݄ϦϦʔε͞ΕΔ – ϚΠφʔϦϦʔε͸໿6͔݄͝ͱʹϦϦʔε͞Εɺ৽͍͠ػೳ͕૊Έࠐ·ΕΔ – ηΩϡϦςΟमਖ਼͸ɺ࣍ͷϚΠφʔϦϦʔε·Ͱ໿6͔݄ؒఏڙ͞Εɺ߹ܭ1೥ͷηΩϡϦςΟΧόϨοδ͕͋Δ – 8.xγϦʔζͷ࠷ޙͷϚΠφʔϦϦʔε͸ϩϯάλʔϜαϙʔτʢLTSʣϦϦʔεͳͷͰɺ2021೥11݄·ͰηΩϡϦ ςΟ͕ద༻

    – Drupal 10ʢϝδϟʔόʔδϣϯʣ
 ͷϦϦʔε༧ఆ೔͸2022೥6݄ – Drupal 8ͷEOL͸2021೥11݄ – Drupal 7ͷEOL͸2022೥11݄ https://www.drupal.org/about/core/policies/core-release-cycles/drupal- core-release-cycle-major-minor-and-patch-releases
  11. DrupalͷϩʔυϚοϓ – Decoupled Menus – JavaScript ϑϩϯτΤϯυͷͨΊͷϝχϡʔίϯϙʔωϯτ – Automated updates

    – ηΩϡϦςΟϦϦʔεͷࣗಈߋ৽ – New front end theme – Ϟμϯͳ֎؍ͱૢ࡞ੑΛඋ͑ͨ৽͍͠σϑΥϧτͷϑϩϯτΤϯυςʔϚ – Easy out-of-the-box – ʮ͙͢ʹ࢖͑Δʯମݧͷ޲্ – Drupal 10 readiness – 2022 ೥ 6 ݄ެ։༧ఆͷ Drupal 10 ʹ޲͚ͯɺPHPɺSymfony ͷओཁͳґଘؔ܎ͷ Ξοϓσʔτ Drupal 10ʹ޲͚ͯ5ͭͷΠχγΞνϒ͕ൃද
  12. DrupalͷγεςϜཁ݅ͱґଘϥΠϒϥϦ ※Drupal 9.1.x ͷ৔߹ γεςϜཁ݅ – Apache 2.4.7 Ҏ্ –

    Nginx 0.7.x Ҏ্ – PHP 7.3 Ҏ্
 ※ PHP 8.0 ʹؔͯ͠͸ Drupal 9.1 Ͱਖ਼ࣜʹαϙʔτ – MySQL 5.7.8 Ҏ্ – MariaDB 10.3.7 Ҏ্ – SQLite 3.26 Ҏ্ – (pg_trgm ϞδϡʔϧΛඋ͑ͨ)
 PostgreSQL 10 Ҏ্ ओͳαʔυύʔςΟʔͷґଘؔ܎ – Symfony 4.4 – Twig 2 – CKEditor 4 – PHPUnit 8 https://www.drupal.org/docs/system-requirements
  13. ศརͳπʔϧ Drush – ΩϟογϡΫϦΞɺߏ੒ઃఆͷΠϯϙʔ – τɺ৽͍͠Ϣʔβʔͷ࡞੒ɺϞδϡʔϧͷ༗ޮ ԽͳͲΛߦ͏ – Drush͸ Drupal

    Shell ͷུশ Drupal Console – Ϟδϡʔϧ։ൃʹ໾ཱͭɺϘΠϥʔϓϨʔ τίʔυͷੜ੒΍σόοάػೳΛఏڙ͢Δ – Symfony Console ͱͦͷଞͷαʔυύʔ ςΟίϯϙʔωϯτͰߏ੒
  14. Drupal؀ڥͷ༻ҙ – Drupal 9ͷֶश؀ڥΛ༻ҙ – ༗໊ͳDrupalͷϩʔΧϧ։ൃ؀ڥߏஙπʔϧ – Lando – Docksal

    – DDEV – Drupal VM – ࠓճ͸ྫͱͯ͠ɺLandoͰDrupal 9؀ڥΛߏங͢ΔखॱΛ঺հ
  15. LandoΛ༻͍ͨDrupalͷϩʔΧϧ։ൃ؀ڥͷ࡞੒ # DrupalϓϩδΣΫτͷ࡞੒ $ composer create-project drupal/recommended-project my-drupal9-app # ϓϩδΣΫτϧʔτʹҠಈ

    $ cd my-drupal9-app # LandoͷॳظԽ $ lando init \ --source cwd \ --recipe drupal9 \ --webroot web \ --name my-drupal9-app # ίϯςφͷىಈ $ lando start …(লུ)... APPSERVER URLS https://localhost:55017 http://localhost:55018 http://my-drupal9-app.lndo.site:8080/ https://my-drupal9-app.lndo.site/ ͦͷ1. DrupalϓϩδΣΫτ࡞੒ʙίϯςφͷىಈ
  16. ͦͷ2. DrupalͷΠϯετʔϧ – ϒϥ΢βͰϩʔΧϧαʔόʔʹΞΫηε – http://my-drupal9-app.lndo.site:8080/ – ΠϯλϥΫςΟϒΠϯετʔϥʔ͕ىಈ – ϓϩϑΝΠϧ͸ʮඪ४ʯΛબ୒

    – σʔλϕʔεͷ઀ଓઌ৘ใ͸
 lando info ίϚϯυͰ֬ೝ LandoΛ༻͍ͨDrupalͷϩʔΧϧ։ൃ؀ڥͷ࡞੒ ͓·͚ɿLandoͷૢ࡞ – lando stop – ίϯςφͷఀࢭ – lando ssh – ίϯςφͷγΣϧʹΞΫηε͢Δ
  17. DrupalͷΠϯετʔϧϓϩϑΝΠϧ – ͜Ε͔Βߏங͢ΔαΠτͷಛੑ΍ػೳΛɺ
 ୯Ұͷμ΢ϯϩʔυͰఏڙ͢ΔͨΊͷ࢓૊ΈΛఏڙ – DrupalΠϯετʔϧ࣌ʹؚΊ͍ͨϞδϡʔϧɺ
 ςʔϚɺઃఆϑΝΠϧΛఆٛ
 – DrupalίΞʹ͸3ͭͷΠϯετʔϧϓϩϑΝΠϧؚ͕·ΕΔ –

    standard – ։࢝࣌఺͔ΒҰൠతͳػೳΛར༻Ͱ͖ΔܗͰΠϯετʔϧ – minimal – ͋Β͔͡Ίઃఆ͞ΕͨػೳΛ࢖ΘͣʹΧελϜαΠτΛߏங – ্ڃऀ޲͚ – demo_umami – Drupal ͷੑೳ͕Θ͔ΔαϯϓϧαΠτΛΠϯετʔϧ – ݕূ໨తͰͷར༻ʹݶఆ
  18. ࿅श໰୊3 Drupal 9ʹؔ͢Δઆ໌Ͱਖ਼͍͠΋ͷΛ1ͭબ୒͍ͯͩ͘͠͞ɻ 1. Drupal 9͔ΒηϚϯςΟοΫɾόʔδϣχϯά͕࠾༻͞Εͨɻ 2. Drupal 9.0͕ϦϦʔε͞ΕͨλΠϛϯάͰDrupal 7͕EOL(End

    of Life)ʹͳͬͨɻ 3. Drupal 8͔ΒDrupal 9΁ͷΞοϓάϨʔυ͸ɺDrupal 7͔ΒDrupal 8ͷΞοϓά ϨʔυΑΓ΋༰қͰ͋Δɻ 4. Drupal 9͔ΒViewsػೳ͕ίΞʹऔΓࠐ·Εͨɻ
  19. ࿅श໰୊3 Drupal 9ʹؔ͢Δઆ໌Ͱਖ਼͍͠΋ͷΛ1ͭબ୒͍ͯͩ͘͠͞ɻ 1. Drupal 9͔ΒηϚϯςΟοΫɾόʔδϣχϯά͕࠾༻͞Εͨɻ 2. Drupal 9.0͕ϦϦʔε͞ΕͨλΠϛϯάͰDrupal 7͕EOL(End

    of Life)ʹͳͬͨɻ 3. Drupal 8͔ΒDrupal 9΁ͷΞοϓάϨʔυ͸ɺDrupal 7͔ΒDrupal 8ͷΞοϓά ϨʔυΑΓ΋༰қͰ͋Δɻ 4. Drupal 9͔ΒViewsػೳ͕ίΞʹऔΓࠐ·Εͨɻ ਖ਼ղɿ3