Death of variables revisited

  • 162 views
Uploaded on

Current state of Configuration System (CMI) in Drupal 8. What it is for and how does it work?

Current state of Configuration System (CMI) in Drupal 8. What it is for and how does it work?

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
162
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. CMI: Death of Variables revisitedRoni KantisThursday, May 16, 13
  • 2. Roni Kantisdrupal.org: bfr@roni_kantisDruid Oy@druidfiDrupal Meetup Finland14.6.2013Program:Sauna, terva and kossu.Generously sponsored by the association andKW Digital.druid.fi/meetupThursday, May 16, 13
  • 3. Current state of configuration• 95% of Drupal development is done through UI• Scattered throughout the database• Variable table• Custom tables and entities• No standard format• No APIThursday, May 16, 13
  • 4. Thursday, May 16, 13
  • 5. Features -module" Features is not a reliable way to deploy configurationchanges.It was never meant to be. "- Tim PlunkettThursday, May 16, 13
  • 6. Problems with variables• No standardized way to move between environments• Cumbersome to manage environment specific configuration• Loaded on every requestThursday, May 16, 13
  • 7. So we killed it!- No more variable_trololoo()- No more Features?Thursday, May 16, 13
  • 8. Enter Configuration Management Initiative (CMI)•Configuration system•ConfigEntity•States APIThursday, May 16, 13
  • 9. Configuration system• Automatically exportable• Lazy loadable• UUID in core• Standardized APIThursday, May 16, 13
  • 10. Content vs configuration• Can you give it a default value?• Would it benefit significally from direct sql-queries?• Is it environment specific?Thursday, May 16, 13
  • 11. How does it work?• Object oriented approach:• BEFORE: variable_set(‘my variable’, $data);• NOW: $config->set(‘my variable’, $data)->save();Thursday, May 16, 13
  • 12. How does it work?• Configuration locations:• sites/default/files/config_{hash}/active• sites/default/files/config_{hash}/staging• Configuration files:• manifest.image.styles.yml• image.settings.yml• image.style.medium.ymlThursday, May 16, 13
  • 13. Image.style.medium.ymlThursday, May 16, 13
  • 14. Configuration sync UIThursday, May 16, 13
  • 15. Configuration sync UIThursday, May 16, 13
  • 16. Questions?Thursday, May 16, 13