Drupal 8
What You Need To Know

I'm Matthew Tift

Developer at Wisconsin Public Radio

Drupal core contributor since 2010

Twin Cities Drupal Camp organizer

PhD in musicology for UW-Madison

Acknowledgements

Jess Myrbo (xjm)

Cathy Theys (YesCT)

Angela Byron (webchick)

Jen Lampton (jenlampton)

Gábor Hojtsy (Gábor Hojtsy)

Dries Buytaert (Dries)

Larry Garfield (Crell)

Kristof De Jaeger (swentel)

Today

D8: The Big Picture

Major D8 Initiatives

How You Can Help

Drupal 8 Timeline

Jan 2011: Drupal 7.0 Release

Mar 2011: D8 Development Begins

Feb 2013: Feature Freeze

Jul 2013: API Freeze

 Current: Polish phase

summary

When should I
move to Drupal 8?

2014

(According to Dries)

What is exciting about Drupal 8?

D8 Initiatives

Mobile

Configuration Management

HTML5

Layouts

Multilingual

Views in Core

Web Services


Related Efforts

Successful, if not "Official"

Spark

Drupal 7 distribution

Incubator for Drupal 8

Focus on authoring experience

Twig

Template engine for PHP

Major API changes

Easier to learn

Everything renderable

Nearly 30 Other Community Initiatives

drupal.org/community-initiatives/drupal-core#other

Status: July 2012

status

Current Status

status

Drupal 8

Mobile Initiative

Dries Buytaert

March 8, 2011


"If I were to start Drupal from scratch today, I'd build it for mobile experiences first, and desktop experience second."

Front-end Performance

Some studies show up to 80-90% of a page’s render time takes place in the front-end

Step One

D7 Documentation

drupal.org/documentation/mobile

All D8 Themes:
Responsive

Bartik

Stark

Seven

D7 Problem:

Mobile

Experience

d7 mobile

D8 Solution:

Mobile

Experience

d8 mobile

D7 Problem:

Mobile Menus

d7 menu

D8 Solution:

Responsive Toolbar

(Spark)

d8 menu

D7 Problem:

Adding Mobile

Content

d7 add content

D8 Solution:

Responsive

Admin Screens

d8 add content

Breakpoint Module

breakpoint

Picture Module

picture module

D8 Mobile:
How You Can Help

groups.drupal.org/mobile



Lead: John Albin Wilkins

Issue Tag: mobile

IRC: #drupal-mobile

Usability

drupal books

CKEditor

ckeditor core

CKEditor In Core

(Spark)


ckeditor core

Form Editing

edit screen

In-Place Editing

in place editing
so you're telling me

Tour Module

tour module

Working again!

Select Multiple Files

file selector

Multiple Upload

select four files

Drag-n-Drop

drag-n-drop

D8 Usability:
How You Can Help

groups.drupal.org/usability



Lead: Bohjan Somers & Roy Scholten

Issue Tag: usability

IRC: #drupal-usability

Drupal 8:
Configuration Management

D7 Problem:

No good way to move Drupal configuration information between environments

D7 Problem:

Every module stores their configuration data in a different format

D8 Configuration API

Provides a central place for modules to store configuration data, such as site name or image styles

CMI for Developers

variable_get tombstone
                $config = config('prefix.name');
                $config->get('my.value');
                $config->set('my.value','my new value');
                $config->save();
            

Configuration data
stored in YAML files

/sites/default/files/config_xxx/active/system.site.yml

                name: d8.local
                mail: admin@example.com
                slogan: ''
                page:
                  403: ''
                  404: ''
                front: node
                admin_compact_mode: '0'
                weight_select_max: '100'
                langcode: en
            

Lots of .yml files

yml files

New Rule

"Don't hack core"
is replaced by
"Don't hack your active config"
in Drupal 8

-Alex Pott, Drupal Core and CMI Maintainer


.info files are now
.info.yml files

Configuration Management:
How You Can Help

groups.drupal.org/cmi



Lead: Greg Dunlap

IRC: #drupal-cmi

