82
What’s cooking?

Drupal 8 - What’s cooking?

Embed Size (px)

Citation preview

Page 1: Drupal 8 - What’s cooking?

What’s cooking?

Page 2: Drupal 8 - What’s cooking?

Claudiu Cristea

twitter.com/claudiu_cristea

drupal consultant, trainer, developercore contributor, image system maintainer

Page 3: Drupal 8 - What’s cooking?

Angie Byron (webchick)Wayne Eaker (zengenuity)

credits:

Page 4: Drupal 8 - What’s cooking?

timelineJan 2011: Drupal 7.0 Released

Mar 2011: Drupal 8 Development Begins

Dec 2012: Feature Freeze

Feb 2013: Feature Complete

Alphas snapshots

July 2013: API Freeze

HERE WE ARE!

Beta (API locked)

Drupal 8.0

Page 5: Drupal 8 - What’s cooking?

core initiatives

Page 6: Drupal 8 - What’s cooking?

core initiatives• Mobile

Page 7: Drupal 8 - What’s cooking?

core initiatives• Mobile

• Configuration Management

Page 8: Drupal 8 - What’s cooking?

core initiatives• Mobile

• Configuration Management

• HTML5

Page 9: Drupal 8 - What’s cooking?

core initiatives• Mobile

• Configuration Management

• HTML5

• Layouts

Page 10: Drupal 8 - What’s cooking?

core initiatives• Mobile

• Configuration Management

• HTML5

• Layouts

• Multilingual

Page 11: Drupal 8 - What’s cooking?

core initiatives• Mobile

• Configuration Management

• HTML5

• Layouts

• Multilingual

• Views in Core

Page 12: Drupal 8 - What’s cooking?

core initiatives• Mobile

• Configuration Management

• HTML5

• Layouts

• Multilingual

• Views in Core

• Web Services

Page 13: Drupal 8 - What’s cooking?

• Twig

• Spark

• Others

unofficial initiatives

Page 14: Drupal 8 - What’s cooking?

the state of drupal 8

Page 15: Drupal 8 - What’s cooking?

the state of drupal 8

end users

Page 16: Drupal 8 - What’s cooking?

the state of drupal 8

end userssite builders

Page 17: Drupal 8 - What’s cooking?

the state of drupal 8

end userssite builders

designers

Page 18: Drupal 8 - What’s cooking?

the state of drupal 8

end userssite builders

designerscoders

Page 19: Drupal 8 - What’s cooking?

end users

Page 20: Drupal 8 - What’s cooking?

mobile: responsive design

Page 21: Drupal 8 - What’s cooking?

mobile: responsive designDRUPAL 7

Page 22: Drupal 8 - What’s cooking?

mobile: responsive designDRUPAL 7 DRUPAL 8

Page 23: Drupal 8 - What’s cooking?

mobile: responsive design

Page 24: Drupal 8 - What’s cooking?

mobile: responsive designDRUPAL 7

Page 25: Drupal 8 - What’s cooking?

mobile: responsive designDRUPAL 7 DRUPAL 8

Page 26: Drupal 8 - What’s cooking?

mobile: responsive designDRUPAL 8

Page 27: Drupal 8 - What’s cooking?

mobile: responsive designDRUPAL 8

Page 28: Drupal 8 - What’s cooking?

mobile: responsive designDRUPAL 8

Page 29: Drupal 8 - What’s cooking?

mobile: responsive design

Page 30: Drupal 8 - What’s cooking?

mobile: responsive designDRUPAL 7

Page 31: Drupal 8 - What’s cooking?

mobile: responsive designDRUPAL 7 DRUPAL 8

Page 32: Drupal 8 - What’s cooking?

wysiwyg in coreDRUPAL 8

Page 33: Drupal 8 - What’s cooking?

inline editing

Page 34: Drupal 8 - What’s cooking?
Page 35: Drupal 8 - What’s cooking?
Page 36: Drupal 8 - What’s cooking?

file field multiselect

Page 37: Drupal 8 - What’s cooking?
Page 38: Drupal 8 - What’s cooking?
Page 39: Drupal 8 - What’s cooking?

form elements

• URL

• Email

• Tel

• Date

• Color

• Range

• Number

• Search

Page 40: Drupal 8 - What’s cooking?
Page 41: Drupal 8 - What’s cooking?
Page 42: Drupal 8 - What’s cooking?

tour module

Page 43: Drupal 8 - What’s cooking?
Page 44: Drupal 8 - What’s cooking?
Page 45: Drupal 8 - What’s cooking?

site builders

Page 46: Drupal 8 - What’s cooking?

DRUPAL 7

directory structure

Page 47: Drupal 8 - What’s cooking?

DRUPAL 8

DRUPAL 7

directory structure

