Successfully reported this slideshow.

Drupal 8 - What’s cooking?

412 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Drupal 8 - What’s cooking?

  1. 1. What’s cooking?
  2. 2. Claudiu Cristea drupal consultant, trainer, developer core contributor, image system maintainer twitter.com/claudiu_cristea
  3. 3. credits: Angie Byron (webchick) Wayne Eaker (zengenuity)
  4. 4. 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
  5. 5. core initiatives
  6. 6. core initiatives • Mobile
  7. 7. core initiatives • • Mobile Configuration Management
  8. 8. core initiatives • • • Mobile Configuration Management HTML5
  9. 9. core initiatives • • • • Mobile Configuration Management HTML5 Layouts
  10. 10. core initiatives • • • • • Mobile Configuration Management HTML5 Layouts Multilingual
  11. 11. core initiatives • • • • • • Mobile Configuration Management HTML5 Layouts Multilingual Views in Core
  12. 12. core initiatives • • • • • • • Mobile Configuration Management HTML5 Layouts Multilingual Views in Core Web Services
  13. 13. unofficial initiatives • • • Twig Spark Others
  14. 14. the state of drupal 8
  15. 15. the state of drupal 8 end users
  16. 16. the state of drupal 8 end users site builders
  17. 17. the state of drupal 8 end users site builders designers
  18. 18. the state of drupal 8 end users site builders designers coders
  19. 19. end users
  20. 20. mobile: responsive design
  21. 21. mobile: responsive design DRUPAL 7
  22. 22. mobile: responsive design DRUPAL 7 DRUPAL 8
  23. 23. mobile: responsive design
  24. 24. mobile: responsive design DRUPAL 7
  25. 25. mobile: responsive design DRUPAL 7 DRUPAL 8
  26. 26. mobile: responsive design DRUPAL 8
  27. 27. mobile: responsive design DRUPAL 8
  28. 28. mobile: responsive design DRUPAL 8
  29. 29. mobile: responsive design
  30. 30. mobile: responsive design DRUPAL 7
  31. 31. mobile: responsive design DRUPAL 7 DRUPAL 8
  32. 32. wysiwyg in core DRUPAL 8
  33. 33. inline editing
  34. 34. file field multiselect
  35. 35. • • • • • • • • form elements URL Email Tel Date Color Range Number Search
  36. 36. tour module
  37. 37. site builders
  38. 38. directory structure DRUPAL 7
  39. 39. directory structure DRUPAL 7 DRUPAL 8
  40. 40. directory structure sites/default/modules/ sites/default/themes/ ... sites/example.com/modules/ sites/example.com/themes/ and even... sites/all/modules/ sites/all/themes/
  41. 41. configuration management DRUPAL 7 • Configuration in database • Deploying from dev to staging :( • CTools exportables • Features
  42. 42. configuration management DRUPAL 8 • Stored in YAML files, not DB • Can be version controlled
  43. 43. configuration management DRUPAL 8
  44. 44. blocks are entities
  45. 45. blocks are entities multiple instances of the same block blocks are fildable blocks are revisionable
  46. 46. multilingual • • • • All in one. No longer tons of modules. English not required Download interface translations through update system Select which fields can be translated.
  47. 47. views in core • • • • Are exportable with CMI Responsive HTML Tables Views Bulk Operations in core System pages are views
  48. 48. web services later today
  49. 49. designers
  50. 50. twig the new template engine • Symfony component • No PHP • Easier to read • No SQL queries • Templates in "templates" folder
  51. 51. node.tpl.php
  52. 52. node.html.twig
  53. 53. modern browsers IE 6, 7 and 8
  54. 54. coders
  55. 55. 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
  56. 56. the new deal “Proudly Invented Elsewhere”
  57. 57. oo php DRUPAL 7
  58. 58. oo php DRUPAL 8
  59. 59. namespaces, psr-0, autoloading • Allow for autoload of classes • Symfony class autoloader
  60. 60. autoloading invoking... DrupalCoreImageImage loads... core/lib/Drupal/Core/Image/Image.php Do you see the pattern?
  61. 61. 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
  62. 62. routing DRUPAL 7 system_menu()
  63. 63. routing DRUPAL 8 system.routing.yml system_menu()
  64. 64. 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
  65. 65. dependency injection instead hardcoding objects inside other object $this->configFactory = new ConfigFactory() we’re injecting the object in the (constructor) interface
  66. 66. plugins & annotations
  67. 67. plugins & annotations
  68. 68. plugins • Plugins are managed by plugin managers • Managers are able to retrieve plugins by ID or get the definitions.
  69. 69. symfony components • HttpFoundation • HttpKernel • Routing • Event Dispatcher • Dependency Injection • Yaml • Twig • Serializer
  70. 70. other components • Composer: Dependency manager • Guzzle: HTTP Client • Assetic: Asset manager (CSS, JS aggregation) • PHPUnit: Testing • Doctrine Annotation
  71. 71. leaving the island and become a modern cms / framework
  72. 72. Questions? Thank you.

×