Re: using axiom.dependency for powerups in queries
[email protected] Tue, 11 Mar 2008 14:21:29 -0000
| Newsgroups | gmane.comp.python.quotient.dev |
|---|---|
| Message-ID | <20080311142129.21558.599508022.divmod.xquotient.7775@joule.divmod.com> |
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.