Page 48: Drupal 8 - What’s cooking?

directory structuresites/default/modules/sites/default/themes/...sites/example.com/modules/sites/example.com/themes/

and even...sites/all/modules/sites/all/themes/

Page 49: Drupal 8 - What’s cooking?

configuration managementDRUPAL 7

• Configuration in database

• Deploying from dev to staging :(

• CTools exportables

• Features

Page 50: Drupal 8 - What’s cooking?

configuration managementDRUPAL 8

• Stored in YAML files, not DB

• Can be version controlled

Page 51: Drupal 8 - What’s cooking?

configuration managementDRUPAL 8

Page 52: Drupal 8 - What’s cooking?
Page 53: Drupal 8 - What’s cooking?
Page 54: Drupal 8 - What’s cooking?

blocks are entities

Page 55: Drupal 8 - What’s cooking?

blocks are entitiesmultiple instances of the same block

blocks are fildableblocks are revisionable

Page 56: Drupal 8 - What’s cooking?

multilingual

• All in one. No longer tons of modules.

• English not required

• Download interface translations through update system

• Select which fields can be translated.

Page 57: Drupal 8 - What’s cooking?

views in core• Are exportable with CMI

• Responsive HTML Tables

• Views Bulk Operations in core

• System pages are views

Page 58: Drupal 8 - What’s cooking?

web serviceslater today

Page 59: Drupal 8 - What’s cooking?

designers

Page 60: Drupal 8 - What’s cooking?

twigthe new template engine

• Symfony component

• No PHP

• Easier to read

• No SQL queries

• Templates in "templates" folder

Page 61: Drupal 8 - What’s cooking?

node.tpl.php

Page 62: Drupal 8 - What’s cooking?

node.html.twig

Page 63: Drupal 8 - What’s cooking?

IE 6, 7 and 8

modern browsers

Page 64: Drupal 8 - What’s cooking?

coders

Page 65: Drupal 8 - What’s cooking?

dramatic rewrite

• PHP 5.3 required

• Object-oriented approach

• Namespaces, autoloading, PSR-0

• Dependency injection

• Plugin system

• Doctrine annotations

• Symfony components

• YAML

• Many hooks deprecated/removed

Page 66: Drupal 8 - What’s cooking?

the new deal“Proudly Invented Elsewhere”

Page 67: Drupal 8 - What’s cooking?

oo phpDRUPAL 7

Page 68: Drupal 8 - What’s cooking?

oo phpDRUPAL 8

Page 69: Drupal 8 - What’s cooking?

namespaces, psr-0,autoloading

• Allow for autoload of classes

• Symfony class autoloader

Page 70: Drupal 8 - What’s cooking?

autoloadinginvoking...

\Drupal\Core\Image\Image

loads...

core/lib/Drupal/Core/Image/Image.php

Do you see the pattern?

Page 71: Drupal 8 - What’s cooking?

routing

• D7: Routes mixed with menu links hook_menu()

• Routes defined in YAML: module.routing.yml

• hook_menu() used to define menu links.

• Dynamic routes: extending RouteSubscriberBase

Page 72: Drupal 8 - What’s cooking?

routingDRUPAL 7

system_menu()

Page 73: Drupal 8 - What’s cooking?

routingDRUPAL 8

system.routing.yml

system_menu()

Page 74: Drupal 8 - What’s cooking?

dependency injection• Replaceable services for dependencies• Keeps code decoupled• Services passed to objects by injection when

object is created• Allows replacement of core subsystems with

configuration• Makes it easier to test with mock objects or test

multiple subsystem implementations.• Examples: database connector, configuration

manager, translation service• Services define in modulename.services.yml

Page 75: Drupal 8 - What’s cooking?

dependency injectioninstead hardcoding objects inside other object

$this->configFactory = new ConfigFactory()

we’re injecting the object in the (constructor) interface

Page 76: Drupal 8 - What’s cooking?

plugins & annotations

Page 77: Drupal 8 - What’s cooking?

plugins & annotations

Page 78: Drupal 8 - What’s cooking?

plugins

• Plugins are managed by plugin managers

• Managers are able to retrieve plugins by ID or get the definitions.

Page 79: Drupal 8 - What’s cooking?

symfony components

•HttpFoundation

•HttpKernel

•Routing

•Event Dispatcher

•Dependency Injection

•Yaml

•Twig

•Serializer

Page 80: Drupal 8 - What’s cooking?

other components

• Composer: Dependency manager

• Guzzle: HTTP Client

• Assetic: Asset manager (CSS, JS aggregation)

• PHPUnit: Testing

• Doctrine Annotation

Page 81: Drupal 8 - What’s cooking?

leaving the islandand become a modern cms / framework

Page 82: Drupal 8 - What’s cooking?

Questions?Thank you.