Drupal 8 - What’s cooking?
-
Upload
alkuvoima -
Category
Technology
-
view
182 -
download
1
Transcript of Drupal 8 - What’s cooking?
What’s cooking?
Claudiu Cristea
twitter.com/claudiu_cristea
drupal consultant, trainer, developercore contributor, image system maintainer
Angie Byron (webchick)Wayne Eaker (zengenuity)
credits:
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
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
• Twig
• Spark
• Others
unofficial initiatives
the state of drupal 8
the state of drupal 8
end users
the state of drupal 8
end userssite builders
the state of drupal 8
end userssite builders
designers
the state of drupal 8
end userssite builders
designerscoders
end users
mobile: responsive design
mobile: responsive designDRUPAL 7
mobile: responsive designDRUPAL 7 DRUPAL 8
mobile: responsive design
mobile: responsive designDRUPAL 7
mobile: responsive designDRUPAL 7 DRUPAL 8
mobile: responsive designDRUPAL 8
mobile: responsive designDRUPAL 8
mobile: responsive designDRUPAL 8
mobile: responsive design
mobile: responsive designDRUPAL 7
mobile: responsive designDRUPAL 7 DRUPAL 8
wysiwyg in coreDRUPAL 8
inline editing
file field multiselect
form elements
• URL
• Tel
• Date
• Color
• Range
• Number
• Search
tour module
site builders
DRUPAL 7
directory structure
DRUPAL 8
DRUPAL 7
directory structure
directory structuresites/default/modules/sites/default/themes/...sites/example.com/modules/sites/example.com/themes/
and even...sites/all/modules/sites/all/themes/
configuration managementDRUPAL 7
• Configuration in database
• Deploying from dev to staging :(
• CTools exportables
• Features
configuration managementDRUPAL 8
• Stored in YAML files, not DB
• Can be version controlled
configuration managementDRUPAL 8
blocks are entities
blocks are entitiesmultiple instances of the same block
blocks are fildableblocks 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 serviceslater today
designers
twigthe new template engine
• Symfony component
• No PHP
• Easier to read
• No SQL queries
• Templates in "templates" folder
node.tpl.php
node.html.twig
IE 6, 7 and 8
modern browsers
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 phpDRUPAL 7
oo phpDRUPAL 8
namespaces, psr-0,autoloading
• Allow for autoload of classes
• Symfony class autoloader
autoloadinginvoking...
\Drupal\Core\Image\Image
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
routingDRUPAL 7
system_menu()
routingDRUPAL 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 injectioninstead 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 islandand become a modern cms / framework
Questions?Thank you.