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.

Drupal Introduction

2,400 views

Published on

Basic overview of Drupal, given at the Northwest Ohio PHP User Group

Published in: Technology, Lifestyle
  • Be the first to comment

Drupal Introduction

  1. 1. Drupal<br />NWO-PUG CMS Shootout<br />April 26, 2011<br />NWO-PUG <br />1<br />E-mail: chris@ctankersley.com<br />Twitter: @dragonmantank<br />Identi.ca: dragonmantank<br />
  2. 2. Who Are You and Why Are You In My House?<br />Chris Tankersley<br />Doing PHP for 8 Years<br />Lots of projects no one uses, and a few that some do<br />TL;DR https://github.com/dragonmantank<br />April 26, 2011<br />NWO-PUG <br />2<br />
  3. 3. Drupal<br />Web Application Framework<br />Open-Sourced in 2001 by Dries Buytaert<br />As of April 17, had 367,865 registered sites<br />Estimated 1.5% of all websites, which is around 2.8 million<br />Powers websites from basic blogs all the way to government websites<br />Gigantic user community<br />Functional, but moving toward OOP<br />April 26, 2011<br />NWO-PUG <br />3<br />
  4. 4. Nodes/Entities<br />What Everything Is<br />April 26, 2011<br />NWO-PUG <br />4<br />
  5. 5. You Must Assimilate<br />Data is stored in Drupal as Nodes (Drupal 6) or Entities (Drupal 7)<br />Posts, Images, Users, etc, are all the same thing, just different characteristics<br />Nodes are great in theory, a pain in practice<br />Drupal 7 went one level below nodes and created Entities.<br />Same idea, better implementation<br />April 26, 2011<br />NWO-PUG <br />5<br />
  6. 6. Working With Nodes<br />All nodes have the same basic layout<br />All nodes invoke the same hooks<br />This means you have to do this:<br />April 26, 2011<br />NWO-PUG <br />6<br />
  7. 7. Hook System<br />How Everything Works<br />April 26, 2011<br />NWO-PUG <br />7<br />
  8. 8. There’s a Hook for That<br />Drupal uses a system of predefined ‘hooks’ for developers to attach to<br />Hooks allow developers to attach to almost anything that Drupal does<br />What to do something when a thing is deleted? Hook into ‘hook_delete’<br />Very powerful, but very steep learning curve<br />April 26, 2011<br />NWO-PUG <br />8<br />
  9. 9. Hooking Into A Hook<br />Find the hook you want (‘hook_delete’)<br />Add your module name in place of Hook<br />April 26, 2011<br />NWO-PUG <br />9<br />
  10. 10. Log a Node Deletion<br />April 26, 2011<br />NWO-PUG <br />10<br />
  11. 11. Modules<br />Bending Drupal To Our Will<br />April 26, 2011<br />NWO-PUG <br />11<br />
  12. 12. Hooks, Hook, Hooks<br />Modules are collections of Functions that implement Hooks<br />Contains a .info file with the module information<br />Contains a .module with all the functions<br />April 26, 2011<br />NWO-PUG <br />12<br />
  13. 13. Modules In Drupal’s Lifecycle<br />Drupal kicks up and figures out what the user wants to do<br />Drupal invokes the main hook<br />Main hook calls all registered hooks<br />Hooks all return data, and Drupal finally finishes the original hook out<br />April 26, 2011<br />NWO-PUG <br />13<br />
  14. 14. Modules = Hook Registration<br />Really, ‘modules’ just allow you an easy way to enable/disable what code runs during the lifecycle<br />April 26, 2011<br />NWO-PUG <br />14<br />
  15. 15. Themes<br />Making it look purdy<br />April 26, 2011<br />NWO-PUG <br />15<br />
  16. 16. Anatomy of a Theme<br />Basically a specialized Module<br />Folder contains PHP files, CSS, and JS<br />Instead of hooking into Hooks, you hook into Templates<br />April 26, 2011<br />NWO-PUG <br />16<br />
  17. 17. Build From Foundations<br />Drupal has many great Foundation Themes<br />Download, Install, and modify CSS/JS to get going faster<br />April 26, 2011<br />NWO-PUG <br />17<br />
  18. 18. Taking the Good with the Bad<br />There are some downsides…<br />April 26, 2011<br />NWO-PUG <br />18<br />
  19. 19. Performance<br />All registered hooks always fire<br />The more modules you have, the longer Drupal has to process<br />100 modules that hook into hook_delete fire every time hook_delete is fired, regardless of the situation<br />Drupal is coded for developers, not sysadmins<br />April 26, 2011<br />NWO-PUG <br />19<br />
  20. 20. The Admin Interface<br />Sucks<br />April 26, 2011<br />NWO-PUG <br />20<br />
  21. 21. The Admin Interface<br />Can be hard to find things<br />Community has tried to fix this with plugins<br />I still find it a pain<br />April 26, 2011<br />NWO-PUG <br />21<br />
  22. 22. Learning Curve<br />It’s there, and it’s big<br />API Documentation is there, but hard to find what you want<br />When you have 100’s of hooks, you kinda guess what you want<br />Hard to find intermediate-advanced tutorials<br />Lot of it is ‘Install this Module!’ instead of architecture<br />April 26, 2011<br />NWO-PUG <br />22<br />
  23. 23. Backward Compatibility<br />Major Revisions break Backward Compatibility<br />Makes for Slow Adoption of new releases<br />Drupal 6 -> 7 is painful because many modules just didn’t work<br />Drupal 7 -> 8 probably will be too<br />April 26, 2011<br />NWO-PUG <br />23<br />
  24. 24. Questions?<br />April 26, 2011<br />NWO-PUG <br />24<br />
  25. 25. Links<br />Where to Find Stuff I Talked About<br />April 26, 2011<br />NWO-PUG <br />25<br />
  26. 26. Links<br />Drupal Main Site: http://www.drupal.org<br />API Site: http://api.drupal.org<br />Contributions: http://drupal.org/download<br />Creating Themes: <br />http://tips.webdesign10.com/how-to-make-a-drupal-theme<br />April 26, 2011<br />NWO-PUG <br />26<br />

×