Your Code
Your Code
Class Foo
Class Bar
Your Code
Class Foo
Foo.X()
Class Bar
Bar.A()
Your Code
Class Foo
Foo.X()
Foo._Y()
Class Bar
Bar.A()
Bar._B()
Your Code
Class Foo
Class Bar
Foo.X()
Foo._Y()
Foo._Z()
Bar.A()
Bar._B()
Bar._C()
Your Code
Class Foo
Class Bar
Foo.X()
Foo._Y()
Foo._Z()
Bar.A()
Bar._B()
Bar._C()
Private methods used by Foo.X()
Private methods used by Bar.A()
Your Code
Class Foo
Class Bar
Foo.X()
Foo._Y()
Foo._Z()
Bar.A()
Bar._B()
Bar._C()
Your Code
Class Foo
Class Bar
Foo.X()
Foo._Y()
Foo._Z()
Bar.A()
Bar._B()
Bar._C()
Your Code
Class Foo
Class Bar
Foo.X()
Foo._Y()
Foo._Z()
Bar.A()
Bar._B()
Bar._C()
var Foo = require('./YourCode/Foo.js');
var Bar = require('./YourCode/Bar.js');
let f = new Foo();
let b = new Bar();
f.X();
b.A();
// So much win
Your Code
Class Foo
Class Bar
Foo.X()
Foo._Y()
Foo._Z()
Bar.A()
Bar._B()
Bar._C()
Your Code
Class Foo
Class Bar
Foo.X()
Foo._Y()
Foo._Z()
Bar.A()
Bar._B()
Bar._C()
Your Code
Class Foo
Class Bar
Foo.X()
Foo._Y()
Foo._Z()
Bar.A()
Bar._B()
Bar._C()
Your Code
Class Foo
Class Bar
Foo.X()
Foo._Y()
Foo._Z()
Bar.A()
Bar._B()
Bar._C()
Your Code
Class Foo
Class Bar
Foo.X()
Foo._Y()
Foo._Z()
Bar.A()
Bar._B()
Bar._C()
Your Code
Class Foo
Class Bar
Foo.X()
Foo._Y()
Foo._Z()
Bar.A()
Bar._B()
Bar._C()
API
Foo.X()
Bar.A()
Your Code
Class Foo
Class Bar
Foo.X()
Foo._Y()
Foo._Z()
Bar.A()
Bar._B()
Bar._C()
API
Foo.X()
Bar.A()
Your Code
Class Foo
Class Bar
Foo.X()
Foo._Y()
Foo._Z()
Bar.A()
Bar._B()
Bar._C()
JSON
JSON
var YourCodeAPI = require('./YourCode/API.js');
let api = new YourCodeAPI();
api.Foo.X();
api.Bar.Y();
// So much win
var YourCodeAPI = require('./YourCode/API.js');
let api = new YourCodeAPI();
api.Foo.X();
api.Bar.Y();
// So much win
var YourCodeAPI = require('./YourCode/API.js');
let api = new YourCodeAPI();
api.Foo.X();
api.Bar.Y();
// So much win
API
Foo.X()
Bar.A()
Your Code
Class Foo
Class Bar
Foo.X()
Foo._Y()
Foo._Z()
Bar.A()
Bar._B()
Bar._C()
JSON
JSON
HTTP Requests
API
Foo.X()
Bar.A()
Your Code
Class Foo
Class Bar
Foo.X()
Foo._Y()
Foo._Z()
Bar.A()
Bar._B()
Bar._C()
JSON
JSON
HTTP Requests
Server
Req
Res
API
Foo.X()
Bar.A()
Your Code
Class Foo
Class Bar
Foo.X()
Foo._Y()
Foo._Z()
Bar.A()
Bar._B()
Bar._C()
JSON
JSON
HTTP Requests
Server
Req
Res
API
Foo.X()
Bar.A()
Your Code
Class Foo
Class Bar
Foo.X()
Foo._Y()
Foo._Z()
Bar.A()
Bar._B()
Bar._C()
JSON
JSON
HTTP Requests
Server
Req
Res
API
Foo.X()
Bar.A()
Your Code
Class Foo
Class Bar
Foo.X()
Foo._Y()
Foo._Z()
Bar.A()
Bar._B()
Bar._C()
JSON
JSON
HTTP Requests
Server
Req
Res
API
Foo.X()
Bar.A()
Your Code
Class Foo
Class Bar
Foo.X()
Foo._Y()
Foo._Z()
Bar.A()
Bar._B()
Bar._C()
JSON
JSON
HTTP Requests
Server
Req
Res
Endpoints
API
Foo.X()
Bar.A()
Your Code
Class Foo
Class Bar
Foo.X()
Foo._Y()
Foo._Z()
Bar.A()
Bar._B()
Bar._C()
JSON
JSON
HTTP Requests
Server
Req
Res
Endpoints
/bar
/foo
API
Foo.X()
Bar.A()
Your Code
Class Foo
Class Bar
Foo.X()
Foo._Y()
Foo._Z()
Bar.A()
Bar._B()
Bar._C()
JSON
JSON
HTTP Requests
Server
Req
Res
Endpoints
/bar
/foo
that.get("/bar", Bar.A())
API
Foo.X()
Bar.A()
Your Code
Class Foo
Class Bar
Foo.X()
Foo._Y()
Foo._Z()
Bar.A()
Bar._B()
Bar._C()
JSON
JSON
HTTP Requests
Server
Req
Res
Endpoints
/bar
/foo
that.get("/bar", Bar.A())
that.get("/foo", Foo.X())
API
Foo.X()
Bar.A()
Your Code
Class Foo
Class Bar
Foo.X()
Foo._Y()
Foo._Z()
Bar.A()
Bar._B()
Bar._C()
JSON
JSON
HTTP Requests
Server
Req
Res
Endpoints
/bar
/foo
Incoming request (JSON wrapped in HTTP)
Incoming request (JSON wrapped in HTTP)
Server forwards to a endpoint
/foo
/bar
Incoming request (JSON wrapped in HTTP)
Server forwards to a endpoint
/foo
/bar
Incoming request (JSON wrapped in HTTP)
Server forwards to a endpoint
/foo
/bar
Server calls the method (Server.Foo.X())
Incoming request (JSON wrapped in HTTP)
Server forwards to a endpoint
/foo
/bar
Server calls the method (Server.Foo.X())
Foo.X() processes the request and return response
Core logic
e.g: addDataset()
Core logic
e.g: addDataset()
Server method to handle Req/Res
e.g: Server.Dataset()
Core logic
e.g: addDataset()
Server method to handle Req/Res
Endpoint that will call a server method to handle the request
e.g: that.server.put("/dataset/:id", Server.dataset())
e.g: Server.Dataset()