Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development
Drupal Development

Editor's Notes

  • #5 Core - bootstrap, route incoming page requests to modules Modules - Build page content and respond to events Many third-party modules, some build on top of other modules Theme - Turn data from modules into HTML. We’ll be concentrating on the module side of things today.
  • #6 Core - bootstrap, route incoming page requests to modules Modules - Build page content and respond to events Many third-party modules, some build on top of other modules Theme - Turn data from modules into HTML. We’ll be concentrating on the module side of things today.
  • #7 Core - bootstrap, route incoming page requests to modules Modules - Build page content and respond to events Many third-party modules, some build on top of other modules Theme - Turn data from modules into HTML. We’ll be concentrating on the module side of things today.
  • #8 Core - bootstrap, route incoming page requests to modules Modules - Build page content and respond to events Many third-party modules, some build on top of other modules Theme - Turn data from modules into HTML. We’ll be concentrating on the module side of things today.
  • #9 Core - bootstrap, route incoming page requests to modules Modules - Build page content and respond to events Many third-party modules, some build on top of other modules Theme - Turn data from modules into HTML. We’ll be concentrating on the module side of things today.
  • #10 Core - bootstrap, route incoming page requests to modules Modules - Build page content and respond to events Many third-party modules, some build on top of other modules Theme - Turn data from modules into HTML. We’ll be concentrating on the module side of things today.
  • #11 Core - bootstrap, route incoming page requests to modules Modules - Build page content and respond to events Many third-party modules, some build on top of other modules Theme - Turn data from modules into HTML. We’ll be concentrating on the module side of things today.
  • #12 Core - bootstrap, route incoming page requests to modules Modules - Build page content and respond to events Many third-party modules, some build on top of other modules Theme - Turn data from modules into HTML. We’ll be concentrating on the module side of things today.
  • #13 Core - bootstrap, route incoming page requests to modules Modules - Build page content and respond to events Many third-party modules, some build on top of other modules Theme - Turn data from modules into HTML. We’ll be concentrating on the module side of things today.
  • #14 This is a module. Two files, A few lines of code. In Drupal, that’s all you need to customize the behavior of the system and add new functionality.
  • #15 A little more complicated. Shorter function, has an .install file.
  • #16 This is a module, too. Views, one of Drupal’s most popular, contains over 400 files, over a meg of code and inline docs. Don’t worry, there’s a middle ground. We’re going to cover what they have in common.
  • #17 This is a module, too. Views, one of Drupal’s most popular, contains over 400 files, over a meg of code and inline docs. Don’t worry, there’s a middle ground. We’re going to cover what they have in common.
  • #19 Part 1: user with a web browser makes a request. sends a URL, optionally a cookie. http://www.mysite.com/articles/welcome.html
  • #20 Apache intercepts the request. Possibly routes it to other servers What folder should I look in for foo.com? Normally, it would then check /articles for a welcome.html file and send it back. .htaccess turns foo.com/blah into foo.com/index.php?q=blah ...And PHP takes over.
  • #21 Apache intercepts the request. Possibly routes it to other servers What folder should I look in for foo.com? Normally, it would then check /articles for a welcome.html file and send it back. .htaccess turns foo.com/blah into foo.com/index.php?q=blah ...And PHP takes over.
  • #22 Apache intercepts the request. Possibly routes it to other servers What folder should I look in for foo.com? Normally, it would then check /articles for a welcome.html file and send it back. .htaccess turns foo.com/blah into foo.com/index.php?q=blah ...And PHP takes over.
  • #23 Apache intercepts the request. Possibly routes it to other servers What folder should I look in for foo.com? Normally, it would then check /articles for a welcome.html file and send it back. .htaccess turns foo.com/blah into foo.com/index.php?q=blah ...And PHP takes over.
  • #24 Bootstrap All page requests go through index.php (front-side controller) Bootstrap Drupal core, load essential includes What site am I running? connect to database Is there a cookie? Load the user. Now, ask for menu items...
  • #25 Bootstrap All page requests go through index.php (front-side controller) Bootstrap Drupal core, load essential includes What site am I running? connect to database Is there a cookie? Load the user. Now, ask for menu items...
  • #26 Bootstrap All page requests go through index.php (front-side controller) Bootstrap Drupal core, load essential includes What site am I running? connect to database Is there a cookie? Load the user. Now, ask for menu items...
  • #27 Bootstrap All page requests go through index.php (front-side controller) Bootstrap Drupal core, load essential includes What site am I running? connect to database Is there a cookie? Load the user. Now, ask for menu items...
  • #28 Bootstrap All page requests go through index.php (front-side controller) Bootstrap Drupal core, load essential includes What site am I running? connect to database Is there a cookie? Load the user. Now, ask for menu items...
  • #29 The module Why, yes! Here’s a list of all the URLs I can handle. Explain each line. See api.drupal.org This is called a hook. We’ll get to this later.
  • #30 The module Why, yes! Here’s a list of all the URLs I can handle. Explain each line. See api.drupal.org This is called a hook. We’ll get to this later.
  • #31 Traffic Cop Is welcome.html an SEO-friendly alias? (about/welcome vs. welcome.html) Find the best match. (about) Run access checks. Call the function, passing along unused pieces of the path
  • #32 Grunt work Module’s function gets called. Extra params passed along. That’s how node module works -- ‘node’ plus a wildcard Can do anything now: print out JSON and exit(), etc. To build a normal page, build HTML and return it.
  • #33 Grunt work Module’s function gets called. Extra params passed along. That’s how node module works -- ‘node’ plus a wildcard Can do anything now: print out JSON and exit(), etc. To build a normal page, build HTML and return it.
  • #34 Presentation Checks for 404, 403, and empty page. index.php now has the contents of the page. theme(‘page’, $content) Sidebar blocks get loaded, the theme system is given a chance to add CSS and JS, etc.
  • #35 Presentation Checks for 404, 403, and empty page. index.php now has the contents of the page. theme(‘page’, $content) Sidebar blocks get loaded, the theme system is given a chance to add CSS and JS, etc.
  • #36 Presentation Checks for 404, 403, and empty page. index.php now has the contents of the page. theme(‘page’, $content) Sidebar blocks get loaded, the theme system is given a chance to add CSS and JS, etc.
  • #37 Oh, look. Welcome.html! Apache gets back the fully rendered HTML. Sweet. Document gets fired back to the user. The user’s browser renders it -- and they click on the next link and the process starts all over again.
  • #38 Important detail: when drupal asked about menus and modules responded, we saw a hook. hooks are everywhere: when pieces of content load, when a db query is run, when a user logs in&#x2026; that&#x2019;s a drupal event. module_invoke_all(&#x2018;hook&#x2019;) => for modules()&#x2026; <name>_menu() Modules can create their own hooks just by calling module_invoke_all()
  • #39 As a Drupal page is built, events are firing nonstop.
  • #40 As a Drupal page is built, events are firing nonstop.
  • #41 As a Drupal page is built, events are firing nonstop.
  • #42 As a Drupal page is built, events are firing nonstop.
  • #43 As a Drupal page is built, events are firing nonstop.
  • #44 As a Drupal page is built, events are firing nonstop.
  • #45 As a Drupal page is built, events are firing nonstop.
  • #46 As a Drupal page is built, events are firing nonstop.
  • #47 As a Drupal page is built, events are firing nonstop.
  • #54 Hooks can announce what&#x2019;s going on Allow modules to answer questions Allow modules to extend functionality Allow modules to change existing workflows
  • #55 Hooks can announce what&#x2019;s going on Allow modules to answer questions Allow modules to extend functionality Allow modules to change existing workflows
  • #56 Hooks can announce what&#x2019;s going on Allow modules to answer questions Allow modules to extend functionality Allow modules to change existing workflows
  • #57 Hooks can announce what&#x2019;s going on Allow modules to answer questions Allow modules to extend functionality Allow modules to change existing workflows
  • #58 Hooks can announce what&#x2019;s going on Allow modules to answer questions Allow modules to extend functionality Allow modules to change existing workflows
  • #59 What does &#x201C;hacking core&#x201D; mean? Why is it bad?
  • #60 What does &#x201C;hacking core&#x201D; mean? Why is it bad?