Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the...

Post on 26-Aug-2020

0 views 0 download

Transcript of Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the...

Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple website project

Baris Tosun @rominronin Web developer at identum

TalkSummary

›  Choosing Drupal 8 ›  Configuration Management ›  Differences (to D7) ›  Some Challenges

Sec-on1:ChoosingDrupal8

›  Choosing Drupal 8 ›  Configuration Management ›  Differences (to D7) ›  Some Challenges

FirstDrupal8Project

›  Small, uncomplicated project ›  Lots of time to completion ›  Need to start somewhere

http://www.sphinx.at

Ques-onsAboutDrupal8

›  What is Twig like to use? ›  Updates to processes? ›  Any negative differences (to Drupal 7)? ›  How ready is Drupal 8 for use?

Expecta-ons

›  Challenging ›  Time consuming ›  Missing Contrib ›  Better (somehow)

LookingForwardTo

›  Using Twig ›  Updated/Improved Interface ›  Dig deeper into Drupal 8

Sec-on2:Configura-onManagement

›  Choosing Drupal 8 ›  Configuration Management ›  Differences (to D7) ›  Some Challenges

TheProblemWithDrupal7

Live

Test

Development

Content

Configura-on

(files) (database)

An updated configuration cannot simply be pushed

to production/live.

‚Modern‘DevelopmentWorkflow

Live

Test

Development

Content

Configura-on

(files) (database)

In Drupal 8, an updated configuration can be

imported to a site without overwriting data.

SeOngItUp Default configuration directory, after installation.

SeOngItUp You can place the folder where you like, keep permissions and

ownership in mind. www.drupal.org/node/2431247

SeOngItUp

$ drush config-export

Used to export site configuration to the config folder.

(Alternatively, use the export full archive in the configuration

Synchronisation page)

SeOngItUp

STOP!

DEMOTIME!

ConfigManagement

›  Works with almost everything ›  Blocks are a special case ›  Another demo!

Sec-on3:SomeDifferences

›  Choosing Drupal 8 ›  Configuration Management ›  Differences (to D7) ›  Some Challenges

FolderStructure

›  /core

›  /modules

›  /themes

›  /sites/all/* -> still supported

SeOngs.local.php

SeOngs.local.php-SeOngItUp

SeOngs.local.php-SeOngItUp

$ cp sites/example.settings.local.php sites/default/settings.local.php

Twig

›  Start learning this ASAP Useful Resources ›  http://twig.sensiolabs.org/ – rtfm ;) ›  https://events.drupal.org/barcelona2015/sessions/mastering-twig – Javier Eguiluz ›  Code comments in templates

https://events.drupal.org/barcelona2015/sessions/

mastering-twig – Javier Eguiluz

TwigDebugging

›  Turn on debugging for a smoother theming experience!

TwigDebugging

TwigDebugging–SeOngItUp

TwigDebugging–SeOngItUp

TwigFilters

These filters may be extremely useful

Refer to 23:38 – ,Escaping‘ in the previously mentioned TWIG talk:

https://events.drupal.org/barcelona2015/sessions/

mastering-twig

Blocks++

›  Custom blocks (fieldable) ›  Block instances ›  Entity references (OMFG!)

Sec-on4:SomeDifficul-es

›  Choosing Drupal 8 ›  Configuration Management ›  Some Differences ›  Some Challenges

SomeDifficul-es

›  I wasn‘t prepared for OOP in PHP!

–  Allow time for adjustment if you are not familiar with namespacing!

SomeDifficul-es

›  I wasn‘t prepared for OOP in PHP ›  Code examples are seriously lacking

Useful resources include –  #drupal on irc.freenode.net –  http://drupal.stackexchange.com/ - Use the [8] filter –  Forums on drupal.org

SomeDifficul-es

›  I wasn‘t prepared for OOP in PHP ›  Code examples are seriously lacking›  Buggy modules

Remember to report them at drupal.org/projects

SomeDifficul-es

›  I wasn‘t prepared for OOP in PHP ›  Code examples are seriously lacking›  Buggy modules ›  Incomplete, alpha/beta status modules

If you have time, contribute to core/contrib!

Ques-onsAboutDrupal8

›  What is Twig like to use? ›  Updates to processes? ›  Any negative differences (to Drupal 7)? ›  How ready is Drupal 8 for use?

Great, once you get used to it CMI, Git based deployment Code examples, modules It depends!

Conclusion–Part1

›  Config Mgt is awesome ›  Consider your modules – even more than normal ›  Be prepared for OOP in PHP ›  Add extra time to your time plan ›  Contribute to Drupal.org where possible

Conclusion–Part2

›  Drupal 7 is not going anywhere

Danke für die Aufmerksamkeit!

Referenzen

›  Git and Drupal –  https://www.drupal.org/documentation/git/configure –  https://www.drupal.org/node/803746

›  Twig –  http://twig.sensiolabs.org –  https://events.drupal.org/barcelona2015/sessions/mastering-twig - Javier Eguiluz

›  Configuration Management –  https://events.drupal.org/barcelona2015/sessions/configuration-deployment-best-

practices-drupal-8 – Moshe Weitzman, Populist

›  Useful resources include –  #drupal on irc.freenode.net –  http://drupal.stackexchange.com/ - Use the [8] filter –  Forums on drupal.org

Questions?