domnode - node's evented API for HTML5
domnode - node point browser
still alpha/work in progress
you want to learn node but you're stuck on the client side? no problemo! domnode uses javascript verbatim and unchanged directly from node to give you a way to elegantly stream data in and out of your web app.
philosophy
node.js describes itself as a framework for dealing with "evented i/o" and traditionally runs on the server. clients, however, are just a i/o bound as servers (ajax requests, file uploads, indexeddb/websql, etc.) and can benefit from the nice APIs that node has developed to solve these problems in a server environment.
domnode uses a few key javascript libraries from node (Stream, Util, etc via browserify) and adds some new syntax for dealing with the DOM and other HTML5 APIs.
the major goal of this library is to avoid reinventing the wheel when it comes to problems that are done well in node but aren't done well in most client side javascript libraries. since domnode uses node's source code verbatim you get to use the node documentation as well as the multitude of node modules and related information floating around on the internets to look up how these things work
components
- XHR
- websockets
- FileReader
- web workers
- webRTC/getUserMedia
- geolocation watchPosition
- DOM element events
- server-sent events (SSE)
- data channel (webRTC)
- sockets (like websockets but with cross browser fallbacks)
- WebGL Textures (WIP)
- Mouse Drag
- Color Picker
- PNG Chunks (works in browser if you shim in a good buffer library)
todo/works in progress:
- https://github.com/CrabDude/fs-browserify
- indexeddb/pouchdb
- mouse/touch events
- setInterval
- web audio
- device orientation
to generate domnode-bundle.js using browserify:
browserify -r events -r buffer -r stream -r util -o domnode-bundle.js
MIT LICENSE