From 9e69de0db900959f69eefb32adecf7970fb41839 Mon Sep 17 00:00:00 2001 From: Rufus Pollock Date: Wed, 20 Jun 2012 18:40:27 +0100 Subject: [PATCH] [docs/library][s]: heavily rewrite and refactor main doc page to be simpler and clearer. --- css/site/site.css | 2 +- library.html | 216 ++++++++++++++++++++-------------------------- 2 files changed, 96 insertions(+), 122 deletions(-) diff --git a/css/site/site.css b/css/site/site.css index b6d5092d..9519056a 100644 --- a/css/site/site.css +++ b/css/site/site.css @@ -160,7 +160,7 @@ section.grey:after { color:#333333; } -.library .row .well { +.library .tutorials .well { height: 60px; } diff --git a/library.html b/library.html index 850afcf3..4e980bc6 100644 --- a/library.html +++ b/library.html @@ -4,10 +4,9 @@ title: Library - Home ---
- @@ -16,146 +15,121 @@ title: Library - Home set of models (Dataset, Record/Row, Field) and views (Grid, Map, Graph etc).

-

Examples

+ +

Concepts and Structure

+ +

The Recline Library consists of 3 parts: Models, Backends and Views

+ +
+
+
+

Models

+

Models help you structure your work with data by providing some standard objects such as Dataset and Record – a Dataset being a collection of Records. More »

+
+
+
+
+

Backends

+

Backends connect your Models to data sources (and stores) – for example Google Docs spreadsheets, local CSV files, the DataHub, ElasticSearch etc. More »

+
+
+
+
+

Views

+

Views are user interface components for displaying, editing or interacting with the data. For example, maps, graphs, data grids or a query editor. More »

+
+
+
+ +
+

Tutorials

Note: A quick read through of the Concepts section will - likely be useful in understanding the details of the examples.
+ likely be useful in understanding the details of these tutorials.
-
-

Recline Quickstart Guide

+ -
-

Loading from difference sources: Google Docs, Local CSV, DataHub

+ -
-

Twitter Example

+
+
+

Twitter Example

+
-
-

Customing Display and Import using Fields

+
+
+

Customing Display and Import using Fields

+
-
-

Listening to events

+
+
+

Listening to events

+
-
-

Setting and Getting State

+
+
+

Setting and Getting State

+

Extending Recline

-
-

Create a new View

-
-
-

Create a new Backend

-
-
-

Create a Custom Record Object

-
-
- -
-
-

Concepts and Structure

+
+
+

Create a new View

-
-
-

Recline has a simple structure layered on top of the basic Model/View - distinction inherent in Backbone.

- -

Models

-

There are two main model objects:

-
    -
  • Dataset: represents the dataset. - Holds dataset info and a pointer to list of data items (Records in our - terminology) which it can load from the relevant Backend.
  • -
  • Record: an individual data item - (e.g. a row from a relational database or a spreadsheet, a record from from - a document DB like CouchDB or MongoDB).
  • -
- -

Additional, related models:

-
    -
  • Field: a field/column on a - dataset.
  • -
  • Query: an object to encapsulate a - query to the backend (useful both for creating queries and for storing and - manipulating query state - e.g. from a query editor).
  • -
  • Facet: Object to store Facet - information, that is summary information (e.g. values and counts) about a - field obtained by some faceting method on the backend.
  • -
- -

More detail of how these work can be found in the Model source docs.

- - -
- -
-

Backends

-

Backends connect Dataset and Records to data from a - specific 'Backend' data source. They provide methods for loading and saving - Datasets and individuals Records as well as for bulk loading via a query API - and doing bulk transforms on the backend.

- -

A template Base class can be found in the - Backend base module of the source docs. It records both the relevant - methods a Backend must have and (optionally) provides a base 'class' for - inheritance. You can also find detailed examples of backend implementations in - the source documentation below.

- -

Views

-

Complementing the model are various Views (you can - also easily write your own). Each view holds a pointer to a Dataset:

-
    -
  • MultiView: the parent view which manages the overall app and sets up - sub views.
  • -
  • Grid: the data grid view.
  • -
  • Graph: a simple graphing view using Flot.
  • -
  • Map: a map view using Leaflet.
  • -
- -

There are additional views which do not display a whole dataset but which - are useful:

-
    -
  • QueryEditor: a query editor view
  • -
  • FacetViewer: display facets
  • -
+
+
+

Create a new Backend

-
-
-

Source Docs (via Docco)

-
-
- + +

Source Docs (via Docco)

+ +