Drupalcamp Tallinn - Drupal 8

Preview:

DESCRIPTION

The status of Drupal 8 as of June 2012.

Citation preview

Drupalcamp Tallinn 2012

Kristjan Jansen Drupal 8

About meUsing Drupal since version 2.0

Worked on Drupal UX, theming and branding

Consulting, talking, blogging

Drupal 8 timeline

2012 20132011

2012 20132011

Mar 2011 Dev.

started

2012 20132011

Mar 2011 Dev.

started

June 2012 We are here

2012 20132011

Dec 1 2012 Feature Freeze

Mar 2011 Dev.

started

June 2012 We are here

2012 20132011

Dec 1 2012 Feature Freeze

Mar 2011 Dev.

started

June 2012 We are here

Feb 1 2013 Code

Freeze

2012 20132011

Dec 1 2012 Feature Freeze

Mar 2011 Dev.

started

Aug 2013 Drupal 8 released

June 2012 We are here

Feb 1 2013 Code

Freeze

Official initiatives

Lets go back to Drupalcamp Tallinn 2011

Core initiatives Configuration Web Services

Design Internationalization

HTML5

Core initiatives Configuration Web Services

Design Internationalization

HTML5manymore

Configuration Management

Saving conf in Drupal 7// mymodule/mymodule.module

variable_set("mymodule_variable", 1);

Saving conf in Drupal 8// mymodule/mymodule.module

config('mymodule.config')->set('myvalue', 1)->save();

// mymodule/config/mymodule.config.yml

myvalue: 1

Web services

Drupal should generate output in any format

"Services in core"

Introducing...

Symfony is PHP framework

to create frameworks

Modular object-oriented components for PHP 5.3

Drupal only uses a small subset of components

Historic commit: 1 June 2012

index.php for many years

define(‘DRUPAL_ROOT’, getcwd());require_once DRUPAL_ROOT . ‘/core/includes/bootstrap.inc’;

drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

menu_execute_active_handler();

use Symfony\Component\HttpFoundation\Request;define('DRUPAL_ROOT', getcwd());require_once DRUPAL_ROOT . '/core/includes/bootstrap.inc';

drupal_bootstrap(DRUPAL_BOOTSTRAP_CODE);

$kernel = drupal_container()->get('httpkernel');$response = $kernel->handle($request)->prepare($request)->send();$kernel->terminate($request, $response);

index.php in future

What next?Cleanup and performance

New menu / router Event dispatcher vs hooks install.php and update.php

Internationalization

Mostly about cleaning up language APIs

Might use Symfony pieces

In works: config translation

HTML5

Most core templates converted

New HTML5 form elements

And now the new initiatives

Blocks & Layouts Everywhere

Spin-off from Web Services

"Panels in core"

groups.drupal.org/node/227543

Mobile

Non-official initiatives

PSR-0

Cleanly separate procedural and object-oriented code

Support namespacing and class lazy-loading

Drupal 7 module classesmymodule/mymodule.module

mymodule/mymodule.inc

Drupal 8 module classesmymodule/mymodule.module

mymodule/lib/Drupal/mymodule/firstClass.php

mymodule/lib/Drupal/mymodule/secondClass.php

User experience improvements

New create content page

Latest overview in bojhan.nl

Theming cleanup + Twig

Drupal theming is a mess

Some theme problemsNo consistency

Too many templates

Complex data structurea

Too much _process()ing

Twig

.tpl.php<?php if ($content): ?> <div class=”<?php print $classes; ?>”> <?php print $content; ?> </div><?php endif; ?>

.twig{% if content %} <div {{ attributes }}> {{ contents }} </div> {% endif %}

Help out ingroups.drupal.org/theme-

development

One more thing

Views in core

Photo: Dries Buytaert

Task listPSR-0 conversion

Re-use new configuration and plugin APIs

Convert (some) core views

Move some UI widgets to core

Lots of smaller improvements

All Drupal files under /core

Better Entity API

cron.php → cron.module

xmlrpc.php → xmlrpc.module

profile.module blog.module

How to track all this?

groups.drupal.org/core

drupal.org/list-changes

Again, all this happens only when YOU help

Thanks!

kika.trip.ee twitter.com/kristjanjansen

facebook.com/kristjanjansen