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

41
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

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

Page 1: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

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

Page 2: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

TalkSummary

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

Page 3: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

Sec-on1:ChoosingDrupal8

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

Page 4: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple
Page 5: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

FirstDrupal8Project

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

http://www.sphinx.at

Page 6: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

Ques-onsAboutDrupal8

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

Page 7: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

Expecta-ons

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

Page 8: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

LookingForwardTo

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

Page 9: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

Sec-on2:Configura-onManagement

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

Page 10: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

TheProblemWithDrupal7

Live

Test

Development

Content

Configura-on

(files) (database)

An updated configuration cannot simply be pushed

to production/live.

Page 11: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

‚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.

Page 12: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

SeOngItUp Default configuration directory, after installation.

Page 13: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

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

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

Page 14: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

SeOngItUp

$ drush config-export

Used to export site configuration to the config folder.

(Alternatively, use the export full archive in the configuration

Synchronisation page)

Page 15: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

SeOngItUp

Page 16: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

STOP!

DEMOTIME!

Page 17: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

ConfigManagement

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

Page 18: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

Sec-on3:SomeDifferences

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

Page 19: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

FolderStructure

›  /core

›  /modules

›  /themes

›  /sites/all/* -> still supported

Page 20: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

SeOngs.local.php

Page 21: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

SeOngs.local.php-SeOngItUp

Page 22: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

SeOngs.local.php-SeOngItUp

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

Page 23: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

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

Page 24: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

TwigDebugging

›  Turn on debugging for a smoother theming experience!

Page 25: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

TwigDebugging

Page 26: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

TwigDebugging–SeOngItUp

Page 27: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

TwigDebugging–SeOngItUp

Page 28: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

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

Page 29: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

Blocks++

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

Page 30: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

Sec-on4:SomeDifficul-es

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

Page 31: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

SomeDifficul-es

›  I wasn‘t prepared for OOP in PHP!

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

Page 32: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

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

Page 33: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

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

Page 34: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

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!

Page 35: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

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!

Page 36: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

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

Page 37: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

Conclusion–Part2

›  Drupal 7 is not going anywhere

Page 38: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple
Page 39: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

Danke für die Aufmerksamkeit!

Page 40: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

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

Page 41: Make the Leap - The Joy of Drupal 8files.meetup.com/11250462/the-joy-of-drupal-8.pdf · Make the Leap - The Joy of Drupal 8 An experience share of working with Drupal 8 for a simple

Questions?