SlideShare une entreprise Scribd logo
1  sur  52
Copyright © 2016 M/Gateway Developments Ltd
EWD 3 Training Course
Part 22
JavaScript Abstraction of Global Storage:
(c) Traversing Documents
Rob Tweed
Director, M/Gateway Developments Ltd
Twitter: @rtweed
Copyright © 2016 M/Gateway Developments Ltd
Traversing a Global Node using the cache.node order function:
var node = {
global: 'myGlobal',
subscripts: ['d', 'e2', '' ]
};
var subscript;
do {
subscript = db.order(node).result;
if (subscript !== '') console.log(subscript);
}
while (subscript !== '');
myGlobal("d","e2","f1")="bar1"
myGlobal("d","e2","f2")="bar2"
myGlobal("d","e2","f3")="bar3"
"f1", "f2", "f3"
Traversal the hard way
Copyright © 2016 M/Gateway Developments Ltd
DocumentNode Object method:
forEachChild()
Traversal made easy and intuitive
Copyright © 2016 M/Gateway Developments Ltd
forEachChild() Method
• Iterates through all child nodes of a
DocumentNode Object
– ie through subscripts in underlying Global
Storage
Copyright © 2016 M/Gateway Developments Ltd
forEachChild() Method
• Iterates through all child nodes
– ie through subscripts in underlying Global
Storage
– docNode.forEachChild(function(nodeName, childNode) {…});
Copyright © 2016 M/Gateway Developments Ltd
forEachChild() Method
• Iterates through all child nodes
– ie through subscripts in underlying Global
Storage
– docNode.forEachChild( function(nodeName, childNode) {…}) ;
– Callback function fires on every iteration
• ie every time a child node is found
Copyright © 2016 M/Gateway Developments Ltd
forEachChild() Method
• Iterates through all child nodes
– ie through subscripts in underlying Global
Storage
– docNode.forEachChild(function(nodeName, childNode) {…});
Child node's Node Name (ie subscript)
Copyright © 2016 M/Gateway Developments Ltd
forEachChild() Method
• Iterates through all child nodes
– ie through subscripts in underlying Global
Storage
– docNode.forEachChild(function(nodeName, childNode) {…});
Child node's Node Name (ie subscript)
DocumentNode object representing the
Child node
Copyright © 2016 M/Gateway Developments Ltd
myDoc("d","e2","f1")="bar1"
myDoc("d","e2","f2")="bar2"
myDoc("d","e2","f3")="bar3"
var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']);
forEachChild() Method
Copyright © 2016 M/Gateway Developments Ltd
myDoc("d","e2","f1")="bar1"
myDoc("d","e2","f2")="bar2"
myDoc("d","e2","f3")="bar3"
var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']);
e2Node.forEachChild(function(nodeName) {
// do something with the node name / subscript for this iteration
});
forEachChild() Method
Copyright © 2016 M/Gateway Developments Ltd
myDoc("d","e2","f1")="bar1"
myDoc("d","e2","f2")="bar2"
myDoc("d","e2","f3")="bar3"
var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']);
e2Node.forEachChild(function(nodeName) {
// 1st iteration nodeName === 'f1’
});
forEachChild() Method
Copyright © 2016 M/Gateway Developments Ltd
myDoc("d","e2","f1")="bar1"
myDoc("d","e2","f2")="bar2"
myDoc("d","e2","f3")="bar3"
var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']);
e2Node.forEachChild(function(nodeName) {
// 2nd iteration nodeName === 'f2’
});
forEachChild() Method
Copyright © 2016 M/Gateway Developments Ltd
myDoc("d","e2","f1")="bar1"
myDoc("d","e2","f2")="bar2"
myDoc("d","e2","f3")="bar3"
var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']);
e2Node.forEachChild(function(nodeName) {
// 3rd iteration nodeName === 'f3’
});
forEachChild() Method
Copyright © 2016 M/Gateway Developments Ltd
myDoc("d","e2","f1")="bar1"
myDoc("d","e2","f2")="bar2"
myDoc("d","e2","f3")="bar3"
var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']);
e2Node.forEachChild(function(nodeName) {
console.log(nodeName);
});
forEachChild() Method
f1
f2
f3
Copyright © 2016 M/Gateway Developments Ltd
myDoc("d","e2","f1")="bar1"
myDoc("d","e2","f2")="bar2"
myDoc("d","e2","f3")="bar3"
var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']);
e2Node.forEachChild(function(nodeName, childNode) {
// do something with the childNode DocumentNode object for this iteration
});
forEachChild() Method
Copyright © 2016 M/Gateway Developments Ltd
myDoc("d","e2","f1")="bar1"
myDoc("d","e2","f2")="bar2"
myDoc("d","e2","f3")="bar3"
var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']);
e2Node.forEachChild(function(nodeName, childNode) {
// do something with the childNode DocumentNode object for this iteration
});
forEachChild() Method
Copyright © 2016 M/Gateway Developments Ltd
myDoc("d","e2","f1")="bar1"
myDoc("d","e2","f2")="bar2"
myDoc("d","e2","f3")="bar3"
var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']);
e2Node.forEachChild(function(nodeName, childNode) {
// 1st iteration
});
forEachChild() Method
Copyright © 2016 M/Gateway Developments Ltd
myDoc("d","e2","f1")="bar1"
myDoc("d","e2","f2")="bar2"
myDoc("d","e2","f3")="bar3"
var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']);
e2Node.forEachChild(function(nodeName, childNode) {
// 2nd iteration
});
forEachChild() Method
Copyright © 2016 M/Gateway Developments Ltd
myDoc("d","e2","f1")="bar1"
myDoc("d","e2","f2")="bar2"
myDoc("d","e2","f3")="bar3"
var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']);
e2Node.forEachChild(function(nodeName, childNode) {
// 3rd iteration
});
forEachChild() Method
Copyright © 2016 M/Gateway Developments Ltd
myDoc("d","e2","f1")="bar1"
myDoc("d","e2","f2")="bar2"
myDoc("d","e2","f3")="bar3"
var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']);
e2Node.forEachChild(function(nodeName, childNode) {
// do something with the childNode DocumentNode object for this iteration
});
forEachChild() Method
childNode is a DocumentNode Object, so has all the usual properties and methods
Copyright © 2016 M/Gateway Developments Ltd
myDoc("d","e2","f1")="bar1"
myDoc("d","e2","f2")="bar2"
myDoc("d","e2","f3")="bar3"
var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']);
e2Node.forEachChild(function(nodeName, childNode) {
console.log(childNode.value);
});
forEachChild() Method
bar1
bar2
bar3
Copyright © 2016 M/Gateway Developments Ltd
forEachChild() Method
• Iterates through all child nodes
– docNode.forEachChild(function(nodeName, childNode) {…});
• Note that because ewd-document-store uses synchronous versions of
underlying cache.node APIs, the call-backs fire in synchronous order
• Additionally, the forEachChild() function will wait until completion before next
command executes
• This greatly simplifies its use!
Copyright © 2016 M/Gateway Developments Ltd
myDoc("d","e2","f1")="bar1"
myDoc("d","e2","f2")="bar2"
myDoc("d","e2","f3")="bar3"
var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']);
console.log('start…');
e2Node.forEachChild(function(nodeName, childNode) {
console.log(childNode.value);
});
console.log('end');
Example
start…
bar1
bar2
bar3
end
Copyright © 2016 M/Gateway Developments Ltd
myDoc("d","e2","f1")="bar1"
myDoc("d","e2","f2")="bar2"
myDoc("d","e2","f3")="bar3"
var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']);
console.log('start…');
e2Node.forEachChild(function(nodeName, childNode) {
console.log(childNode.value);
});
console.log('end');
Example
This can be done safely because QEWD uses
the master / worker architecture of ewd-qoper8
where your handler functions run on their own
in an isolated process
Copyright © 2016 M/Gateway Developments Ltd
myDoc("d","e2","f1")="bar1"
myDoc("d","e2","f2")="bar2"
myDoc("d","e2","f3")="bar3"
var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']);
e2Node.forEachChild(function(nodeName, childNode) {
// if callback function returns true (exit boolean flag), it stops the loop
});
Stopping forEachChild() Early
Copyright © 2016 M/Gateway Developments Ltd
myDoc("d","e2","f1")="bar1"
myDoc("d","e2","f2")="bar2"
myDoc("d","e2","f3")="bar3"
var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']);
var count = 0;
e2Node.forEachChild(function(nodeName, childNode) {
count++;
if (count === 3) return true;
console.log(childNode.value);
});
Stopping forEachChild() Early
bar1
bar2
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
Nested forEachChild() loops
Traversal of all nodes and subnodes
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
Nested forEachChild() loops
Traversal of all nodes and subnodes
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
Nested forEachChild() loops
Traversal of all nodes and subnodes
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
Nested forEachChild() loops
Traversal of all nodes and subnodes
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
Nested forEachChild() loops
Traversal of all nodes and subnodes
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
Nested forEachChild() loops
Traversal of all nodes and subnodes
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
Nested forEachChild() loops
Traversal of all nodes and subnodes
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
Nested forEachChild() loops
Traversal of all nodes and subnodes
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
Nested forEachChild() loops
var dNode = new this.documentStore.DocumentNode('myDoc', ['d']);
dNode.forEachChild(function(nodeName, childNode) {
// do something with child node
});
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
Nested forEachChild() loops
var dNode = new this.documentStore.DocumentNode('myDoc', ['d']);
dNode.forEachChild(function(nodeName, childNode) {
// 1st iteration
});
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
Nested forEachChild() loops
var dNode = new this.documentStore.DocumentNode('myDoc', ['d']);
dNode.forEachChild(function(nodeName, childNode) {
// 1st iteration
childNode.forEachChild(function(nodeName, childNode) {
// do something with grand-child node
});
});
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
Nested forEachChild() loops
var dNode = new this.documentStore.DocumentNode('myDoc', ['d']);
dNode.forEachChild(function(nodeName, childNode) {
// 1st iteration
childNode.forEachChild(function(nodeName, childNode) {
// 1st iteration
});
});
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
Nested forEachChild() loops
var dNode = new this.documentStore.DocumentNode('myDoc', ['d']);
dNode.forEachChild(function(nodeName, childNode) {
console.log(nodeName);
childNode.forEachChild(function(nodeName, childNode) {
console.log(childNode.value);
});
});
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
Nested forEachChild() loops
var dNode = new this.documentStore.DocumentNode('myDoc', ['d']);
dNode.forEachChild(function(nodeName, childNode) {
console.log(nodeName);
childNode.forEachChild(function(nodeName, childNode) {
console.log(childNode.value);
});
});
e1
bar1a
bar2a
e2
bar1b
bar2b
bar3b
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
Nest as deeply as you wish
var doc = new this.documentStore.DocumentNode('myDoc');
doc.forEachChild(function(nodeName, childNode) {
childNode.forEachChild(function(nodeName, childNode) {
childNode.forEachChild(function(nodeName, childNode) {
// do something with innermost node
});
});
});
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
forEachChild() in reverse order?
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
forEachChild() in reverse order
var myDoc = new this.documentStore.DocumentNode('myDoc', [ ]);
myDoc.forEachChild( {direction: 'reverse'} , function(nodeName, childNode) {
console.log(nodeName);
});
Use optional control object argument
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
forEachChild() in reverse order
var myDoc = new this.documentStore.DocumentNode('myDoc', [ ]);
myDoc.forEachChild( {direction: 'reverse'} , function(nodeName, childNode) {
console.log(nodeName);
});
d
b
a
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
Navigating to Specific Nodes
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
Navigating to Specific Nodes
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
Navigating to Specific Nodes
var myDoc = new this.documentStore.DocumentNode('myDoc');
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
Navigating to Specific Nodes
var myDoc = new this.documentStore.DocumentNode('myDoc');
console.log(myDoc.firstChild.value); // 123
firstChild returns a DocumentNode object
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
Navigating to Specific Nodes
var myDoc = new this.documentStore.DocumentNode('myDoc');
console.log(myDoc.firstChild.value); // 123
console.log(myDoc.firstChild.name); // a
firstChild returns a DocumentNode object
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
Navigating to Specific Nodes
var myDoc = new this.documentStore.DocumentNode('myDoc');
console.log(myDoc.lastChild.name); // d
lastChild also returns a DocumentNode object
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
Navigating to Specific Nodes
var myDoc = new this.documentStore.DocumentNode('myDoc');
console.log(myDoc.firstChild.nextSibling.name); // b
nextSibling returns a DocumentNode object
Copyright © 2016 M/Gateway Developments Ltd
myDoc("a")=123
myDoc("b","c1")="foo"
myDoc("b","c2")="foo2"
myDoc("d","e1","f1a")="bar1a"
myDoc("d","e1","f2a")="bar2a"
myDoc("d","e2","f1b")="bar1b"
myDoc("d","e2","f2b")="bar2b"
myDoc("d","e2","f3b")="bar3b"
Navigating to Specific Nodes
var myDoc = new this.documentStore.DocumentNode('myDoc');
console.log(myDoc.lastChild.previousSibling.name); // b
previousSibling returns a DocumentNode object

