Skip to content
jducoeur edited this page Oct 21, 2012 · 2 revisions

Use Case: What's New Mixin

This is the canonical example of a "Mixin" App, which doesn't do anything itself but is intended to be pulled into other Apps to provide a specific function. In this case, What's New encapsulates the idea of a Blog: a Space where new entries under one or more particular Models are considered "blog entries", and get published out to social media.

This will initially be factored out from the Use Case Blog, but should then be added to Use Case Cookbook and a bunch of others.

Analysis

This is a killer feature if done right -- the ability for any Space to very easily be turned into an RSS feed is both really cool and massively useful.

This probably won't be implemented immediately; instead, we'll implement the Blog App, and then factor What's New out from that.

The Feature RSS should get encapsulated into this Mixin: any Space using this Mixin is, more or less by definition, an RSS feed. Publication to Facebook might also go under here. Note that this is very likely a sort of pseudo-App, implemented partly in native code but exposing Querki Properties that control its behaviour.

What's New exposes a couple of special Properties, which describe how it works. Most importantly, there should be a New Entry Models Property, which describes the Models that, when instantiated, cause Entries to be created. (Alternatively, this could be implemented as a hook you add to Thing instantiation, which could be more generally useful. Or possibly a Predicate Query Property that runs whenever a new Thing is created, which returns true if this should become an entry.)

There also needs to be a Property that describes the template for the new entry. This template would get fed some pseudo-Properties in QL that describe how to lay out the entry.

It's also going to need some specialized UI, so that you can play with the template and a model Thing, and see what the RSS entry is going to look like.

Features

  • Feature - RSS: The RSS Feature may well be entirely encapsulated inside this Mixin; the Mixin is how you use RSS from Querki. But it's kind of the point here.

  • Feature - Mixins: What's New is expected to be the first true "mixin" App, designed specifically for multiple inheritance.

Clone this wiki locally