ORM over REST in 
NodeJS 
prashant@jombay.com
Connect with me here 
@prcongithub 
@prchaudhari_007 
@prashanr.chaudhari89 
(prashan‘r’ is correct)
NodeJS newbie 
Tried hands on ExpressJS, Socket.IO 
Understands basics of a RESTful applications 
with NodeJS 
Migrated RoR based Front-End to NodeJS
Service Oriented Architecture 
API(REST) 
(JRuby on Rails) 
Database 
Front-End 
(NodeJS) 
Front-End 
(NodeJS) 
Front-End 
(RoR) 
Redis 
Browser 
HER
Accessing RESTful Resources 
How do we do it in now? 
Using HTTP? 
http.request(params,callback);
How about this? 
User.where(name: “Prashant”) 
HTTP GET http://api.example.com/users?name=Prashant 
===> [{id: 1, name: “Prashant”,email: “prashant@jombay. 
com”}] 
Note.where(user_id: 1) 
### HTTP GET http://api.example.com/notes?user_id=1 
===> [{ id: 1, content: “JSFoo2014”, user_id: 1 }]
And probably this 
var u = new User(); 
u.name = “Prashant” 
u.save 
# HTTP POST http://api.yourdomain.com/users 
payload: { name: “Prashant” } 
===> {id: 1, name: “Prashant”}
Introducing Node-Vger 
Inspired by “HER” (Not some girl) 
https://github.com/remiprev/her 
Novice attempt to achieve something like this in 
NodeJS 
https://github.com/prcongithub/node-vger 
Test App: https://github.com/prcongithub/node-vger- 
test-app
Challenges 
Managing Authorization and Authentication 
Active Relation like scopes 
Dealing with associations 
Support for Middlewares
Thank You! 
Get in touch!

ORM over REST in NodeJS

  • 1.
    ORM over RESTin NodeJS prashant@jombay.com
  • 2.
    Connect with mehere @prcongithub @prchaudhari_007 @prashanr.chaudhari89 (prashan‘r’ is correct)
  • 3.
    NodeJS newbie Triedhands on ExpressJS, Socket.IO Understands basics of a RESTful applications with NodeJS Migrated RoR based Front-End to NodeJS
  • 4.
    Service Oriented Architecture API(REST) (JRuby on Rails) Database Front-End (NodeJS) Front-End (NodeJS) Front-End (RoR) Redis Browser HER
  • 5.
    Accessing RESTful Resources How do we do it in now? Using HTTP? http.request(params,callback);
  • 6.
    How about this? User.where(name: “Prashant”) HTTP GET http://api.example.com/users?name=Prashant ===> [{id: 1, name: “Prashant”,email: “prashant@jombay. com”}] Note.where(user_id: 1) ### HTTP GET http://api.example.com/notes?user_id=1 ===> [{ id: 1, content: “JSFoo2014”, user_id: 1 }]
  • 7.
    And probably this var u = new User(); u.name = “Prashant” u.save # HTTP POST http://api.yourdomain.com/users payload: { name: “Prashant” } ===> {id: 1, name: “Prashant”}
  • 8.
    Introducing Node-Vger Inspiredby “HER” (Not some girl) https://github.com/remiprev/her Novice attempt to achieve something like this in NodeJS https://github.com/prcongithub/node-vger Test App: https://github.com/prcongithub/node-vger- test-app
  • 9.
    Challenges Managing Authorizationand Authentication Active Relation like scopes Dealing with associations Support for Middlewares
  • 10.
    Thank You! Getin touch!