Drupal as aProgrammer-Friendly        CMS     Suzanne Kennedy        Co-founder        @evolvingweb
About Me   • Drupal consulting,     development, and     training   • Help organizations     build awesome     Drupal site...
What Can You Build  with Drupal?
Build an Engagement Platform
Publish Lots of Content
Multilingual Content
Flexible Content Architecture
Flexible Theme Layer
Fancy Search UI
Intranets
Web Applications
Drupal as a CMS
NodesNodes are basic content building blocks
Content TypesNodes can have different fields + settings   Event               Blog Post   •   Date           • Author + Dat...
Node Settings
Fields
Revisions
Taxonomy
TaxonomyVocabularyTermsChild Terms
Taxonomy + Fields
Menus
Roles
Permissions
Blocks
Themes
Modules
Specific Modules
API-Style ModulesVoting API   Rules
API-Style Modules      Flag API
Custom Modules
Custom > Contrib
Administrative UI
MultilingualContent Translation   UI Translation
Multilingual
Drupal as aFramework
ContentArchitecture
Entity TypeBundlesEntities
Entity TypesEntity types are classes that define contentContent          Users           Taxonomy      CommentsContent titl...
Custom Entity Types You can define custom entity types
Entity API
CRUD for Entities    Editing a       Editing a NodeDepartment Entity
Custom Fields
Custom Form Widgets
Custom Formatters
Views
Lists of Content
Defining Lists
Contextual Filters
External Data   Sources
Custom Table            QueryCustom Activity Table   Activity Stream View
Features
Configuration = Messy         Text        Illustration: drupal.org/node/580026
Bundles of Config             Features             Contrib             Core
Features
Components
Exportables• Content Types   • WYSIWYG Profiles• Fields          • Configuration• Menus           • Rules• Taxonomy        •...
Configuration > CodeViews Configuration                     Views in Code
Benefits of Features• Stability of the site• Version control• Better development workflow• Distribute to other sites
Distributions                      OpenPublish                Commons   Conference (COD)
How Does Drupal    Work?
Serving a Request
Drupal Bootstrap         The steps that         Drupal         bootstrap         carries out         when a page         r...
Drupal Menu SystemHow does Drupal know what to render?
Drupal Hook System
How hooks are        implementedAny module can implement a hook as follows: function <module_name>_<hook_name>(args) {   /...
Example: hook_init()/**  * Implementation of hook_init()  *  * Do stuff on the front page  */function my_module_init() {  ...
Alter Hooks• Modify data generated in other  modules before it gets rendered• Examples:    •   hook_form_alter()    •   ho...
Form API - benefits• No more HTML generation!• Data validation• Security checks, caching• Code reuse (custom elements, form...
Without it...
Defining form        structure• Structured arrays  define all settings  and attributes• All standard  HTML input  elements  ...
Defining form         structure• Array keys  starting with #  are specific  form api  attributes• All others are  child form...
Required Select Box
Multiselect with default
Submission• Simple #type =>  submit element• Submit buttons can  have their own  submit function,  allowing different  but...
Drupal Theme System1. Load the Theme   2. Preprocess the HTML   3. Display Templates
Things Developers       Like
Drush
Coding Standardshttp://drupal.org/coding-standards
Devel
Services Module     Hello!              Hello!iPad, iPhone Apps    Desktop Applications       Hello!  Android Apps        ...
Other Things   Developers Like• Database Abstraction• Caching• Unit Testing (Simple Test)• Renderable Arrays• Multisite
Drupal.org for Developers
Projects on Drupal.org
Drupal.org Issue Queue
Git Integration
Security Team
Documentation
More Reasons to  Use Drupal
Drupal is in Demand!
Drupal is Open Source!
Drupal Community
We’re Hiring          Developers          Sysadmins          Project Managersevolvingweb.ca/careers
Drupal Training          Drupal for Developers          March 30th          Drupal Layout &          Theming          May ...
Thank You! Suzanne Kennedy   @evolvingweb
Drupal as a Programmer-Friendly CMS at ConFoo
Drupal as a Programmer-Friendly CMS at ConFoo
Drupal as a Programmer-Friendly CMS at ConFoo
Drupal as a Programmer-Friendly CMS at ConFoo
Upcoming SlideShare
Loading in …5
×

Drupal as a Programmer-Friendly CMS at ConFoo

2,426 views

Published on

Drupal is a content management system and a web development platform. With a small set of core modules and a large ecosystem of community contributed modules, it can be used fro a variety of use cases including corporate intranets, social web applications, online publishing, and education or government websites. In this talk, we’ll cover the benefits of using Drupal for developers, and how to use and extend Drupal as a web development framework.

Besides being open source and having an active development-driven community, Drupal has many architectural advantages. We’ll discuss these benefits including the hook system, separation of theme and module layers, the emphasis on flexible content architecture, the database integration layer, and Drupal’s coding standards. We’ll also introduce some tools to get you started on the right track, improve the performance of your Drupal projects, and avoid mistakes.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,426
On SlideShare
0
From Embeds
0
Number of Embeds
223
Actions
Shares
0
Downloads
48
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Drupal as a Programmer-Friendly CMS at ConFoo

  1. 1. Drupal as aProgrammer-Friendly CMS Suzanne Kennedy Co-founder  @evolvingweb
  2. 2. About Me • Drupal consulting, development, and training • Help organizations build awesome Drupal sites + apps • Specialize in multilingual Drupal and Apache Solr
  3. 3. What Can You Build with Drupal?
  4. 4. Build an Engagement Platform
  5. 5. Publish Lots of Content
  6. 6. Multilingual Content
  7. 7. Flexible Content Architecture
  8. 8. Flexible Theme Layer
  9. 9. Fancy Search UI
  10. 10. Intranets
  11. 11. Web Applications
  12. 12. Drupal as a CMS
  13. 13. NodesNodes are basic content building blocks
  14. 14. Content TypesNodes can have different fields + settings Event Blog Post • Date • Author + Date • Location Published • Description • Body Text • Signup List • Comments
  15. 15. Node Settings
  16. 16. Fields
  17. 17. Revisions
  18. 18. Taxonomy
  19. 19. TaxonomyVocabularyTermsChild Terms
  20. 20. Taxonomy + Fields
  21. 21. Menus
  22. 22. Roles
  23. 23. Permissions
  24. 24. Blocks
  25. 25. Themes
  26. 26. Modules
  27. 27. Specific Modules
  28. 28. API-Style ModulesVoting API Rules
  29. 29. API-Style Modules Flag API
  30. 30. Custom Modules
  31. 31. Custom > Contrib
  32. 32. Administrative UI
  33. 33. MultilingualContent Translation UI Translation
  34. 34. Multilingual
  35. 35. Drupal as aFramework
  36. 36. ContentArchitecture
  37. 37. Entity TypeBundlesEntities
  38. 38. Entity TypesEntity types are classes that define contentContent Users Taxonomy CommentsContent title D. Schrute adventure Wow, cant Germany city breakwait to get dwight city break 8 Sept started. J. Halpert Spain sailing joe Me too! shopping 8 Sept
  39. 39. Custom Entity Types You can define custom entity types
  40. 40. Entity API
  41. 41. CRUD for Entities Editing a Editing a NodeDepartment Entity
  42. 42. Custom Fields
  43. 43. Custom Form Widgets
  44. 44. Custom Formatters
  45. 45. Views
  46. 46. Lists of Content
  47. 47. Defining Lists
  48. 48. Contextual Filters
  49. 49. External Data Sources
  50. 50. Custom Table QueryCustom Activity Table Activity Stream View
  51. 51. Features
  52. 52. Configuration = Messy Text Illustration: drupal.org/node/580026
  53. 53. Bundles of Config Features Contrib Core
  54. 54. Features
  55. 55. Components
  56. 56. Exportables• Content Types • WYSIWYG Profiles• Fields • Configuration• Menus • Rules• Taxonomy • Flags Logic• Views • Roles• Image Styles • Permissions
  57. 57. Configuration > CodeViews Configuration Views in Code
  58. 58. Benefits of Features• Stability of the site• Version control• Better development workflow• Distribute to other sites
  59. 59. Distributions OpenPublish Commons Conference (COD)
  60. 60. How Does Drupal Work?
  61. 61. Serving a Request
  62. 62. Drupal Bootstrap The steps that Drupal bootstrap carries out when a page request is called.
  63. 63. Drupal Menu SystemHow does Drupal know what to render?
  64. 64. Drupal Hook System
  65. 65. How hooks are implementedAny module can implement a hook as follows: function <module_name>_<hook_name>(args) { //possibly alter an argument //possibly return something }
  66. 66. Example: hook_init()/** * Implementation of hook_init() * * Do stuff on the front page */function my_module_init() { if (drupal_is_front_page()) { drupal_set_message(Front page message!); }}
  67. 67. Alter Hooks• Modify data generated in other modules before it gets rendered• Examples: • hook_form_alter() • hook_mail_alter() • hook_menu_alter() • hook_menu_link_alter()
  68. 68. Form API - benefits• No more HTML generation!• Data validation• Security checks, caching• Code reuse (custom elements, form altering)• AJAX
  69. 69. Without it...
  70. 70. Defining form structure• Structured arrays define all settings and attributes• All standard HTML input elements available
  71. 71. Defining form structure• Array keys starting with # are specific form api attributes• All others are child form elements
  72. 72. Required Select Box
  73. 73. Multiselect with default
  74. 74. Submission• Simple #type => submit element• Submit buttons can have their own submit function, allowing different buttons to do different things in a simple way.
  75. 75. Drupal Theme System1. Load the Theme 2. Preprocess the HTML 3. Display Templates
  76. 76. Things Developers Like
  77. 77. Drush
  78. 78. Coding Standardshttp://drupal.org/coding-standards
  79. 79. Devel
  80. 80. Services Module Hello! Hello!iPad, iPhone Apps Desktop Applications Hello! Android Apps Other Drupal Sites
  81. 81. Other Things Developers Like• Database Abstraction• Caching• Unit Testing (Simple Test)• Renderable Arrays• Multisite
  82. 82. Drupal.org for Developers
  83. 83. Projects on Drupal.org
  84. 84. Drupal.org Issue Queue
  85. 85. Git Integration
  86. 86. Security Team
  87. 87. Documentation
  88. 88. More Reasons to Use Drupal
  89. 89. Drupal is in Demand!
  90. 90. Drupal is Open Source!
  91. 91. Drupal Community
  92. 92. We’re Hiring Developers Sysadmins Project Managersevolvingweb.ca/careers
  93. 93. Drupal Training Drupal for Developers March 30th Drupal Layout & Theming May 24-25thevolvingweb.ca/training
  94. 94. Thank You! Suzanne Kennedy @evolvingweb

×