Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Solving Real-World Data Management Problems
<ul><li>Tobby Hagler </li></ul><ul><li>Senior Developer </li></ul>
What does Dungeons & Dragons have to do with Drupal?
Drupal & D&D <ul><li>Real-world data complexity issues </li></ul><ul><li>Difficult workflows to manage and codify </li></u...
D&D Character Module <ul><li>Complicated forms and character management </li></ul><ul><li>Levels, classes, races, feats, s...
D&D Character and Learning Drupal 7 <ul><li>Learning something new with a familiar subject </li></ul><ul><li>Solving a “re...
Learn a new language <ul><li>“ Hello World” </li></ul><ul><li>Manipulate user input </li></ul><ul><li>Display and manipula...
 
D&D Data Management <ul><li>PC Information </li></ul><ul><li>Race: Special abilities, bonuses and penalties, feats </li></...
Data Management Problems to Solve <ul><li>Lots of fields </li></ul><ul><li>Managing fields </li></ul><ul><li>Compound Fiel...
Nodes and Standard Fields <ul><li>Standard Fields </li></ul><ul><li>Name: string </li></ul><ul><li>Race: string </li></ul>...
Standard Fields Aren't Enough <ul><li>Regardless of the data type </li></ul><ul><li>Fields are always name:value pairs </l...
Multiple Values
Multiple Values <ul><li>Vertical </li></ul><ul><li>but not </li></ul><ul><li>Horizontal </li></ul><ul><li>data depth </li>...
D&D Fields <ul><li>Companion module to D&D Character </li></ul><ul><li>Drupal 7 Fields API </li></ul>
Abilities <ul><li>Multiple values </li></ul><ul><li>not enough </li></ul><ul><li>Names of each </li></ul><ul><li>ability s...
Compound Fields <ul><li>Each field can have different widgets </li></ul><ul><li>Custom fields for different data types </l...
Fields API in 3 Easy Steps <ul><li>Tell Drupal about the field and schema </li></ul><ul><li>hook_field_info </li></ul><ul>...
 
Field Widgets Armor widget is both horizontal and vertical
Field Formatters
Field Formaters May Not Be Enough <ul><li>Node templates can work </li></ul><ul><li>Fine for on-screen display </li></ul><...
D&D Character Sheet <ul><li>What web output works for print? </li></ul><ul><li>PDF is the universal </li></ul><ul><li>onli...
PC Record Sheets Storing data is one thing Printable character record sheets is key
Drupal and PDF Output <ul><li>Node templates generate HTML </li></ul><ul><li>Can be styled with CSS and HTML </li></ul><ul...
 
 
Node Data In PDF
Drupal as a  Campaign Manager
CMS: Campaign Management System <ul><li>Blog Pages for previous runs </li></ul><ul><li>Standard Pages for NPCs or historic...
 
Summary <ul><li>Fields API for building compound fields </li></ul><ul><li>PDF for specific records </li></ul><ul><li>Drupa...
Resources <ul><li>agileapproach.com /blog-entry/compound-fields-drupal-7 </li></ul><ul><li>drupal.org/project/dnd_characte...
Questions?
Contact <ul><li>thagler@phase2technology  </li></ul><ul><li>@phase2tech </li></ul><ul><li>d.o: tobby </li></ul><ul><li>Sli...
Upcoming SlideShare
Loading in …5
×

Drupal & Dungeons & Dragons

3,907 views

Published on

This session was an exploration of complex real-world data management issues, and ways to solve them, using D&D as a point of reference for discussion. The presentation was given by Tobby Hagler, Senior Developer at Phase2 Technology at DrupalCamp Atlanta.

  • Be the first to comment