Drupal 8: HTML5

html5


Switch Drupal's
default doctype from
XHTML to HTML5


HTML5 Form Elements

url, email, tel, date, color, range, number, search, and more!

Drupal 8:
Blocks and Layouts

D7 Problem:

Blocks vs elements

Only one layout

Multiple instances of a single block

D8 Solution:
Plugin API

Replaces hook_info()

Changes how developers extend Drupal

Reusable code components


Plugin API Documentation

drupal.org/node/1637614

Layouts:
How You Can Help

https://groups.drupal.org/scotch



Lead: Kris Vanderwater

IRC: #drupal-scotch

Drupal 8

Multilingual

Photo: Fluss

D7 Problem:

Not possible to remove English

Manually download language files

Translating description, alt, title, tags

Bazillion modules needed

Choose Language on First Screen

Nearly 100 languages available

First Screen

English is now optional

Installation Language

Automatic Translation Importing

Automatic Translation Import

Easier right to left styling

Automatic Translation Import

Entity Translation API

Drupal 7

                $field = field_info_field('field_foo');
                $langcode = field_is_translatable($entity_type, $field) ? $active_langcode : LANGUAGE_NONE;
                $value = $entity->field_foo[$langcode][0]['value'];
            

Drupal 8

                $translation = $entity->getTranslation($active_langcode);
                $value = $translation->field_foo->value; 
            

Multilingual:
How You Can Help

drupal8multilingual.org



Lead: Gábor Hojtsy

Issue Tag: D8MI

IRC: #drupal-i18n

Drupal 8: Views in Core

views in core

Views in Core
Born at Twin Cities Drupal Camp in 2012

Views
Merged into core on
Oct. 22, 2012

No Wait for Views

views in d7

Views in Core Highlights

Uses the new plugin system

All views go to disk

Views exported as YAML (using CMI)

HTML tables are responsive

Views Bulk Operations

Support for REST and data serialization

Homepage is a VIEW

homepage Edit Homepage

Content and People Pages are views

content and people pages
mind blown

Views In Core:
How You Can Help



Issue Tag: VDC

IRC: #drupal-vdc

Drupal 8

Web Services

D7 Problem:

Drupal assumes it will be delivering a blog-like HTML page


The Web Services and Context Core Initiative (WSCCI) aims to transform Drupal from a first-class CMS to a first-class REST server with a first-class CMS on top of it

Symfony2
HttpKernel component

Handles web requests

symfony


REST/serialization support

Expose any View as a serialized resource collection

Guzzle HTTP client library

Added to replace drupal_http_request()

guzzle

Unit-Testable Code

Dependency Injection Container to help make code more unit testable

phpunit


Drupal 8 is a web service

D8 Web Services:
How You Can Help

https://groups.drupal.org/wscci



Lead: Larry Garfield

Issue Tag: wscci

IRC: #drupal-wscci

Other Goodies

Photo: Bryan Ochalla

Twig
New template engine

twig


tpl.php files are gone


Bye-bye template process layer and process functions

template_process_HOOK() MODULE_process_HOOK() THEME_process_HOOK()

D7 Problem:

Different methods of printing variables

d7 variables

D8 Solution:

Variables printed the same way

d7 variables


Twig Issues

https://groups.drupal.org/node/278968


PSR-0 compatible
class loader in core

Symfony2 ClassLoader

Composer to handle Drupal Core PHP dependencies

composer

Internet Explorer 6/7/8 no longer fully supported

ie6 death

Modules in /modules

Themes in /themes


/sites/all/ is still supported

Anthony Ferrara (ircmaxell)

d8 cyclomatic complexity
d8 is awesome


Drupal 8 is getting more object oriented, but there still many, many hooks

Core Mentoring

drupal.org/core-mentoring

Twitter: @drupalmentoring


Tuesdays at 9pm CDT

Wednesdays at 11am CDT

help wanted sign Photo: Thewmatt


Matthew Tift

matthewtift.com/talks/wid8

Drupal.org: mtift

Twitter: @matthewtift