Contenu connexe

Tendances

Node.js Explained
Node.js ExplainedNode.js Explained
Node.js ExplainedJeff Kunkle
 
Asynchronous I/O in NodeJS - new standard or challenges?
Asynchronous I/O in NodeJS - new standard or challenges?Asynchronous I/O in NodeJS - new standard or challenges?
Asynchronous I/O in NodeJS - new standard or challenges?Dinh Pham
 
Modern UI Development With Node.js
Modern UI Development With Node.jsModern UI Development With Node.js
Modern UI Development With Node.jsRyan Anklam
 
Hiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret SauceHiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret SauceJesse Vincent
 
Node.js - async for the rest of us.
Node.js - async for the rest of us.Node.js - async for the rest of us.
Node.js - async for the rest of us.Mike Brevoort
 
All aboard the NodeJS Express
All aboard the NodeJS ExpressAll aboard the NodeJS Express
All aboard the NodeJS ExpressDavid Boyer
 
Java script at backend nodejs
Java script at backend   nodejsJava script at backend   nodejs
Java script at backend nodejsAmit Thakkar
 
RESTful API In Node Js using Express
RESTful API In Node Js using Express RESTful API In Node Js using Express
RESTful API In Node Js using Express Jeetendra singh
 
OSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialOSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialTom Croucher
 
