Pattern Cards+implementation
+overview
Use cases
The two most common use case for patterns are:
- we have a card and need to know a pattern-based setting.
- we are executing an action on a card and need to know which pattern-based hook or view to execute
Approach
As patterns are implemented (pattern cards created, hooks declared, etc.), they are registered in a big hash (internal or external to ruby process depending on needs) by their pattern key. To find the patterns for a given card, we generate a set of pattern keys for that card, and look up the patterns for each of those keys.
We will likely cache settings, as well as all cacheable views, on the card. When a pattern card is changes, all effected cards have their cache updated.
+module outline
On 10/13/09 6:40 AM, Gerry Gleason wrote:
On 10/12/09 6:03 PM, Lewis Hoffman wrote:
On Sat, Oct 10, 2009 at 5:47 AM, Gerry Gleason [email protected] wrote:
I like these broad categories. I'm a little fuzzy about Card storage being at the same level-- it seems like there's a lot of change/revision handling and content processing that we just wouldn't do if the card were actually stored on another wagn.So we would have these chunks to implement cards:
- Card content model (we haven't talked about this much, but I think this is where the hooks Lewis is talking about comes in. Task: catalog the content processing we do now: wiki-rendering to handle [[]] and stuff, slot based type editors, other type rendering
- Card naming model (the semantics of the virtual fields, name and key, + segmentation of names)
- Card storage model (Wagn is a flat namespace derived directly from the naming model) We have just scratched the surface in these discussions about how we might want to extend Wagn with respect to namespaces, multiple wagns refering to each others content. name resolution and scopes/contexts.
- Change model (i.e. how we handle revisions) -- I will come back to this along with Ethan's question about what I said earlier about revisions.
I agree, this is fuzzy. I'm going to address this in a separate post to keep this one shorter.
Gerry