cola/Mediator, cola/LocalStorage usage

30 views
Skip to first unread message

Denis Savenok

unread,
Oct 4, 2013, 12:34:32 PM10/4/13
to cuj...@googlegroups.com
Please, explain cola/Mediator, cola/LocalStorage (Array, Rest - storages) usage. No documentation, but may be an example?

Brian Cavalier

unread,
Oct 5, 2013, 10:32:36 PM10/5/13
to cuj...@googlegroups.com
Hey Denis,

You found our in-progress work on the next iteration of cola :)  The code in master isn't ready for public consumption yet.

To explain, though, LocalStorage, Rest, and Array are datasources.  They provide an abstract interface to different data storage "endpoints" from/to which cola and fetch and store data.  As you probably guessed, LocalStorage manages data in window.localStorage, Rest manages data at a REST endpoint (via rest.js), and Array manages data in a plain JS Array.  There will likely be others.

Mediator is very much a work in progress.  We're working on different experiments for automatically mediating between views, controllers, models, and datasources.  Mediator is one such experiment, and we have a fews others, but we don't want to give away too much yet :)

Are you using another version of cola already?  Perhaps 0.1.3 or 0.1.5?

Denis Savenok

unread,
Oct 12, 2013, 3:13:54 AM10/12/13
to
Hey Brian,

As the matter of fact I just began to understand cujo and my first acquaintanceship with cola started  exactly with your private experiments. 

It seems to be extremely useful feature you speak about (abstractly html node with rendered data also can be considered as datasource).
Generally cujo is a treasury of awesome patterns for me and the code you provided in master promises to be exactly what I dreamed of.

Presently I involved in developing of component-based framework on the top of Marionette.js. We started use meld, when, callbacks, define components in declarative way - and codebase threatens to be cujo-oriented more than backbone-. :)
Reply all
Reply to author
Forward
0 new messages