Understanding the Node.js Platform
Understanding the Node.js PlatformUnderstanding the Node.js Platform
Understanding the Node.js PlatformDomenic Denicola
 
Building your first Node app with Connect & Express
Building your first Node app with Connect & ExpressBuilding your first Node app with Connect & Express
Building your first Node app with Connect & ExpressChristian Joudrey
 
Getting started with developing Nodejs
Getting started with developing NodejsGetting started with developing Nodejs
Getting started with developing NodejsPhil Hawksworth
 
A million connections and beyond - Node.js at scale
A million connections and beyond - Node.js at scaleA million connections and beyond - Node.js at scale
A million connections and beyond - Node.js at scaleTom Croucher
 
Overview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web FrameworkOverview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web FrameworkIndicThreads
 
Nodejs Explained with Examples
Nodejs Explained with ExamplesNodejs Explained with Examples
Nodejs Explained with ExamplesGabriele Lana
 
Developing node-mdb: a Node.js - based clone of SimpleDB
Developing node-mdb: a Node.js - based clone of SimpleDBDeveloping node-mdb: a Node.js - based clone of SimpleDB
Developing node-mdb: a Node.js - based clone of SimpleDBRob Tweed
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.jsorkaplan
 

Tendances (20)

NodeJS
NodeJSNodeJS
NodeJS
 
Node.js Explained
Node.js ExplainedNode.js Explained
Node.js Explained
 
Asynchronous I/O in NodeJS - new standard or challenges?
Asynchronous I/O in NodeJS - new standard or challenges?Asynchronous I/O in NodeJS - new standard or challenges?
Asynchronous I/O in NodeJS - new standard or challenges?
 
Modern UI Development With Node.js
Modern UI Development With Node.jsModern UI Development With Node.js
Modern UI Development With Node.js
 
Hiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret SauceHiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret Sauce
 
Node.js - async for the rest of us.
Node.js - async for the rest of us.Node.js - async for the rest of us.
Node.js - async for the rest of us.
 
All aboard the NodeJS Express
All aboard the NodeJS ExpressAll aboard the NodeJS Express
All aboard the NodeJS Express
 
NodeJS
NodeJSNodeJS
NodeJS
 
Java script at backend nodejs
Java script at backend   nodejsJava script at backend   nodejs
Java script at backend nodejs
 
RESTful API In Node Js using Express
RESTful API In Node Js using Express RESTful API In Node Js using Express
RESTful API In Node Js using Express
 
OSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialOSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js Tutorial
 
Understanding the Node.js Platform
Understanding the Node.js PlatformUnderstanding the Node.js Platform
Understanding the Node.js Platform
 
Building your first Node app with Connect & Express
Building your first Node app with Connect & ExpressBuilding your first Node app with Connect & Express
Building your first Node app with Connect & Express
 
Getting started with developing Nodejs
Getting started with developing NodejsGetting started with developing Nodejs
Getting started with developing Nodejs
 
A million connections and beyond - Node.js at scale
A million connections and beyond - Node.js at scaleA million connections and beyond - Node.js at scale
A million connections and beyond - Node.js at scale
 
Overview Of Lift Framework
Overview Of Lift FrameworkOverview Of Lift Framework
Overview Of Lift Framework
 
Overview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web FrameworkOverview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web Framework
 
Nodejs Explained with Examples
Nodejs Explained with ExamplesNodejs Explained with Examples
Nodejs Explained with Examples
 
Developing node-mdb: a Node.js - based clone of SimpleDB
Developing node-mdb: a Node.js - based clone of SimpleDBDeveloping node-mdb: a Node.js - based clone of SimpleDB
Developing node-mdb: a Node.js - based clone of SimpleDB
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
 

En vedette

EWD 3 Training Course Part 18: Modelling NoSQL Databases using Global Storage
EWD 3 Training Course Part 18: Modelling NoSQL Databases using Global StorageEWD 3 Training Course Part 18: Modelling NoSQL Databases using Global Storage
EWD 3 Training Course Part 18: Modelling NoSQL Databases using Global StorageRob Tweed
 
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3Rob Tweed
 
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4Rob Tweed
 
EWD 3 Training Course Part 30: Modularising QEWD Applications
EWD 3 Training Course Part 30: Modularising QEWD ApplicationsEWD 3 Training Course Part 30: Modularising QEWD Applications
EWD 3 Training Course Part 30: Modularising QEWD ApplicationsRob Tweed
 
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2Rob Tweed
 
EWD 3 Training Course Part 26: Event-driven Indexing
EWD 3 Training Course Part 26: Event-driven IndexingEWD 3 Training Course Part 26: Event-driven Indexing
EWD 3 Training Course Part 26: Event-driven IndexingRob Tweed
 
EWD 3 Training Course Part 31: Using QEWD for Web and REST Services
EWD 3 Training Course Part 31: Using QEWD for Web and REST ServicesEWD 3 Training Course Part 31: Using QEWD for Web and REST Services
EWD 3 Training Course Part 31: Using QEWD for Web and REST ServicesRob Tweed
 
