Drupal 8What’s cooking?
Claudiu Cristea            Webikon.com            Drupal Romania Association            Member of Drupal Association  www ...
Credits:Angela Byron (webchick)  http://webchick.net
Agenda• Drupal 8 timeline• D8 Initiatives• What’s planned for Drupal 8 for... • End users and clients? • Site builders? • ...
Drupal 8 Timeline                                              Code freeze                                               A...
Why learn aboutDrupal 8 now?
DisclaimerDrupal 8 is actively undergoing development. Things   presented here may change in days or hours.             Or...
Drupal 8 Initiativeshttp://groups.drupal.org/drupal-initiatives
Drupal 8 Initiatives1. Configuration Management2. Web Services3. Design4. Multilingual5. HTML 56. Mobile
End-users, clients    AKA “Drupal victims” :)
Authoring experience   improvements
What problems arewe trying to solve?
What problems arewe trying to solve?
What problems arewe trying to solve?
Sparkhttp://drupal.org/project/spark
Sitecore                                      Technical strength                     8                                    ...
WYSIWYG in Core!
In-Place Editinghttp://buytaert.net/spark-update-in-line-editing-in-drupal
Content creation page++http://drupal.org/node/1510532
Mobile
Mobile                      25X growth                   over next 5 years!All sitesAll CMS sitesAll Drupal sites
What problems arewe trying to solve?       :(
Responsive themes,images, and breakpoints
Mobile friendly admin
Front-end Performance++              Source: http://www.stevesouders.com/blog/2012/02/10/the-performance-golden-rule/http:...
Site builders
New directory structure                            Drupal 7modules   nodethemes    bartik                   modules contri...
New directory structure                                         Drupal 8modules   contrib_module                          ...
MultilingualIt’s like i18n in core, but better
What’s the plan for   Drupal 8?
What’s the plan for   Drupal 8?
Multilingual first
Download translationupdates through UI(?)
Usability improvements
Translatable entities!
Translatable entities!
Blocks and Layouts It’s like Panels in core, but better
What problems are    we trying to solve?•   Inconsistency; some       Logo                                       Site Titl...
What’s the plan for       Drupal 8?               HTTP                                                              Displa...
Layoutstwo-col.yml             two-col.tpl.phptitle: Two column       <div class="layout-display layout-two-col clearfix <...
UI(?)
Responsive Layout    builder(?)
Mother [BEEP]! Viewsin mother [BEEP] core!
What problems arewe trying to solve?          Drupal 7 released                  Surpasses Drupal 6          January 2011 ...
What problems arewe trying to solve?
It’s here! :D
...and more!• >= PHP 5.3.5• Cleaner modules page(?)• Better Field UI (?)• New fields: Link, Email, Entity  Reference(?), Da...
Project Browser: installmodules direct from UI(?)   http://drupal.org/node/1841788
Designers,front-end developers
HTML5 Form Elements        $form[telephone] = array(           #type => tel,           #title => t(Phone),        );      ...
Drupal 7                                                         Drupal 8<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0...
Markup cleanup
Standard Components http://jacine.github.com/drupal/demo/
node.twig                                                   Twig<article id="node-{{ node.nid }}" class="{{ attributes.cla...
6&7
Developers
Warning:Things are about to   get... geeky.
New Class Autoloadermodules        example         example.test        modules    example   example.info<?php             ...
New Class Autoloader              (PSR-0)modules        example               lib           Drupal   example   Tests   Exa...
Web ServicesIt’s like Services module in core, only better.
What problems arewe trying to solve?
What problems arewe trying to solve?                      JSON/XML
What’s the plan for      Drupal 8?Tutorial: http://fabien.potencier.org/article/50/create-your-own-   framework-on-top-of-...
hook_menu()--                 Symfony Routes++Drupal 7:                                                          Drupal 8:...
REST module$ curl -i -H "Accept: application/ld+json" --cookie SESSxxx http://example.com/entity/node/1HTTP/1.0 200 OK<sni...
Configuration         Management                              node ID 4 node ID 4It’s like Features module in core, only be...
What problems are        we trying to solve?Dev                                           Liveadmin/config/foo         node...
What problems are      we trying to solve?Dev                                           Liveadmin/config/foo         node/4...
What problems are    we trying to solve? variable_set()/variable_get()             db_select()/db_update()/               ...
What’s the plan for              Drupal 8?Dev                                                    Live                     ...
What’s the plan for               Drupal 8?Dev                                                              Live          ...
Screensht of UI with Diff
Configuration APIWant to deploy it? Use config().$config = config(‘contact.settings’);$config->set(‘user_default_enabled’, 1...
State APIOnly useful for this environment? Use state().state()->set(update.last_check, $now);...$last_check = state()->get...
Other stuff• Getting OOPy with it!• Entity API++• More fasterer testbot!• File/Media API improvements• ...and more!
Gotta catch ‘em all!  http://drupal.org/list-changes
Thank you!  Questions?
Drupal 8. What's cooking (based on Angela Byron slides)
Drupal 8. What's cooking (based on Angela Byron slides)
Drupal 8. What's cooking (based on Angela Byron slides)
Drupal 8. What's cooking (based on Angela Byron slides)
Upcoming SlideShare
Loading in...5
×

Drupal 8. What's cooking (based on Angela Byron slides)

6,436

Published on

Drupal 8 presentation

Published in: Technology
1 Comment
3 Likes
Statistics
Notes
  • are there any native mobile app examples that are running on Drupal?
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
6,436
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
39
Comments
1
Likes
3
Embeds 0
No embeds

No notes for slide

Drupal 8. What's cooking (based on Angela Byron slides)

  1. 1. Drupal 8What’s cooking?
  2. 2. Claudiu Cristea Webikon.com Drupal Romania Association Member of Drupal Association www www.claudiucristea.ro @claudiu_cristea www.facebook.com/claudiu.cristea
  3. 3. Credits:Angela Byron (webchick) http://webchick.net
  4. 4. Agenda• Drupal 8 timeline• D8 Initiatives• What’s planned for Drupal 8 for... • End users and clients? • Site builders? • Designers and themers? • Developers?
  5. 5. Drupal 8 Timeline Code freeze April 1, 2013 Development begins Mar 10, 2011 Jan 5, 2011 Dec 1, 2012 Sep, 2013Drupal 7.0 Feature freeze Drupal 8.0
  6. 6. Why learn aboutDrupal 8 now?
  7. 7. DisclaimerDrupal 8 is actively undergoing development. Things presented here may change in days or hours. Or were already changed :)
  8. 8. Drupal 8 Initiativeshttp://groups.drupal.org/drupal-initiatives
  9. 9. Drupal 8 Initiatives1. Configuration Management2. Web Services3. Design4. Multilingual5. HTML 56. Mobile
  10. 10. End-users, clients AKA “Drupal victims” :)
  11. 11. Authoring experience improvements
  12. 12. What problems arewe trying to solve?
  13. 13. What problems arewe trying to solve?
  14. 14. What problems arewe trying to solve?
  15. 15. Sparkhttp://drupal.org/project/spark
  16. 16. Sitecore Technical strength 8 Authoring experience 7 Open Text 6 CQ5 5 4 3 2 1Drupal 0 Plone Joomla Squiz Wordpress
  17. 17. WYSIWYG in Core!
  18. 18. In-Place Editinghttp://buytaert.net/spark-update-in-line-editing-in-drupal
  19. 19. Content creation page++http://drupal.org/node/1510532
  20. 20. Mobile
  21. 21. Mobile 25X growth over next 5 years!All sitesAll CMS sitesAll Drupal sites
  22. 22. What problems arewe trying to solve? :(
  23. 23. Responsive themes,images, and breakpoints
  24. 24. Mobile friendly admin
  25. 25. Front-end Performance++ Source: http://www.stevesouders.com/blog/2012/02/10/the-performance-golden-rule/http://drupal.org/project/issues/search/drupal?issue_tags=frontend+performance
  26. 26. Site builders
  27. 27. New directory structure Drupal 7modules nodethemes bartik modules contrib_module sites all themes custom_theme
  28. 28. New directory structure Drupal 8modules contrib_module So... the exact opposite of what you’re used to. ;)themes custom_theme The drop is always moving!core modules node themes bartik
  29. 29. MultilingualIt’s like i18n in core, but better
  30. 30. What’s the plan for Drupal 8?
  31. 31. What’s the plan for Drupal 8?
  32. 32. Multilingual first
  33. 33. Download translationupdates through UI(?)
  34. 34. Usability improvements
  35. 35. Translatable entities!
  36. 36. Translatable entities!
  37. 37. Blocks and Layouts It’s like Panels in core, but better
  38. 38. What problems are we trying to solve?• Inconsistency; some Logo Site Title PageTitle Primary Links Secondary Links stuff on page is blocks, others special theme Block Block variables, and then Block Block “content” area. Block• Content Area Only one layout. Block region Block region• Layout built “inside out”; blocks lack context of overall page Block region• Blocks can’t be re-used Block region in multiple instances
  39. 39. What’s the plan for Drupal 8? HTTP Display Request Pass to Kernel Select Req. controller• s me n t Layout built “outside Argu in”; necessary context provided to blocks Menu block Content block• Everything on page is a Field Advert block block (or a layout, or a block nested layout) Field block View Field block block Whos online• block Blocks rendered View block Custom block Custom independently, block Advert supporting ESI caching block Custom Custom text block block
  40. 40. Layoutstwo-col.yml two-col.tpl.phptitle: Two column <div class="layout-display layout-two-col clearfix <?phpcategory: Columns: 2 print $attributes[class]; ?>"<?php printtemplate: two-col $attributes; ?>>stylesheets: <div class="layout-region layout-col-first"> - two-col.css <?php print $content[first]; ?>regions: </div> first: label: Left side <div class="layout-region layout-col-second"> type: content <?php print $content[second]; ?> second: </div> label: Right side </div> type: aside two-col.css @media only screen and (min-width: 59em) { .layout-two-col .layout-region { float: left; /* LTR */ width: 50%; } }
  41. 41. UI(?)
  42. 42. Responsive Layout builder(?)
  43. 43. Mother [BEEP]! Viewsin mother [BEEP] core!
  44. 44. What problems arewe trying to solve? Drupal 7 released Surpasses Drupal 6 January 2011 February 2012 13 months! ... July 2011 People start using it
  45. 45. What problems arewe trying to solve?
  46. 46. It’s here! :D
  47. 47. ...and more!• >= PHP 5.3.5• Cleaner modules page(?)• Better Field UI (?)• New fields: Link, Email, Entity Reference(?), Date(?)• Profile (back) in core(?)
  48. 48. Project Browser: installmodules direct from UI(?) http://drupal.org/node/1841788
  49. 49. Designers,front-end developers
  50. 50. HTML5 Form Elements $form[telephone] = array( #type => tel, #title => t(Phone), ); $form[website] = array( #type => url, #title => t(Website), ); $form[email] = array( #type => email, #title => t(Email), ); $form[tickets] = array( #type => number, #title => t(Tickets required), );
  51. 51. Drupal 7 Drupal 8<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0// <!DOCTYPE html>EN" <html<?php print $html_attributes; ?>> "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"> <head><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<? <?php print $head; ?>php print $language->language; ?>" version="XHTML+RDFa <?php if ($default_mobile_metatags): ?>1.0" dir="<?php print $language->dir; ?>"<?php print <meta name="MobileOptimized" content="width" />$rdf_namespaces; ?>> <meta name="HandheldFriendly" content="true" /> <meta name="viewport" content="width=device-width" /><head profile="<?php print $grddl_profile; ?>"> <meta http-equiv="cleartype" content="on" /> <?php print $head; ?> <?php endif; ?> <title><?php print $head_title; ?></title> <title><?php print $head_title; ?></title> <?php print $styles; ?> <?php print $styles; ?> <?php print $scripts; ?> <?php print $scripts; ?></head> </head><body class="<?php print $classes; ?>" <?php print <body class="<?php print $classes; ?>" <?php print$attributes;?>> $body_attributes;?>> <div id="skip-link"> <div id="skip-link"> <a href="#main-content" class="element-invisible element- <a href="#main-content" class="element-invisible element-focusable"><?php print t(Skip to main content); ?></a> focusable"><?php print t(Skip to main content); ?></a> </div> </div> <?php print $page_top; ?> <?php print $page_top; ?> <?php print $page; ?> <?php print $page; ?> <?php print $page_bottom; ?> <?php print $page_bottom; ?></body> </body></html> </html>
  52. 52. Markup cleanup
  53. 53. Standard Components http://jacine.github.com/drupal/demo/
  54. 54. node.twig Twig<article id="node-{{ node.nid }}" class="{{ attributes.class }} clearfix"{{ attributes }}> {{ title_prefix }} {% if not page %} <h2{{ title_attributes }}> <a href="{{ node_url }}" rel="bookmark">{{ label }}</a> {{ foo.bar }} </h2> {% endif %} {{ title_suffix }} (print this) {% if display_submitted %} <footer> {{ user_picture }} {% foo(bar) %} <p class="submitted">{{ submitted }}</p> </footer> {% endif %} (do this logic) <div class="content"{{ content_attributes }}> {# We hide the comments and links now so that we can render them later. #} {% hide(content.comments) %} {% hide(content.links) %} {{ content }} {# foo bar #} </div> {{ content.links }} (comment this) {{ content.comments }} http://symfony.com/doc/current/book/templating.html</article>
  55. 55. 6&7
  56. 56. Developers
  57. 57. Warning:Things are about to get... geeky.
  58. 58. New Class Autoloadermodules example example.test modules example example.info<?php name = Example description = An example./** * @file core = 7.x * Tests for example.module. files[] = example.test *//** * Test the example_bar() function. */class ExampleFooTest extends DrupalWebTestCase { “Drupalism” public static function getInfo() { ... }}/** * Test the example_bar() function. */class ExampleBarTest extends DrupalWebTestCase { public static function getInfo() { } ... Drupal 7
  59. 59. New Class Autoloader (PSR-0)modules example lib Drupal example Tests ExampleFooTest.php<?php/** ExampleBarTest.php * @file * Definition of DrupalexampleTestsExampleFooTest. */namespace DrupalexampleTests;use DrupalCoreDatabaseDatabase;/** “Proudly found elsewhere” * Test the example_foo() function. */class ExampleFooTest extends DrupalWebTestCase { public static function getInfo() { ... }} Drupal 8
  60. 60. Web ServicesIt’s like Services module in core, only better.
  61. 61. What problems arewe trying to solve?
  62. 62. What problems arewe trying to solve? JSON/XML
  63. 63. What’s the plan for Drupal 8?Tutorial: http://fabien.potencier.org/article/50/create-your-own- framework-on-top-of-the-symfony2-components-part-1
  64. 64. hook_menu()-- Symfony Routes++Drupal 7: Drupal 8:modules/book/book.module modules/book/book.routing.yml<?php book__export:function book_menu() {   pattern: /book/export/{type}/{nid}   $items[book/export/%/%] = array(   defaults:    page callback => book_export,     _controller: DrupalbookBookController::export    page arguments => array(2, 3),   requirements:    access arguments => array(access printer-friendly version),     _permission: access printer-friendly version    type => MENU_CALLBACK,    file => book.pages.inc, book__node_outline:  );   pattern: /node/{node}/outline    $items[node/%node/outline] = array(   defaults:    title => Outline,     _controller: DrupalbookBookController::outline    page callback => book_outline,   requirements:    page arguments => array(1),     _access: book_outline_access    access callback => _book_outline_access,    access arguments => array(1),    type => MENU_LOCAL_TASK, ?    weight => 2,    file => book.pages.inc,  );...  return $items;}?>
  65. 65. REST module$ curl -i -H "Accept: application/ld+json" --cookie SESSxxx http://example.com/entity/node/1HTTP/1.0 200 OK<snip>Content-Type: application/ld+json{"nid":"1","vid":"1","isDefaultRevision":"1","uuid":"bc37d058-8c45-484c-8e00-eae8da8f4d67","type":"article","langcode":"en","title":"Hello","uid":"1","status":"1","created":"1353018305","changed":"1353018458","comment":"2","promote":"1","sticky":"0","tnid":"0","translate":"0","revision_timestamp":"1353018305","revision_uid":"1","u0000*u0000entityType":"node","u0000*u0000enforceIsNew":null,"u0000*u0000newRevision":false,"log":"","body":{"en":[{"value":"This is in English. I live inVancouver, BC.","summary":"","format":"filtered_html","safe_value":"<p>This is in English.I live in Vancouver, BC.</p>n","safe_summary":""}],"fr":[{"value":"Cette est en franu00e7ais. Jhabite u00e1 Montru00e9al,PQ.","summary":"","format":"filtered_html","safe_value":"<p>Cette est en franu00e7ais.Jhabite u00e1 Montru00e9al, PQ.</p>n","safe_summary":""}]},"field_tags":{"en":[{"tid":"2"},{"tid":"1"}],"fr":[{"tid":"3"},{"tid":"4"}]},"field_image":{"und":[{"fid":"2","alt":"","title":"","width":"500","height":"400"}]},"rdf_mapping":{"field_image":{"predicates":["og:image","rdfs:seeAlso"],"type":"rel"},"field_tags":{"predicates":["dc:subject"],"type":"rel"},"rdftype":["sioc:Item","foaf:Document"],"title":{"predicates":["dc:title"]},"created":{"predicates":["dc:date","dc:created"],"datatype":"xsd:dateTime","callback":"date_iso8601"},"changed": The REST module provides a framework for exposing{"predicates":["dc:modified"],"datatype":"xsd:dateTime","callback":"date_iso8601"},"body": Drupals data structures as RESTful web services.{"predicates":["content:encoded"]},"uid":{"predicates":
  66. 66. Configuration Management node ID 4 node ID 4It’s like Features module in core, only better.
  67. 67. What problems are we trying to solve?Dev Liveadmin/config/foo node/4 admin/config/foo node/4 TEST WelcomeSetting 1 text test test test test Setting 1 old text This is real test test test test content on theSetting 2 label test test test test Setting 2 label live site that end test test users are viewing Save Save Database Database
  68. 68. What problems are we trying to solve?Dev Liveadmin/config/foo node/4 admin/config/foo node/4 TEST WelcomeSetting 1 text test test test test Setting 1 old text This is real test test test test content on theSetting 2 label test test test test Setting 2 label live site that end test test users are viewing Save Save Database Database Danger! Want to bring over configuration changes from dev, but not overwrite live content!
  69. 69. What problems are we trying to solve? variable_set()/variable_get() db_select()/db_update()/ db_delete() hook_update_N() $conf[...]; drush fu ctools_export_object()/ctools_export_load_object()
  70. 70. What’s the plan for Drupal 8?Dev Live node/4 node/4 node/4 node/4admin/config/foo admin/config/foo TEST ALERT! Welcome ALERT!Setting 1 text test test test test Important Setting 1 old text This is real Important test test test test announcement content on the announcementSetting 2 label test test test test Setting 2 label live site that end about something. about something. test test users are viewing Save Save Cache Active store Cache Active store (e.g. (e.g. Database) Database) StagingFile Active File StagingFile Active File File Store storage Store File Store storage Storehttp://heyrocker.com/how-use-drupal-8-configuration-system
  71. 71. What’s the plan for Drupal 8?Dev Live node/4 node/4 node/4 node/4admin/config/foo $node->uuid = 0a8f293...; admin/config/foo $node->uuid = 98a7bd...; TEST ALERT! Welcome ALERT!Setting 1 text test test test test Important Setting 1 old text This is real Important test test test test announcement content on the announcementSetting 2 label test test test test Setting 2 label live site that end about something. about something. test test users are viewing Save Save1 Cache Active store Cache Active store (e.g. (e.g. Database) Database) 2 5 3 File Staging File Active Active File StagingFile Active File File Store Store storage Store File Store storage Store 4http://heyrocker.com/how-use-drupal-8-configuration-system
  72. 72. Screensht of UI with Diff
  73. 73. Configuration APIWant to deploy it? Use config().$config = config(‘contact.settings’);$config->set(‘user_default_enabled’, 1);$config->save();files/config_XXX/active/contact.settings.ymldefault_category: feedbackflood: limit: 5 interval: 3600user_default_enabled: 1
  74. 74. State APIOnly useful for this environment? Use state().state()->set(update.last_check, $now);...$last_check = state()->get(update.last_check) ?: 0;MySQL [8x]> SELECT * FROM key_value WHERE collection = state ANDname = update.last_check;+------------+-------------------+---------------+| collection | name | value |+------------+-------------------+---------------+| state | update.last_check | i:1353017727; |+------------+-------------------+---------------+1 row in set (0.00 sec)
  75. 75. Other stuff• Getting OOPy with it!• Entity API++• More fasterer testbot!• File/Media API improvements• ...and more!
  76. 76. Gotta catch ‘em all! http://drupal.org/list-changes
  77. 77. Thank you! Questions?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×