Drupal & Dungeons & Dragons

  1. 1. Solving Real-World Data Management Problems
  2. 2. <ul><li>Tobby Hagler </li></ul><ul><li>Senior Developer </li></ul>
  3. 3. What does Dungeons & Dragons have to do with Drupal?
  4. 4. Drupal & D&D <ul><li>Real-world data complexity issues </li></ul><ul><li>Difficult workflows to manage and codify </li></ul><ul><li>Contrib modules – scratch your own itch </li></ul>
  5. 5. D&D Character Module <ul><li>Complicated forms and character management </li></ul><ul><li>Levels, classes, races, feats, skills, weapons, and equipiment – All have unique properties </li></ul><ul><li>No D7 D&D Character sheet module… </li></ul>
  6. 6. D&D Character and Learning Drupal 7 <ul><li>Learning something new with a familiar subject </li></ul><ul><li>Solving a “real” need </li></ul><ul><li>Features module and Fields API </li></ul>
  7. 7. Learn a new language <ul><li>“ Hello World” </li></ul><ul><li>Manipulate user input </li></ul><ul><li>Display and manipulate input </li></ul><ul><li>D&D character generator </li></ul>
  8. 9. D&D Data Management <ul><li>PC Information </li></ul><ul><li>Race: Special abilities, bonuses and penalties, feats </li></ul><ul><li>Class: Extra skills and feats, spells, or limitations </li></ul><ul><li>Skills: Cross-class, ranks </li></ul><ul><li>Feats: Prerequisites, bonus feats </li></ul><ul><li>Attributes: Saves, Initiative, base attack, misc. bonuses </li></ul><ul><li>Other Details </li></ul><ul><li>Spells: Components, spellcraft feats </li></ul><ul><li>Equipment: special attributes, magical abilities, masterwork </li></ul><ul><li>Animal Companions: HD, spell-like abilities, morale </li></ul><ul><li>NPCs: Abilities, backstory </li></ul><ul><li>Campaign Notes: History, geography </li></ul>
  9. 10. Data Management Problems to Solve <ul><li>Lots of fields </li></ul><ul><li>Managing fields </li></ul><ul><li>Compound Fields </li></ul><ul><li>Data Output </li></ul><ul><li>Printable Output </li></ul>
  10. 11. Nodes and Standard Fields <ul><li>Standard Fields </li></ul><ul><li>Name: string </li></ul><ul><li>Race: string </li></ul><ul><li>Class: string </li></ul><ul><li>Attributes: integer, bonuses? </li></ul><ul><li>Skills: integer, strings </li></ul><ul><li>Feats: string, checkboxes </li></ul><ul><li>Weapons: ?? </li></ul><ul><li>Bonuses and Attributes </li></ul><ul><li>Name: fine </li></ul><ul><li>Race: fine, but affects things like attribute values </li></ul><ul><li>Class: different levels for multiclass </li></ul><ul><li>Skills: class vs cross-class (half) </li></ul><ul><li>Feats: manage prerequisites </li></ul><ul><li>Weapons: damage, speed, crit range – compound fields </li></ul>
  11. 12. Standard Fields Aren't Enough <ul><li>Regardless of the data type </li></ul><ul><li>Fields are always name:value pairs </li></ul><ul><li>Fields can contain multiple values </li></ul><ul><li>But not multiple keys </li></ul>
  12. 13. Multiple Values
  13. 14. Multiple Values <ul><li>Vertical </li></ul><ul><li>but not </li></ul><ul><li>Horizontal </li></ul><ul><li>data depth </li></ul>
  14. 15. D&D Fields <ul><li>Companion module to D&D Character </li></ul><ul><li>Drupal 7 Fields API </li></ul>
  15. 16. Abilities <ul><li>Multiple values </li></ul><ul><li>not enough </li></ul><ul><li>Names of each </li></ul><ul><li>ability score </li></ul><ul><li>Multi-dimensional or compound values </li></ul>
  16. 17. Compound Fields <ul><li>Each field can have different widgets </li></ul><ul><li>Custom fields for different data types </li></ul>
  17. 18. Fields API in 3 Easy Steps <ul><li>Tell Drupal about the field and schema </li></ul><ul><li>hook_field_info </li></ul><ul><li>hook_field_schema </li></ul><ul><li>hook_field_validate </li></ul><ul><li>hook_field_is_empty </li></ul><ul><li>User Input </li></ul><ul><li>hook_field_widget_info </li></ul><ul><li>hook_field_widget_form </li></ul><ul><li>Output </li></ul><ul><li>hook_field_formatter_info </li></ul><ul><li>hook_field_formatter_view </li></ul>
  18. 20. Field Widgets Armor widget is both horizontal and vertical
  19. 21. Field Formatters
  20. 22. Field Formaters May Not Be Enough <ul><li>Node templates can work </li></ul><ul><li>Fine for on-screen display </li></ul><ul><li>Printing forms for records </li></ul><ul><li>HTML and CSS don’t make great printouts </li></ul>
  21. 23. D&D Character Sheet <ul><li>What web output works for print? </li></ul><ul><li>PDF is the universal </li></ul><ul><li>online print document </li></ul>
  22. 24. PC Record Sheets Storing data is one thing Printable character record sheets is key
  23. 25. Drupal and PDF Output <ul><li>Node templates generate HTML </li></ul><ul><li>Can be styled with CSS and HTML </li></ul><ul><li>Print module is closest </li></ul><ul><li>Doesn’t come nearly close enough </li></ul>
  24. 28. Node Data In PDF
  25. 29. Drupal as a Campaign Manager
  26. 30. CMS: Campaign Management System <ul><li>Blog Pages for previous runs </li></ul><ul><li>Standard Pages for NPCs or historical background </li></ul><ul><li>Custom content types for artifacts, animal companions, and kingdoms </li></ul>
  27. 32. Summary <ul><li>Fields API for building compound fields </li></ul><ul><li>PDF for specific records </li></ul><ul><li>Drupal as a CMS manages extra data </li></ul>
  28. 33. Resources <ul><li>agileapproach.com /blog-entry/compound-fields-drupal-7 </li></ul><ul><li>drupal.org/project/dnd_character </li></ul><ul><li>api.drupal.org /api/examples/field_example--field_example.module/function/ field_example_field_info /7 </li></ul>
  29. 34. Questions?
  30. 35. Contact <ul><li>thagler@phase2technology  </li></ul><ul><li>@phase2tech </li></ul><ul><li>d.o: tobby </li></ul><ul><li>Slides: AgileApproach.com </li></ul>

×