EWD 3 Training Course Part 27: The QEWD Session
EWD 3 Training Course Part 27: The QEWD SessionEWD 3 Training Course Part 27: The QEWD Session
EWD 3 Training Course Part 27: The QEWD SessionRob Tweed
 
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWDEWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWDRob Tweed
 
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...Rob Tweed
 
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5Rob Tweed
 
EWD 3 Training Course Part 23: Traversing a Range using DocumentNode Objects
EWD 3 Training Course Part 23: Traversing a Range using DocumentNode ObjectsEWD 3 Training Course Part 23: Traversing a Range using DocumentNode Objects
EWD 3 Training Course Part 23: Traversing a Range using DocumentNode ObjectsRob Tweed
 
Mumps the Internet scale database
Mumps the Internet scale databaseMumps the Internet scale database
Mumps the Internet scale databasegeorge.james
 
EWD 3 Training Course Part 8: Anatomy of the QEWD Messaging Cycle
EWD 3 Training Course Part 8: Anatomy of the QEWD Messaging CycleEWD 3 Training Course Part 8: Anatomy of the QEWD Messaging Cycle
EWD 3 Training Course Part 8: Anatomy of the QEWD Messaging CycleRob Tweed
 
EWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes
EWD 3 Training Course Part 24: Traversing a Document's Leaf NodesEWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes
EWD 3 Training Course Part 24: Traversing a Document's Leaf NodesRob Tweed
 
EWD 3 Training Course Part 25: Document Database Capabilities
EWD 3 Training Course Part 25: Document Database CapabilitiesEWD 3 Training Course Part 25: Document Database Capabilities
EWD 3 Training Course Part 25: Document Database CapabilitiesRob Tweed
 
EWD 3 Training Course Part 16: QEWD Services
EWD 3 Training Course Part 16: QEWD ServicesEWD 3 Training Course Part 16: QEWD Services
EWD 3 Training Course Part 16: QEWD ServicesRob Tweed
 
EWD 3 Training Course Part 7: Applying the QEWD Messaging Pattern
EWD 3 Training Course Part 7: Applying the QEWD Messaging PatternEWD 3 Training Course Part 7: Applying the QEWD Messaging Pattern
EWD 3 Training Course Part 7: Applying the QEWD Messaging PatternRob Tweed
 
EWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
EWD 3 Training Course Part 6: What Happens when a QEWD Application is StartedEWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
EWD 3 Training Course Part 6: What Happens when a QEWD Application is StartedRob Tweed
 
EWD 3 Training Course Part 19: The cache.node APIs
EWD 3 Training Course Part 19: The cache.node APIsEWD 3 Training Course Part 19: The cache.node APIs
EWD 3 Training Course Part 19: The cache.node APIsRob Tweed
 

En vedette (20)

EWD 3 Training Course Part 18: Modelling NoSQL Databases using Global Storage
EWD 3 Training Course Part 18: Modelling NoSQL Databases using Global StorageEWD 3 Training Course Part 18: Modelling NoSQL Databases using Global Storage
EWD 3 Training Course Part 18: Modelling NoSQL Databases using Global Storage
 
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
 
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4
 
EWD 3 Training Course Part 30: Modularising QEWD Applications
EWD 3 Training Course Part 30: Modularising QEWD ApplicationsEWD 3 Training Course Part 30: Modularising QEWD Applications
EWD 3 Training Course Part 30: Modularising QEWD Applications
 
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2
 
EWD 3 Training Course Part 26: Event-driven Indexing
EWD 3 Training Course Part 26: Event-driven IndexingEWD 3 Training Course Part 26: Event-driven Indexing
EWD 3 Training Course Part 26: Event-driven Indexing
 
EWD 3 Training Course Part 31: Using QEWD for Web and REST Services
EWD 3 Training Course Part 31: Using QEWD for Web and REST ServicesEWD 3 Training Course Part 31: Using QEWD for Web and REST Services
EWD 3 Training Course Part 31: Using QEWD for Web and REST Services
 
EWD 3 Training Course Part 27: The QEWD Session
EWD 3 Training Course Part 27: The QEWD SessionEWD 3 Training Course Part 27: The QEWD Session
EWD 3 Training Course Part 27: The QEWD Session
 
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWDEWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD
 
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...
 
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5
 
EWD 3 Training Course Part 23: Traversing a Range using DocumentNode Objects
EWD 3 Training Course Part 23: Traversing a Range using DocumentNode ObjectsEWD 3 Training Course Part 23: Traversing a Range using DocumentNode Objects
EWD 3 Training Course Part 23: Traversing a Range using DocumentNode Objects
 
Mumps the Internet scale database
Mumps the Internet scale databaseMumps the Internet scale database
Mumps the Internet scale database
 
EWD 3 Training Course Part 8: Anatomy of the QEWD Messaging Cycle
EWD 3 Training Course Part 8: Anatomy of the QEWD Messaging CycleEWD 3 Training Course Part 8: Anatomy of the QEWD Messaging Cycle
EWD 3 Training Course Part 8: Anatomy of the QEWD Messaging Cycle
 
EWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes
EWD 3 Training Course Part 24: Traversing a Document's Leaf NodesEWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes
EWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes
 
EWD 3 Training Course Part 25: Document Database Capabilities
EWD 3 Training Course Part 25: Document Database CapabilitiesEWD 3 Training Course Part 25: Document Database Capabilities
EWD 3 Training Course Part 25: Document Database Capabilities
 
EWD 3 Training Course Part 16: QEWD Services
EWD 3 Training Course Part 16: QEWD ServicesEWD 3 Training Course Part 16: QEWD Services
EWD 3 Training Course Part 16: QEWD Services
 
EWD 3 Training Course Part 7: Applying the QEWD Messaging Pattern
EWD 3 Training Course Part 7: Applying the QEWD Messaging PatternEWD 3 Training Course Part 7: Applying the QEWD Messaging Pattern
EWD 3 Training Course Part 7: Applying the QEWD Messaging Pattern
 
EWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
EWD 3 Training Course Part 6: What Happens when a QEWD Application is StartedEWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
EWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
 
EWD 3 Training Course Part 19: The cache.node APIs
EWD 3 Training Course Part 19: The cache.node APIsEWD 3 Training Course Part 19: The cache.node APIs
EWD 3 Training Course Part 19: The cache.node APIs
 

Similaire à EWD 3 Training Course Part 22: Traversing Documents using DocumentNode Objects

