What’s cooking?
Claudiu Cristea
drupal consultant, trainer, developer
core contributor, image system maintainer
twitter.com/claudiu_cristea
credits:
Angie Byron (webchick)
Wayne Eaker (zengenuity)
timeline
Jan 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
core initiatives
core initiatives
•

Mobile
core initiatives
•
•

Mobile
Configuration Management
core initiatives
•
•
•

Mobile
Configuration Management
HTML5
core initiatives
•
•
•
•

Mobile
Configuration Management
HTML5
Layouts
core initiatives
•
•
•
•
•

Mobile
Configuration Management
HTML5
Layouts
Multilingual
core initiatives
•
•
•
•
•
•

Mobile
Configuration Management
HTML5
Layouts
Multilingual
Views in Core
core initiatives
•
•
•
•
•
•
•

Mobile
Configuration Management
HTML5
Layouts
Multilingual
Views in Core
Web Services
unofficial initiatives
•
•
•

Twig
Spark
Others
the state of drupal 8
the state of drupal 8

end users
the state of drupal 8

end users
site builders
the state of drupal 8

end users
site builders
designers
the state of drupal 8

end users
site builders
designers
coders
end users
mobile: responsive design
mobile: responsive design
DRUPAL 7
mobile: responsive design
DRUPAL 7

DRUPAL 8
mobile: responsive design
mobile: responsive design
DRUPAL 7
mobile: responsive design
DRUPAL 7

DRUPAL 8
mobile: responsive design
DRUPAL 8
mobile: responsive design
DRUPAL 8
mobile: responsive design
DRUPAL 8
mobile: responsive design
mobile: responsive design
DRUPAL 7
mobile: responsive design
DRUPAL 7

DRUPAL 8
wysiwyg in core
DRUPAL 8
inline editing
file field multiselect
•
•
•
•
•
•
•
•

form elements

URL
Email
Tel
Date
Color
Range
Number
Search
tour module
site builders
directory structure
DRUPAL 7
directory structure
DRUPAL 7

DRUPAL 8
directory structure
sites/default/modules/
sites/default/themes/
...
sites/example.com/modules/
sites/example.com/themes/
and even...
sites/all/modules/
sites/all/themes/
configuration management
DRUPAL 7

• Configuration in database
• Deploying from dev to staging :(
• CTools exportables
• Features
configuration management
DRUPAL 8

• Stored in YAML files, not DB
• Can be version controlled
configuration management
DRUPAL 8
blocks are entities
blocks are entities
multiple instances of the same block
blocks are fildable
blocks are revisionable
multilingual

•
•
•
•

All in one. No longer tons of modules.
English not required
Download interface translations through update system
Select which fields can be translated.
views in core
•
•
•
•

Are exportable with CMI
Responsive HTML Tables
Views Bulk Operations in core
System pages are views
web services
later today
designers
twig

the new template engine
• Symfony component
• No PHP
• Easier to read
• No SQL queries
• Templates in "templates" folder
node.tpl.php
node.html.twig
modern browsers

IE 6, 7 and 8
coders
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
the new deal
“Proudly Invented Elsewhere”
oo php
DRUPAL 7
oo php
DRUPAL 8
namespaces, psr-0,
autoloading
• Allow for autoload of classes
• Symfony class autoloader
autoloading
invoking...
DrupalCoreImageImage
loads...
core/lib/Drupal/Core/Image/Image.php
Do you see the pattern?
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
routing
DRUPAL 7

system_menu()
routing
DRUPAL 8

system.routing.yml

system_menu()
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
dependency injection
instead hardcoding objects inside other object
$this->configFactory = new ConfigFactory()
we’re injecting the object in the (constructor) interface
plugins & annotations
plugins & annotations
plugins
• Plugins are managed by plugin managers
• Managers are able to retrieve plugins by ID
or get the definitions.
symfony components
• HttpFoundation
• HttpKernel
• Routing
• Event Dispatcher
• Dependency Injection
• Yaml
• Twig
• Serializer
other components
• Composer: Dependency manager
• Guzzle: HTTP Client
• Assetic: Asset manager (CSS, JS aggregation)
• PHPUnit: Testing
• Doctrine Annotation
leaving the island
and become a modern cms / framework
Questions?
Thank you.

Drupal 8 - What’s cooking?