System settings api

356 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
356
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

System settings api

  1. 1. System Settings API <ul><li>A look at a draft API for storing System Settings </li></ul>
  2. 2. There’s CODE! <ul><li>That’s gold right? </li></ul><ul><li>project as it stands now: </li></ul><ul><ul><li>http://github.com/tizzo/system_settings </li></ul></ul><ul><ul><li>mainly an alternative backend for variable_set and variable_get </li></ul></ul>
  3. 3. The Mission <ul><li>Expand on the great work on exportables by getting the system (or something similar) </li></ul><ul><li>Make everything exportable by default </li></ul><ul><li>Provide Drupal with a robust way to identify and replicate features </li></ul>
  4. 4. Hierarchy <ul><li>Settings can be specified in </li></ul><ul><li>hooks </li></ul><ul><li>overridden in the database </li></ul><ul><li>overridden again by alter_hooks </li></ul><ul><li>finally overridden in settings.php </li></ul>
  5. 5. Features <ul><li>Everything exportable and overrideable </li></ul><ul><li>Pluggable storage backend </li></ul><ul><li>Change management </li></ul><ul><li>Rich settings metadata </li></ul>
  6. 6. Metadata <ul><li>Metadata is stored so that settings can be related to one another </li></ul><ul><li>We can identify all settings related to a content type or to a given module </li></ul><ul><li>Settings no longer build up in the database (settings no longer associated can be purged) </li></ul>
  7. 7. Metadata <ul><li>Metadata can be specified simply by defining the unique key of the each entry (either simple or compex) </li></ul>
  8. 8. Metadata Structure <ul><li>A single setting is atomic structured data and self contained </li></ul><ul><li>Contains all of its relations and its value </li></ul>
  9. 9. Metadata: An Individual Relation <ul><li>Each relation has a unique key (simple or complex) and an arbitrary set of additional data </li></ul>
  10. 10. Change Monitoring <ul><li>Each time the cache is rebuilt a version of each setting stored during the last cache build is compared to the version generated now </li></ul><ul><li>If a change is detected (whether because of code or database) callbacks can be triggered to respond to the change </li></ul>

×