User login

Drupal 7 Module Development

OFFICIALLY POSTED HERE: http://badcamp.net/session/when-theres-not-module-drupal-7-module-development

Drupal is a powerful and modular system— we've heard this more than once by now. Jumping to conclusions gets us to the right place, in this case: Much of Drupal's power is in its modules— dynamos of pluggable functionality that can build on one another. Modules can do wonderful things by working with Drupal's base system and with each other. This session will show how to tap into this power to add features of our own creation in Drupal 7.

You can write a module yourself. All you need to do is create two files with some text. The first file only tells Drupal about our module. The second file can have as little as three lines of code in it. This is not scary; you can do it.

Once we've dispensed with the myth of module making as the difficult domain of die-hard Drupalistas, we will then go well beyond an easy example, and actually try to make you a die-hard Drupalista ;-)

We will go over how to make a module that

  • is useful,
  • plays well with Drupal core and other modules (hint: uses hooks),
  • follows coding standards,
  • is extensible by other modules (defines its own hooks!), and
  • is easy for users and administrators to use and developers to understand.

Attendees will be expected to have attended at some point one of the module-picking sessions (sorry, there's no guide for picking between 100 Useful Modules and Evaluating modules) or have a solid background in searching through the vast Drupal ecosystem for the right modules, as we should always know what's out there before we build our own.

No actual module-building experience is necessary, and there may be flights of fancy into better ways to collaborate on Drupal projects, but on the main we'll try to get as deep into the most commonly used Drupal APIs as time and attendee enthusiasm allows. Here are some of the APIs that will definitely be covered:

  • database (DBTNG) - a cursory look
  • form_alter
  • menu – this is the power of defining our own pages, among other things
  • node – nodeAPI is de-opped in 7 (it is many focused functions instead of one big switchy/twitchy one)
  • field – yeah this is the big D7 deal
  • help
  • theme (for modules)
  • permissions – using

And possibly:

  • user – another deopped API
  • taxonomy – yup, de-opped too
  • permissions – defining

Finally, the goal is that you learn more than this session teaches you: How to keep learning about module development from Drupal core, from the Examples project, from contributed modules, and from all the other Drupalistas out there.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.