EWD 3トレーニングコース#24 GlobalストレージのJavaScript用抽象化-(e) ドキュメントの末端ノードを渡り歩く
EWD 3トレーニングコース#24 GlobalストレージのJavaScript用抽象化-(e) ドキュメントの末端ノードを渡り歩くEWD 3トレーニングコース#24 GlobalストレージのJavaScript用抽象化-(e) ドキュメントの末端ノードを渡り歩く
EWD 3トレーニングコース#24 GlobalストレージのJavaScript用抽象化-(e) ドキュメントの末端ノードを渡り歩くKiyoshi Sawada
 
LISA Qooxdoo Tutorial Handouts
LISA Qooxdoo Tutorial HandoutsLISA Qooxdoo Tutorial Handouts
LISA Qooxdoo Tutorial HandoutsTobias Oetiker
 
EWD 3トレーニングコース#24 GlobalストレージのJavaScript用抽象化-(e) ドキュメントの末端ノードを渡り歩く
EWD 3トレーニングコース#24 GlobalストレージのJavaScript用抽象化-(e) ドキュメントの末端ノードを渡り歩くEWD 3トレーニングコース#24 GlobalストレージのJavaScript用抽象化-(e) ドキュメントの末端ノードを渡り歩く
EWD 3トレーニングコース#24 GlobalストレージのJavaScript用抽象化-(e) ドキュメントの末端ノードを渡り歩くKiyoshi Sawada
 
Go 1.10 Release Party - PDX Go
Go 1.10 Release Party - PDX GoGo 1.10 Release Party - PDX Go
Go 1.10 Release Party - PDX GoRodolfo Carvalho
 
Артем Маркушев - JavaScript
Артем Маркушев - JavaScriptАртем Маркушев - JavaScript
Артем Маркушев - JavaScriptDataArt
 
Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15Murat Yener
 
LISA QooxdooTutorial Slides
LISA QooxdooTutorial SlidesLISA QooxdooTutorial Slides
LISA QooxdooTutorial SlidesTobias Oetiker
 
Groovy a Scripting Language for Java
Groovy a Scripting Language for JavaGroovy a Scripting Language for Java
Groovy a Scripting Language for JavaCharles Anderson
 
Groovy and Grails talk
Groovy and Grails talkGroovy and Grails talk
Groovy and Grails talkdesistartups
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and PracticeBo-Yi Wu
 
Node js
Node jsNode js
Node jshazzaz
 
Groovy on the Shell
Groovy on the ShellGroovy on the Shell
Groovy on the Shellsascha_klein
 
Webinar: Building Your First App in Node.js
Webinar: Building Your First App in Node.jsWebinar: Building Your First App in Node.js
Webinar: Building Your First App in Node.jsMongoDB
 
Webinar: Building Your First App in Node.js
Webinar: Building Your First App in Node.jsWebinar: Building Your First App in Node.js
Webinar: Building Your First App in Node.jsMongoDB
 
Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Cosimo Streppone
 

Similaire à EWD 3 Training Course Part 22: Traversing Documents using DocumentNode Objects (20)

EWD 3トレーニングコース#24 GlobalストレージのJavaScript用抽象化-(e) ドキュメントの末端ノードを渡り歩く
EWD 3トレーニングコース#24 GlobalストレージのJavaScript用抽象化-(e) ドキュメントの末端ノードを渡り歩くEWD 3トレーニングコース#24 GlobalストレージのJavaScript用抽象化-(e) ドキュメントの末端ノードを渡り歩く
EWD 3トレーニングコース#24 GlobalストレージのJavaScript用抽象化-(e) ドキュメントの末端ノードを渡り歩く
 
Trimming The Cruft
Trimming The CruftTrimming The Cruft
Trimming The Cruft
 
LISA Qooxdoo Tutorial Handouts
LISA Qooxdoo Tutorial HandoutsLISA Qooxdoo Tutorial Handouts
LISA Qooxdoo Tutorial Handouts
 
EWD 3トレーニングコース#24 GlobalストレージのJavaScript用抽象化-(e) ドキュメントの末端ノードを渡り歩く
EWD 3トレーニングコース#24 GlobalストレージのJavaScript用抽象化-(e) ドキュメントの末端ノードを渡り歩くEWD 3トレーニングコース#24 GlobalストレージのJavaScript用抽象化-(e) ドキュメントの末端ノードを渡り歩く
EWD 3トレーニングコース#24 GlobalストレージのJavaScript用抽象化-(e) ドキュメントの末端ノードを渡り歩く
 
dojo.Patterns
dojo.Patternsdojo.Patterns
dojo.Patterns
 
Go 1.10 Release Party - PDX Go
Go 1.10 Release Party - PDX GoGo 1.10 Release Party - PDX Go
Go 1.10 Release Party - PDX Go
 
Артем Маркушев - JavaScript
Артем Маркушев - JavaScriptАртем Маркушев - JavaScript
Артем Маркушев - JavaScript
 
Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15
 
LISA QooxdooTutorial Slides
LISA QooxdooTutorial SlidesLISA QooxdooTutorial Slides
LISA QooxdooTutorial Slides
 
Groovy a Scripting Language for Java
Groovy a Scripting Language for JavaGroovy a Scripting Language for Java
Groovy a Scripting Language for Java
 
Groovy and Grails talk
Groovy and Grails talkGroovy and Grails talk
Groovy and Grails talk
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and Practice
 
ES6 is Nigh
ES6 is NighES6 is Nigh
ES6 is Nigh
 
20151224-games
20151224-games20151224-games
20151224-games
 
Node js
Node jsNode js
Node js
 
Book
BookBook
Book
 
Groovy on the Shell
Groovy on the ShellGroovy on the Shell
Groovy on the Shell
 
Webinar: Building Your First App in Node.js
Webinar: Building Your First App in Node.jsWebinar: Building Your First App in Node.js
Webinar: Building Your First App in Node.js
 
Webinar: Building Your First App in Node.js
Webinar: Building Your First App in Node.jsWebinar: Building Your First App in Node.js
Webinar: Building Your First App in Node.js
 
Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013
 

Plus de Rob Tweed

Data Persistence as a Language Feature
Data Persistence as a Language FeatureData Persistence as a Language Feature
Data Persistence as a Language FeatureRob Tweed
 
LNUG: Having Your Node.js Cake and Eating It Too
LNUG: Having Your Node.js Cake and Eating It TooLNUG: Having Your Node.js Cake and Eating It Too
LNUG: Having Your Node.js Cake and Eating It TooRob Tweed
 
