Drupal 8
What You Need To Know

davereid.github.io/2013-08-09

drupalcorn-logo

I'm Dave Reid

Senior Engineer at Palantir.net

The "Module Guy"

Drupal core contributor (since 2006)

New dad as of Oct 15, 2012: @OliverReid

You may know my cats...

@rodney_the_cat

Athena, hates Twitter and mustaches

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)

Matthew Tift (mtift)

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)

2014-2015

(According to Dave)

What is exciting about Drupal 8?

D8 Initiatives

https://drupal.org/community-initiatives/drupal-core

Mobile

Configuration Management

HTML5

Layouts

Multilingual

Views in Core

Web Services


Related Efforts

Successful, if not "Official"

Spark

https://drupal.org/project/spark

Drupal 7 distribution

Incubator for Drupal 8

Focus on authoring experience

Twig

Template engine for PHP

Fast, Secure, Flexible

Convert all the .tpl.php files to .twig

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

Improved content editing

create content screen

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

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

Replaces functions like variable_get()

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!

Select Multiple Files

file selector

Multiple Upload

select four files

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

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

http://twig.sensiolabs.org/

tpl.php files are gone

Now use html.twig files!

{% if title %}
  

{{ '!title'|t({ '!title': title }) }}

{% endif %} {{ content }} {% if description %}
{{ description }}
{% endif %}


Bye-bye template process layer and process functions

template_process_HOOK() MODULE_process_HOOK() THEME_process_HOOK()

BUT! preprocess remains


PSR-0 compatible
class loader in core

Symfony2 ClassLoader

Composer to handle Drupal Core PHP dependencies

composer
dave is pedantic

Internet Explorer 6/7/8 no longer fully supported

ie6 death

Modules in /modules

Themes in /themes


/sites/all/, /sites/default/, and /sites/sitename.com/ are still supported

Drupal 8 Style Guide

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

drag-n-drop

New modules in core

Breakpoint

CKEditor

Config

Content Translation (entity translation)

Datetime

Edit

Editor

Email

Entity Reference

HAL

Layout

Link

Picture

REST

Serialization

Telephone

Tour

Views

Anthony Ferrara (ircmaxell)

d8 cyclomatic complexity
d8 is horrible
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

What could still be coming?

PSR-X for module code

Improved block UI

Actual preview and responsive preview

Actual Image upload in WYSIWYG

Media Sprint on Sunday!

http://2013.drupalcorn.org/content/media-sprint

New? Find me, Brandon Neil, or Michael Hofmockel

Getting started with Media and File entity
(Fri 10 AM Main Lounge)

Current state of Media and File entity 2.x
(Sat 1 PM Main Lounge)

Great place to learn and contribute!


Thanks!

davereid.github.io/2013-08-09

Twitter: @davereid

drupalcorn-logo