Happy Hooking - Designing for Extensibility and Customization (Ed Leafe).notes

Monday, March 28, 2005

TITLE OF PAPER: Happy Hooking - Designing Software for Extensibility and Customization
URL OF PRESENTATION: _URL_of_powerpoint_presentation_
PRESENTED BY: Ed Leafe
REPRESENTING: The Dabo Project

CONFERENCE: PyCon 2005
DATE: Friday, March 25, 2005
LOCATION: GWU Cafritz Conference Center, Marvin Theatre

--------------------------------------------------------------------------
PyCon 2005 notes are collected by ted leung: http://www.sauria.com/~twl/conferences/pycon2005/

--------------------------------------------------------------------------
REAL-TIME NOTES / ANNOTATIONS OF THE PAPER:
{If you've contributed, add your name, e-mail & URL at the bottom}

Ed is a long-time developer, fairly new to Python, comes from Visual
FoxPro.

These techniques have been incorporated into the Dabo framework.

Who should care?
    Developers who create code used by others

Inheritance is what makes [extensibility] possible
    But you can't modify inherited code, you override it
    Most languages have some way to augment that
    Need to explicitly call superclass version of method
    Hard-to-find bugs when you forget

Three places where people might need to hook into your code: before/after/middle,
with "middle" being the real problem.

A hook is an empty method put in code in anticipation of being overridden
in a subclass.

Hooks in Dabo
    Standard hooks
    User should never have to override __init__
        Shows example __init__ that calls various hooks (initProperties,
            beforeInit, etc. that the user can override).
    'method()' calls are bracketed with a beforeXXX() and afterXXX() call
        beforeXXX() can veto the action, an exception is raised if beforeXXX()
        returns anything non-empty

[this seems useful but not the subject of a full session -- Nate]
[moving out of this session to lightning talks, sorry for ending this
    transcript -- Nate]

--------------------------------------------------------------------------
REFERENCES: {as documents / sites are referenced add them below}


--------------------------------------------------------------------------
QUOTES:



--------------------------------------------------------------------------
CONTRIBUTORS: {add your name, e-mail address and URL below}

Nate Silva <nate@northwe.st>

--------------------------------------------------------------------------
E-MAIL BOUNCEBACK: {add your e-mail address separated by commas }


--------------------------------------------------------------------------
NOTES ON / KEY TO THIS TEMPLATE:
A headline (like a field in a database) will be CAPITALISED
    This differentiates from the text that follows
A variable that you can change will be surrounded by _underscores_
    Spaces in variables are also replaced with under_scores
    This allows people to select the whole variable with a simple double-click
A tool-tip is lower case and surrounded by {curly brackets / parentheses}
    These supply helpful contextual information.

--------------------------------------------------------------------------
Copyright shared between all the participants unless otherwise stated...