EWD 3 Training Course Part 45: Using QEWD's Advanced MicroService Functionality
EWD 3 Training Course Part 45: Using QEWD's Advanced MicroService FunctionalityEWD 3 Training Course Part 45: Using QEWD's Advanced MicroService Functionality
EWD 3 Training Course Part 45: Using QEWD's Advanced MicroService FunctionalityRob Tweed
 
EWD 3 Training Course Part 44: Creating MicroServices with QEWD.js
EWD 3 Training Course Part 44: Creating MicroServices with QEWD.jsEWD 3 Training Course Part 44: Creating MicroServices with QEWD.js
EWD 3 Training Course Part 44: Creating MicroServices with QEWD.jsRob Tweed
 
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST Services
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST ServicesEWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST Services
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST ServicesRob Tweed
 
QEWD.js, JSON Web Tokens & MicroServices
QEWD.js, JSON Web Tokens & MicroServicesQEWD.js, JSON Web Tokens & MicroServices
QEWD.js, JSON Web Tokens & MicroServicesRob Tweed
 
QEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It TooQEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It TooRob Tweed
 
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Servicesewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST ServicesRob Tweed
 
qewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle Tierqewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle TierRob Tweed
 
EWD 3 Training Course Part 42: The QEWD Docker Appliance
EWD 3 Training Course Part 42: The QEWD Docker ApplianceEWD 3 Training Course Part 42: The QEWD Docker Appliance
EWD 3 Training Course Part 42: The QEWD Docker ApplianceRob Tweed
 
EWD 3 Training Course Part 5b: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5b: First Steps in Building a QEWD ApplicationEWD 3 Training Course Part 5b: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5b: First Steps in Building a QEWD ApplicationRob Tweed
 
EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...
EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...
EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...Rob Tweed
 
EWD 3 Training Course Part 35: QEWD Session Locking
EWD 3 Training Course Part 35: QEWD Session LockingEWD 3 Training Course Part 35: QEWD Session Locking
EWD 3 Training Course Part 35: QEWD Session LockingRob Tweed
 
EWD 3 Training Course Part 34: QEWD Resilient Mode
EWD 3 Training Course Part 34: QEWD Resilient ModeEWD 3 Training Course Part 34: QEWD Resilient Mode
EWD 3 Training Course Part 34: QEWD Resilient ModeRob Tweed
 
EWD 3 Training Course Part 33: Configuring QEWD to use CORS
EWD 3 Training Course Part 33: Configuring QEWD to use CORSEWD 3 Training Course Part 33: Configuring QEWD to use CORS
EWD 3 Training Course Part 33: Configuring QEWD to use CORSRob Tweed
 
EWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPS
EWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPSEWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPS
EWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPSRob Tweed
 
EWD 3 Training Course Part 29: Running QEWD as a Service
EWD 3 Training Course Part 29: Running QEWD as a ServiceEWD 3 Training Course Part 29: Running QEWD as a Service
EWD 3 Training Course Part 29: Running QEWD as a ServiceRob Tweed
 

Plus de Rob Tweed (18)

QEWD Update
QEWD UpdateQEWD Update
QEWD Update
 
Data Persistence as a Language Feature
Data Persistence as a Language FeatureData Persistence as a Language Feature
Data Persistence as a Language Feature
 
LNUG: Having Your Node.js Cake and Eating It Too
LNUG: Having Your Node.js Cake and Eating It TooLNUG: Having Your Node.js Cake and Eating It Too
LNUG: Having Your Node.js Cake and Eating It Too
 
EWD 3 Training Course Part 45: Using QEWD's Advanced MicroService Functionality
EWD 3 Training Course Part 45: Using QEWD's Advanced MicroService FunctionalityEWD 3 Training Course Part 45: Using QEWD's Advanced MicroService Functionality
EWD 3 Training Course Part 45: Using QEWD's Advanced MicroService Functionality
 
EWD 3 Training Course Part 44: Creating MicroServices with QEWD.js
EWD 3 Training Course Part 44: Creating MicroServices with QEWD.jsEWD 3 Training Course Part 44: Creating MicroServices with QEWD.js
EWD 3 Training Course Part 44: Creating MicroServices with QEWD.js
 
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST Services
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST ServicesEWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST Services
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST Services
 
QEWD.js, JSON Web Tokens & MicroServices
QEWD.js, JSON Web Tokens & MicroServicesQEWD.js, JSON Web Tokens & MicroServices
QEWD.js, JSON Web Tokens & MicroServices
 
QEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It TooQEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It Too
 
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Servicesewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
 
qewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle Tierqewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle Tier
 
EWD 3 Training Course Part 42: The QEWD Docker Appliance
EWD 3 Training Course Part 42: The QEWD Docker ApplianceEWD 3 Training Course Part 42: The QEWD Docker Appliance
EWD 3 Training Course Part 42: The QEWD Docker Appliance
 
EWD 3 Training Course Part 5b: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5b: First Steps in Building a QEWD ApplicationEWD 3 Training Course Part 5b: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5b: First Steps in Building a QEWD Application
 
EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...
EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...
EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...
 
EWD 3 Training Course Part 35: QEWD Session Locking
EWD 3 Training Course Part 35: QEWD Session LockingEWD 3 Training Course Part 35: QEWD Session Locking
EWD 3 Training Course Part 35: QEWD Session Locking
 
EWD 3 Training Course Part 34: QEWD Resilient Mode
EWD 3 Training Course Part 34: QEWD Resilient ModeEWD 3 Training Course Part 34: QEWD Resilient Mode
EWD 3 Training Course Part 34: QEWD Resilient Mode
 
EWD 3 Training Course Part 33: Configuring QEWD to use CORS
EWD 3 Training Course Part 33: Configuring QEWD to use CORSEWD 3 Training Course Part 33: Configuring QEWD to use CORS
EWD 3 Training Course Part 33: Configuring QEWD to use CORS
 
EWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPS
EWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPSEWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPS
EWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPS
 
EWD 3 Training Course Part 29: Running QEWD as a Service
EWD 3 Training Course Part 29: Running QEWD as a ServiceEWD 3 Training Course Part 29: Running QEWD as a Service
EWD 3 Training Course Part 29: Running QEWD as a Service
 

Dernier

SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfIdiosysTechnologies1
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 

Dernier (20)

SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdf
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 

