On Github JuanCaicedo / oboejs-talk
Slow page load?
One big AJAX?
Many small AJAX?
oboe('url')
.node('pattern', function(data){
// listener code
});
// new Thing(color, shape)
oboe('/myapp/things')
.node('things.*', function(thing){
return new Thing(
thing.color,
thing.shape
);
})
.done(function(people){
people[0].colorAndShape();
})
var greenThings = [];
var blueThings = [];
oboe('/myapp/things')
.node('things.*', function(thing){
if(thing.color === 'blue'){
blueThings.push(thing);
} else {
greenThings.push(thing);
}
})
oboe('/myapp/thing')
.node('{ color shape }', function(thing){
if(thing.color === 'blue'){
return this.drop;
}
})
.done(function( finalJson){
console.log(finalJson);
// ^ {"things": [ , , greenThing, ]}
})
router.get('/data', function(req, res) {
var readStream = fetchYourData();
readStream.pipe(res);
});
$ aws datapipeline list-pipelines | node rerun-pipelines.js
oboe(process.stdin)
.node('pipelines.[]', function(pipeline){
rerun(pipeline);
})
Maybe overkill for small data?