Exploring D8 Development – A little about us. – Let's talk about Drupal 8



Exploring D8 Development – A little about us. – Let's talk about Drupal 8

0 1


2016-april-drupal8-training-day-deck

Drupal 8 Training Day Curriculum

On Github Drupal-8-Study-Group / 2016-april-drupal8-training-day-deck

Exploring D8 Development

Training Day

Nick Selvaggio | Mai Irie | Nicole D'Amico | Ho-Ling Poon | Matt Holford | Rebecca Bronheim |

A little about us.

Hi! I'm Nick. I'm a Managing Partner @

Hi! I'm Mai. I'm a senior developer @

Hi! I'm Ho-Ling. I'm an Applications Developer @

Hi! I'm Matt. I'm the CTO @

Hi! I'm Rebecca. I'm an Account Manager for Digital & Creative Services @

Thank you to Do Something for Hosting!

  • Ask Matt to talk about DoSomething.org

Thank you to TEKsystems for food and beverages!

  • Ask Rebecca to talk about TEKsystems

About Drupal NYC

Join your local community!

Next Meetup is Wed, May 4th

  • We meet the 1st Wednesday of the month @ 30 Rock

Try Drupal

TryDrupal8.com

Also there's a great podcast series: Talking Drupal Podcast

  • Try Drupal platform
  • About the podcast: http://www.talkingdrupal.com/

A little about you.

  • How many have experience with Drupal 7? 6?
  • From other environments? Ruby, Python, .NET
  • Who has tried to develop a module or a theme for D8 already?

What are we doing today?

  • Quick Overview of D8 Landscape
  • Tips on Tools
  • Pair up and setup!
  • Break for lunch @ 12:30 (provided by TEKsystems)
  • Create a module with a custom block and more! (thanks @tedbow for role_notices module!)
  • We will be going through a lot of content!
  • You will be pair programming today
  • Today's goal is for you to walk away knowing how to create a module, implement a plugin (Block), create a form (block config), and more!
  • If we have time, then we'll lightly cover testing.
  • A spin environment has been configured for your enjoyment! (we'll get to that later)

Let's talk about Drupal 8

  • Talk a bit about the history of Drupal.
  • Initial release 2001

Where have we come from?

Our many stages of evolution
  • 8 Major versions

Where are we now?

A revolution has happened!

What's different about developing for D8?

  • PHP 5.5 Required!
  • Symfony2 Framework and Object-oriented programming
  • Goodbye hooks (for the most part) & Hello Routes, Plugins, Services, and Events
  • Configuration and Bundle Entities
  • Better Test Framework -- Kernel replaces SimpleTests, Unit Tests
  • Caching -- D8 uses partial page caching and cache tags. Twig templates get compiled and cached.
  • Composer
  • Different directory structure -- Core is in the directory "core"; your modules and themes go into the modules and themes directories in the project root.
  • Twig and SMACSS & BEM standards, and Stable and Classy core base themes

Who using Drupal 8 now?

Memorial Sloan Kettering Cancer Center (MSK)

One of the largest cancer centers in the United States, launched the new mskcc.org in May. It chose Drupal 8, even when the software was still in its beta phase, to help extend the reach of its "More Science. Less Fear" campaign.

Johnson & Johnson

Partnered with IBM, Apple and Medtronic to launch Care Advantage, a personal concierge service to prepare patients for knee surgery and to help them deal with its after effects.

This site is actually two sites, one with a front end and one that's headless (used as the backend to a mobile app).

Using IBM's Watson!

CH2M

CH2M is a global corporation that works to keep governments, infrastructure, and environments sustainable. It uses Drupal 8 to present and prove its capabilities.

Many, Many, Many More

drupal.org/case-studies/featured/all/drupal-8.x

Tips on Tools

  • You will need a robust IDE (PHPStorm, Eclipse, Netbeans)
  • Install and setup XDebug with your IDE
  • Drupal Console
  • Get acquainted with the Web Profiler module packaged with Devel
  • The importance of an IDE goes hand in hand with D8's shift to OOP. You will be extending classes provided by Drupal core when developing modules. An IDE will be able to tell when you are doing this incorrectly and let you know what you will need to do to correct it.
  • The Drupal Console is a CLI tool to generate boilerplate code, interact and debug Drupal 8.

Lets dive in!

Find a partner

We will be pair programming today!

  • It's time to pair up and set up!
  • Briefly describe how pair programming works
  • We will ask you to periodically switch driver seats

Play Along!

StackStarter.io/spin Spin Code: #trainingday
  • Set up stackstarter on one laptop / pair

Under the hood

We can do alot with just core. Let's see how we can extend.

File Structure

  • Where do modules live?
  • Where do themes live?

Settings.php and friends

  • services.yml

Make our lives easier with Drush

  • Let's download the Examples module

What about Drupal Console?

  • Show some of the commands available.

Lunch time!

Let's build our first module together!

Go to this url for the training exercise:

https://goo.gl/tL1C2p

Today we covered:

  • Learned about the history of Drupal
  • Reviewed some helpful tools for D8 Development
  • Took a look at Drupal 8 project structure
  • Learned about YAML, Routing, Controllers, Plugins, Services, & OOP in Drupal
  • Created our first module!

Support Drupal & community events like this

The Drupal Association is dedicated to helping the open-source Drupal CMS project flourish. Learn more about what we do: We help the Drupal community with funding, infrastructure, education, promotion, distribution and online collaboration at Drupal.org. Funds to support these programs, and the Association staff come from memberships, supporting partners, sponsorships, donations, and DrupalCon events. Join us to help ensure a creative and exciting future for Drupal!

Drupal Association Member Benefits

  • Listed in public directories
  • Receive discounts from DA partners like O'Reilly, Drupal Watchdog, and BuildAModule
  • Membership Badge on your Drupal user profile
  • Receive the latest news on Drupal Association projects.

Please fill out this survey!

https://goo.gl/o8rZe4

Thanks again to:

Survey: https://goo.gl/o8rZe4

Exploring D8 Development Training Day Nick Selvaggio | Mai Irie | Nicole D'Amico | Ho-Ling Poon | Matt Holford | Rebecca Bronheim |