Re: using axiom.dependency for powerups in queries

"Duncan McGreggor" <[email protected]> Tue, 11 Mar 2008 11:41:26 -0500
Newsgroups gmane.comp.python.quotient.dev
Message-ID <[email protected]>
On 3/11/08, Tristan Seligmann <[email protected]> wrote:
> * [email protected] <[email protected]> [2008-03-11 14:21:29 -0000]:
>
>
>  > On 12:46 pm, [email protected] wrote:
>  >> I think the main uses of powerups are where the powerup interface is
>  >> the
>  >> primary concern; either for adaptation of an item, or because you have
>  >> multiple items of different types, but providing the same interface,
>  >> and
>  >> you want to treat them as a group.
>  >
>  > This is worth emphasizing.  Powerups are a type of polymorphism.  You
>  > pay a price for using them; they make your data model more difficult to
>  > optimize, and bind it more tightly to your code.  This can be extremely
>  > powerful and simple, even graceful, when you need it, but can introduce
>  > a lot of unnecessary complexity when you don't.
>  >
>  > A good rule when you're trying to decide whether to make something a
>  > powerup is, "Is this powerup a point of integration with another
>  > system?"  If the answer to this question is "no" then you should almost
>  > certainly be using something else.  For example, cred
>  > (axiomatic.userbase) integrates with arbitrary other systems by using
>  > powerups.  Mantissa loads external plugins for things like the Organizer
>  > using powerups.
>  >
>  > In other words, if you *can* use regular references and queries to
>  > implement what you want, then you probably should.  Powerups are for
>  > when you need more.
>
>
> Someone should really put this in a document somewhere close to the
>  Axiom source code; over time, I've figured this sort of conceptual
>  architectural stuff out through osmosis, but I'm not very good at
>  putting it into words, and it's the kind of thing that's really useful
>  when you're starting out trying to learn Axiom / etc.

+1

Glyph, I'll be adding your comments to the Mantissa tutorial...

d