EWD 3 Training Course Part 22: Traversing Documents using DocumentNode Objects

  • 1. Copyright © 2016 M/Gateway Developments Ltd EWD 3 Training Course Part 22 JavaScript Abstraction of Global Storage: (c) Traversing Documents Rob Tweed Director, M/Gateway Developments Ltd Twitter: @rtweed
  • 2. Copyright © 2016 M/Gateway Developments Ltd Traversing a Global Node using the cache.node order function: var node = { global: 'myGlobal', subscripts: ['d', 'e2', '' ] }; var subscript; do { subscript = db.order(node).result; if (subscript !== '') console.log(subscript); } while (subscript !== ''); myGlobal("d","e2","f1")="bar1" myGlobal("d","e2","f2")="bar2" myGlobal("d","e2","f3")="bar3" "f1", "f2", "f3" Traversal the hard way
  • 3. Copyright © 2016 M/Gateway Developments Ltd DocumentNode Object method: forEachChild() Traversal made easy and intuitive
  • 4. Copyright © 2016 M/Gateway Developments Ltd forEachChild() Method • Iterates through all child nodes of a DocumentNode Object – ie through subscripts in underlying Global Storage
  • 5. Copyright © 2016 M/Gateway Developments Ltd forEachChild() Method • Iterates through all child nodes – ie through subscripts in underlying Global Storage – docNode.forEachChild(function(nodeName, childNode) {…});
  • 6. Copyright © 2016 M/Gateway Developments Ltd forEachChild() Method • Iterates through all child nodes – ie through subscripts in underlying Global Storage – docNode.forEachChild( function(nodeName, childNode) {…}) ; – Callback function fires on every iteration • ie every time a child node is found
  • 7. Copyright © 2016 M/Gateway Developments Ltd forEachChild() Method • Iterates through all child nodes – ie through subscripts in underlying Global Storage – docNode.forEachChild(function(nodeName, childNode) {…}); Child node's Node Name (ie subscript)
  • 8. Copyright © 2016 M/Gateway Developments Ltd forEachChild() Method • Iterates through all child nodes – ie through subscripts in underlying Global Storage – docNode.forEachChild(function(nodeName, childNode) {…}); Child node's Node Name (ie subscript) DocumentNode object representing the Child node
  • 9. Copyright © 2016 M/Gateway Developments Ltd myDoc("d","e2","f1")="bar1" myDoc("d","e2","f2")="bar2" myDoc("d","e2","f3")="bar3" var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']); forEachChild() Method
  • 10. Copyright © 2016 M/Gateway Developments Ltd myDoc("d","e2","f1")="bar1" myDoc("d","e2","f2")="bar2" myDoc("d","e2","f3")="bar3" var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']); e2Node.forEachChild(function(nodeName) { // do something with the node name / subscript for this iteration }); forEachChild() Method
  • 11. Copyright © 2016 M/Gateway Developments Ltd myDoc("d","e2","f1")="bar1" myDoc("d","e2","f2")="bar2" myDoc("d","e2","f3")="bar3" var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']); e2Node.forEachChild(function(nodeName) { // 1st iteration nodeName === 'f1’ }); forEachChild() Method
  • 12. Copyright © 2016 M/Gateway Developments Ltd myDoc("d","e2","f1")="bar1" myDoc("d","e2","f2")="bar2" myDoc("d","e2","f3")="bar3" var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']); e2Node.forEachChild(function(nodeName) { // 2nd iteration nodeName === 'f2’ }); forEachChild() Method
  • 13. Copyright © 2016 M/Gateway Developments Ltd myDoc("d","e2","f1")="bar1" myDoc("d","e2","f2")="bar2" myDoc("d","e2","f3")="bar3" var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']); e2Node.forEachChild(function(nodeName) { // 3rd iteration nodeName === 'f3’ }); forEachChild() Method
  • 14. Copyright © 2016 M/Gateway Developments Ltd myDoc("d","e2","f1")="bar1" myDoc("d","e2","f2")="bar2" myDoc("d","e2","f3")="bar3" var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']); e2Node.forEachChild(function(nodeName) { console.log(nodeName); }); forEachChild() Method f1 f2 f3
  • 15. Copyright © 2016 M/Gateway Developments Ltd myDoc("d","e2","f1")="bar1" myDoc("d","e2","f2")="bar2" myDoc("d","e2","f3")="bar3" var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']); e2Node.forEachChild(function(nodeName, childNode) { // do something with the childNode DocumentNode object for this iteration }); forEachChild() Method
  • 16. Copyright © 2016 M/Gateway Developments Ltd myDoc("d","e2","f1")="bar1" myDoc("d","e2","f2")="bar2" myDoc("d","e2","f3")="bar3" var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']); e2Node.forEachChild(function(nodeName, childNode) { // do something with the childNode DocumentNode object for this iteration }); forEachChild() Method
  • 17. Copyright © 2016 M/Gateway Developments Ltd myDoc("d","e2","f1")="bar1" myDoc("d","e2","f2")="bar2" myDoc("d","e2","f3")="bar3" var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']); e2Node.forEachChild(function(nodeName, childNode) { // 1st iteration }); forEachChild() Method
  • 18. Copyright © 2016 M/Gateway Developments Ltd myDoc("d","e2","f1")="bar1" myDoc("d","e2","f2")="bar2" myDoc("d","e2","f3")="bar3" var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']); e2Node.forEachChild(function(nodeName, childNode) { // 2nd iteration }); forEachChild() Method
  • 19. Copyright © 2016 M/Gateway Developments Ltd myDoc("d","e2","f1")="bar1" myDoc("d","e2","f2")="bar2" myDoc("d","e2","f3")="bar3" var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']); e2Node.forEachChild(function(nodeName, childNode) { // 3rd iteration }); forEachChild() Method
  • 20. Copyright © 2016 M/Gateway Developments Ltd myDoc("d","e2","f1")="bar1" myDoc("d","e2","f2")="bar2" myDoc("d","e2","f3")="bar3" var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']); e2Node.forEachChild(function(nodeName, childNode) { // do something with the childNode DocumentNode object for this iteration }); forEachChild() Method childNode is a DocumentNode Object, so has all the usual properties and methods
  • 21. Copyright © 2016 M/Gateway Developments Ltd myDoc("d","e2","f1")="bar1" myDoc("d","e2","f2")="bar2" myDoc("d","e2","f3")="bar3" var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']); e2Node.forEachChild(function(nodeName, childNode) { console.log(childNode.value); }); forEachChild() Method bar1 bar2 bar3
  • 22. Copyright © 2016 M/Gateway Developments Ltd forEachChild() Method • Iterates through all child nodes – docNode.forEachChild(function(nodeName, childNode) {…}); • Note that because ewd-document-store uses synchronous versions of underlying cache.node APIs, the call-backs fire in synchronous order • Additionally, the forEachChild() function will wait until completion before next command executes • This greatly simplifies its use!
  • 23. Copyright © 2016 M/Gateway Developments Ltd myDoc("d","e2","f1")="bar1" myDoc("d","e2","f2")="bar2" myDoc("d","e2","f3")="bar3" var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']); console.log('start…'); e2Node.forEachChild(function(nodeName, childNode) { console.log(childNode.value); }); console.log('end'); Example start… bar1 bar2 bar3 end
  • 24. Copyright © 2016 M/Gateway Developments Ltd myDoc("d","e2","f1")="bar1" myDoc("d","e2","f2")="bar2" myDoc("d","e2","f3")="bar3" var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']); console.log('start…'); e2Node.forEachChild(function(nodeName, childNode) { console.log(childNode.value); }); console.log('end'); Example This can be done safely because QEWD uses the master / worker architecture of ewd-qoper8 where your handler functions run on their own in an isolated process
  • 25. Copyright © 2016 M/Gateway Developments Ltd myDoc("d","e2","f1")="bar1" myDoc("d","e2","f2")="bar2" myDoc("d","e2","f3")="bar3" var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']); e2Node.forEachChild(function(nodeName, childNode) { // if callback function returns true (exit boolean flag), it stops the loop }); Stopping forEachChild() Early
  • 26. Copyright © 2016 M/Gateway Developments Ltd myDoc("d","e2","f1")="bar1" myDoc("d","e2","f2")="bar2" myDoc("d","e2","f3")="bar3" var e2Node = new this.documentStore.DocumentNode('myDoc', ['d', e2']); var count = 0; e2Node.forEachChild(function(nodeName, childNode) { count++; if (count === 3) return true; console.log(childNode.value); }); Stopping forEachChild() Early bar1 bar2
  • 27. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" Nested forEachChild() loops Traversal of all nodes and subnodes
  • 28. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" Nested forEachChild() loops Traversal of all nodes and subnodes
  • 29. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" Nested forEachChild() loops Traversal of all nodes and subnodes
  • 30. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" Nested forEachChild() loops Traversal of all nodes and subnodes
  • 31. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" Nested forEachChild() loops Traversal of all nodes and subnodes
  • 32. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" Nested forEachChild() loops Traversal of all nodes and subnodes
  • 33. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" Nested forEachChild() loops Traversal of all nodes and subnodes
  • 34. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" Nested forEachChild() loops Traversal of all nodes and subnodes
  • 35. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" Nested forEachChild() loops var dNode = new this.documentStore.DocumentNode('myDoc', ['d']); dNode.forEachChild(function(nodeName, childNode) { // do something with child node });
  • 36. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" Nested forEachChild() loops var dNode = new this.documentStore.DocumentNode('myDoc', ['d']); dNode.forEachChild(function(nodeName, childNode) { // 1st iteration });
  • 37. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" Nested forEachChild() loops var dNode = new this.documentStore.DocumentNode('myDoc', ['d']); dNode.forEachChild(function(nodeName, childNode) { // 1st iteration childNode.forEachChild(function(nodeName, childNode) { // do something with grand-child node }); });
  • 38. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" Nested forEachChild() loops var dNode = new this.documentStore.DocumentNode('myDoc', ['d']); dNode.forEachChild(function(nodeName, childNode) { // 1st iteration childNode.forEachChild(function(nodeName, childNode) { // 1st iteration }); });
  • 39. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" Nested forEachChild() loops var dNode = new this.documentStore.DocumentNode('myDoc', ['d']); dNode.forEachChild(function(nodeName, childNode) { console.log(nodeName); childNode.forEachChild(function(nodeName, childNode) { console.log(childNode.value); }); });
  • 40. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" Nested forEachChild() loops var dNode = new this.documentStore.DocumentNode('myDoc', ['d']); dNode.forEachChild(function(nodeName, childNode) { console.log(nodeName); childNode.forEachChild(function(nodeName, childNode) { console.log(childNode.value); }); }); e1 bar1a bar2a e2 bar1b bar2b bar3b
  • 41. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" Nest as deeply as you wish var doc = new this.documentStore.DocumentNode('myDoc'); doc.forEachChild(function(nodeName, childNode) { childNode.forEachChild(function(nodeName, childNode) { childNode.forEachChild(function(nodeName, childNode) { // do something with innermost node }); }); });
  • 42. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" forEachChild() in reverse order?
  • 43. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" forEachChild() in reverse order var myDoc = new this.documentStore.DocumentNode('myDoc', [ ]); myDoc.forEachChild( {direction: 'reverse'} , function(nodeName, childNode) { console.log(nodeName); }); Use optional control object argument
  • 44. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" forEachChild() in reverse order var myDoc = new this.documentStore.DocumentNode('myDoc', [ ]); myDoc.forEachChild( {direction: 'reverse'} , function(nodeName, childNode) { console.log(nodeName); }); d b a
  • 45. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" Navigating to Specific Nodes
  • 46. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" Navigating to Specific Nodes
  • 47. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" Navigating to Specific Nodes var myDoc = new this.documentStore.DocumentNode('myDoc');
  • 48. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" Navigating to Specific Nodes var myDoc = new this.documentStore.DocumentNode('myDoc'); console.log(myDoc.firstChild.value); // 123 firstChild returns a DocumentNode object
  • 49. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" Navigating to Specific Nodes var myDoc = new this.documentStore.DocumentNode('myDoc'); console.log(myDoc.firstChild.value); // 123 console.log(myDoc.firstChild.name); // a firstChild returns a DocumentNode object
  • 50. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" Navigating to Specific Nodes var myDoc = new this.documentStore.DocumentNode('myDoc'); console.log(myDoc.lastChild.name); // d lastChild also returns a DocumentNode object
  • 51. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" Navigating to Specific Nodes var myDoc = new this.documentStore.DocumentNode('myDoc'); console.log(myDoc.firstChild.nextSibling.name); // b nextSibling returns a DocumentNode object
  • 52. Copyright © 2016 M/Gateway Developments Ltd myDoc("a")=123 myDoc("b","c1")="foo" myDoc("b","c2")="foo2" myDoc("d","e1","f1a")="bar1a" myDoc("d","e1","f2a")="bar2a" myDoc("d","e2","f1b")="bar1b" myDoc("d","e2","f2b")="bar2b" myDoc("d","e2","f3b")="bar3b" Navigating to Specific Nodes var myDoc = new this.documentStore.DocumentNode('myDoc'); console.log(myDoc.lastChild.previousSibling.name); // b previousSibling returns a DocumentNode object