Skip to content

Instantly share code, notes, and snippets.

@ericgj
Last active December 17, 2015 12:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericgj/5608043 to your computer and use it in GitHub Desktop.
Save ericgj/5608043 to your computer and use it in GitHub Desktop.
DEFER LIST

2 Oct

  • update metalsmith plugins for metalsmith 1.x

30 Jan

  • json-schema-*: consider a different implementation strategy that makes "core" less core:
  • does not require pre-parsing the schema in order to dereference and validate
  • allows pluggable validators through a common interface, with a default validator
  • parses the schema only when building a correlation, which is where it is actually used
  • correlation prototype is extendable, as now, through a plugin interface
  • "model" functionality is implemented as a correlation plugin

27 Jan

  • json-schema-core: rename toObject() -> toJSON()
  • json-schema-core: add inline dereferencing
  • json-schema-core: Implement Correlation.prototype.getId()
  • json-schema-core: Officially deprecate Correlation.prototype.get(), .$(), and .getPath()
  • json-schema-model: Implement models(), $() on Model.prototype and Collection.prototype
  • json-schema-model: Clone in toJSON() calls (maybe?); isolate better when mutation happens

11 Jan

  • GOOS: rework ruby test-fixture Builder to be more flexible/declarative

9 Jan 2014

  • change all RSA keys on cloud providers to something else

4 Dec

  • json-schema-valid: only validate ownProperty or have option (cf tv4)

10 Oct

  • Accordion pull requests
  • npm install for json-schema-* components

9 Sep

  • test model-undoable against latest component/model

19 Aug

  • JSON Schema tooling

25 July

  • make the hogan transpiler compatible with the new version of component
  • reimplement component/delegates

21 July

  • Split backend from component/model and write adapter for ericgj/REST for the common case. But this needs some shaking out.

15 July

13 July

12 July

  • Collect/develop components for building up a 'documentation and demo UI' - something like angularjs.com has but simplified and focused on documenting/demoing components and/or applications. I'd like to have a temporal aspect, to demonstrate the development process itself.
  • component-ls or component-graph add json output

29 June

  • multiview component - state transitions between template/view pairs

25 June

- Rethink data-table. If you want interactivity in records or headers, might be better to have the templates be reactive/model bound. How to support both 'flat' and 'interactive' rendering.

13 June

  • Vagrant + {something - just shell scripts?} provisioning for a replacement dev machine
  • veewee build box for vagrant

12 June

  • latest Arch upgrade
  • upgrade VirtualBox
  • VirtualBox copy-paste
  • get Xmodmap to run within awesome

11 June

  • editable-models: custom editable classes; input validation hooking in to component/model validations.

5 June

  • improvements to component/pager: autohide if < minimum items, allow three states (more/all/less), perhaps using ToggleController
  • revise model-queries to reset query vars after run()

27 May

  • JSON schema thing, but not like the monstrosity that is JSON API, which is a generic format. What I mean is: your app can define the structure of a given kind of request. At build time, your client-side models are checked against this structure, raising errors if they don't match it. At build time. Essentially, it is a lint check. But for this to work effectively, your request structure files have to be generated out of or made available from the server side in some way.

25 May

  • Simplify model-queries interface for simplest case, e.g. Model.query('page') => Model.page({p:1,n:20},cb) => GET /model/page?p=1&n=20 reimplemented
  • Pull request to matthewmueller/hogan to add npm executable (and package.json) for pre-compile
  • Fork faker.js for component did my own

24 May

  • Tests for model-queries (look at component/model for how to do it)
  • Pull request to component/model for Model.select? Although it looks like they are abstracting the transport so maybe this doesn't make sense to do now.

22 May

  • Take jquery out of component/pager
  • Add a few more niceties to pager such as 'page window'
  • minispy: better check for npm vs component context
  • Event spy mechanism for widget- and app- level events (not DOM events)  DONE, tests needed

19 May 2013

  • Namespaced localStorage interface on top of marcuswestin/store.js nbubna/store - send pull request to be component-compatible
  • UI interaction testing, a tool for supporting non-automated testing
  • Use Array.splice in tree-accordion component
  • Test data-table with table thead and tbody markup

UI interaction testing

a tool for supporting non-automated testing

JSON schema thing,

but not like the monstrosity that is JSON API, which is a generic format. What I mean is: your app can define the structure of a given kind of request. At build time, your client-side models are checked against this structure, raising errors if they don't match it. At build time. Essentially, it is a lint check. But for this to work effectively, your request structure files have to be generated out of or made available from the server side in some way.

In fact I think what we want to use here is JSON Schema -- in terms of the protocol. (I don't know if we need to capture the semantics of link following etc. My tendency is to think no, at least at the outset, leave that a convention that client and server both follow.)

The static-analysis idea is a bit contrived. More realistic is when you run your app in development, protocol errors are caught on both client and server sides, each using the same JSON schema docs. In production, you drop this dependency, esp. on the client side.

Client-side validation component

What I think gets confused is using JSON schema for model validations, i.e. within the client. That's certainly possible, but really a different use-case than I'm talking about.

Collect/develop components for building up a 'documentation and demo UI'

something like angularjs.com has but simplified and focused on documenting/demoing components and/or applications. I'd like to have a temporal aspect, to demonstrate the development process itself.

json-schema-* rewrite

Basically it gets rid of the schema parsing except for the links, which are parsed as needed and through private classes.

Changes:

  • does not require pre-parsing the schema in order to dereference and validate
  • allows pluggable validators through a common interface, with a default validator
  • correlation prototype is extendable, as now, through a plugin interface
  • "model" functionality is implemented as a correlation plugin

Components:

  • agent (network access, canonical dereferencing)
  • refs (inline dereferencing, anchor scopes)
  • correl (pluggable correlation, similar to current core, except with unparsed schema)
  • valid (pluggable validation + default validator + correlation plugin for validate, coerce)
  • hyper (correlation plugin for links, rel)
  • uri (similar to current, or replace with some other URI parsing lib)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment