The JavaScript blog.


frameworks libraries ajax modules jsonp ender

Ender Roundup: Ender, Qwery, Sel, Reqwest, Ender Twitter Bootstrap, CalEnder

Posted on .

Welcome to the first [Ender](http://ender.no.de/) roundup! With more developers releasing Ender-compatible projects I thought it would be good to keep everyone updated with what's available for your Ender builds. You can send your Ender-related projects and articles in for review through our [contact form](/contact.html) or [@dailyjs](http://twitter.com/dailyjs).


The core Ender build tool has been
updated to version 0.8 for the release of Node 0.6. A minor change was
required to properly support the new version of Node; anyone using Node
0.6 should upgrade Ender with npm update ender -g.


Qwery (NPM / Ender: qwery), by Dustin Diaz, is Ender's default selector engine, it's small and very fast and you get it if you build with The
, Ender's official starter-pack.

Qwery has seen a flurry of activity recently, culminating in a bump to
version 3.1. Qwery now has much improved support for older browsers and
is better able to handle queries on detached fragments, queries across
frames and other quirky features normally found in the likes of
Sizzle while remaining super quick and small.

Qwery has no external dependencies and can be used as a stand-alone tool
as well as Ender's selector engine.


Sel (NPM / Ender: sel), by Andrew McCollum, is an alternative selector engine for Qwery. Beautifully written in CoffeeScript, Sel aims
to be fast, small and clean. Some fixes for IE8 bring Sel up to version

Sel has a single dependency, Andrew's
ES5-Basic (NPM / Ender: es5-basic), a shim to make older browsers more ECMAScript 5
compatible. It can be used as a stand-alone tool as well as Ender's
selector engine.


Reqwest (NPM / Ender: reqwest), by Dustin Diaz, is the module
most Ender users include for AJAX functionality.

The recent release of version 0.3.3 brings improved JSONP support and
largely rewritten serialization functionality, including a new
.toQueryString() method.

Forms, groups or individual elements can be serialized in a few
different ways:

// returns query string -> x=y&...
// returns an object representation -> { x: y, ... }
// returns array name/value pairs -> [ { name: x, value: y}, ... ]
// for backward compatibility
    foo: 'bar'
  , baz: 'thunk'
// returns query string -> foo=bar&baz=thunk

Leading to more interesting uses:

$('#myform input[name=myradios]').serialize({type:'map'})['myradios']
// get the selected value
// turn any arbitrary set of form elements into a query string

Reqwest has no external dependencies and can be used as a stand-alone
tool as well as within an Ender build (giving you \$.ajax()
and the serialization methods).

Ender Twitter Bootstrap

Ender Twitter Bootstrap (NPM / Ender: ender-twitter-bootstrap) is a newly released, unofficial
port of the JavaScript components from Twitter's wildly popular
Bootstrap (currently the third most watched project on GitHub).

The Ender port aims to provide support for Bootstrap without the need to
compile jQuery in your Ender build. A jQuery-free live copy of the
Bootstrap JavaScript page
(original, jQuery version here) demonstrates
Modals, Dropdown, ScrollSpy, Buttons, Tabs, Twipsy, Popover and Alerts.

Ender Twitter Bootstrap depends on The

(Qwery, Bonzo, Bean, domReady) plus Bowser.


CalEnder (NPM / Ender: calender) is a basic, themeable calendar datepicker for Ender.
After surveying the vast JavaScript datepicker landscape, Dustin
decided that yet another one was required,
but this time, just for Ender.

CalEnder depends on The Jeesh
(Qwery, Bonzo, Bean, domReady).


apps webgl jsonp

Learning Three.js, FlyJSONP, HTML5Sticky

Posted on .

Learning Three.js

Learning Three.js by Jerome Etienne is a new blog full of tutorials about Mr.doob's
. There's already quite a
few tutorials, with one covering drawing a
skyboxes and

If you'd like to learn WebGL but you're afraid it's only for genius mind
wizards, then try reading right from the

where Jerome demonstrates how to install Three.js, then follow on to the
cube tutorial.
And if you make something cool, send it to us.


I noticed that TJ is still actively working on
superagent which is shaping up to be a great all-purpose browser-friendly network library.
Meanwhile, DailyJS reader Abdulrahman Alotaiba sent in
FlyJSONP (GitHub: alotaiba / FlyJSONP, License: GNU GPLv3).
This library supports cross-domain GET and
POST (passed through

The author's example demonstrates cross-domain POST:

  url: 'http://storify.com/story/new',
  parameters: {
    username: 'your-username',
    api_key: 'secret-api-key',
    title: 'FlyJSONP',
    description: 'Testing it out'
  success: function(data) {

By using the YQL service, FlyJSONP has a small footprint and no
dependencies. And you can try it out at the FlyJSONP demo
. And it's
good to see that the author has included QUnit tests!


HTML5Sticky (demo, License: MIT) is actually a full-blown application by Sarfraz Ahmed that uses HTML5 trickery (local storage, CSS3, Google Web
) to create a dynamic dashboard of
sticky notes. He's used Modernizr so it
supports slightly older browsers like IE8 and Firefox 3.5.


documentation jsonp network

getImageData, janky.post, dox

Posted on .


\$.getImageData by Max Novakovic provides pixel level access to images from any domain. It uses
a server-side component with JSONP requests that base64 encodes the
images and returns them to the client for further Canvas processing.

There are PHP, Python, and Node examples in the
getImageData/server-examples directory

Max told me that David Desandro has written a plugin based on this
project called Close
(which we've
featured previously on DailyJS).


janky.post by Thomas Rampelberg is a library that aims to get around cross-domain request
limitations, as well as JSONP limitations. For example:

janky({ url: "http://example.com:8080/api", 
        data: { foo: 'bar', baz: [1,2,3] }, 
        success: function(resp) {
          console.log('server responded with: ' + resp);
        error: function() {
          console.log('error =(');

That example basically replicates a JSONP result (but you'll notice that there's actually errors that occur, no firing requests into the ether)

There's a janky.post demo and
janky.post documentation. There are currently Tornado and Google App Engine servers.

Dox Updates

TJ Holowaychuk updated dox to
0.0.4, which includes a few fixes and a small patch I put in there so an
introduction markdown file can be included instead of using the
--desc option.

I think dox is a cool little project, so I encourage you to try it out
and submit your own tweaks and improvements. GitHub makes open source
collaboration easy (fork, clone, push, pull request), so you've got no
excuses not to help out!


server node rails django polling jsonp

Node Roundup: Node 0.3.5, express-on-railway, drty, NodeFu, maptail, Minotaur

Posted on .

Welcome to the Node Roundup. Send in your apps and libraries using our
contact form or @dailyjs.

Please prepare yourself for a rapid-fire burst of Node news.

Node 0.3.5 Released

Node 0.3.5
has been released. The documentation is available at
docs/v0.3.5/api and the source is here: node-v0.3.5.tar.gz.

See the announcement for the full list of updates.


express-on-railway brings Rails-like features to Express. There's a command line tool,
railway, for creating new projects with a very familiar
layout. RESTful routes can be easily set up, and there's a neat little
model system based on Redis.

It seems like an ambitious project, and if you're familiar with the
style of Rails it should be pretty easy to pick up.


drty is a Django port for Node. It currently works with MySQL, and has routing, middleware, views, models,
sessions, and Django templating support. There's a blog
in the
example directory.

I saw drty mentioned on Ryan Dahl's Twitter account: @ryah: This looks


I've been looking at NodeFu, a Node-oriented
hosting platform. It's npm-friendly and deploys with git (like Heroku
and Joyent's Node SmartMachines). It's currently free to try out, just
follow the instructions on the site: NodeFu REST

We do not currently have a full featured website as we are focusing on the API and the service. We are currently running Node v.0.3.5 and updating all NPM modules on a weekly basis. Git is required to push your updates to Nodefu. All we ask is that you be a good steward of our service and community.


maptail by George Stagas is a Node app that can plot IP address accesses on a map. There's a demo at
live.stagas.com. It has cool graphics, which is of course why I featured it, but it also seems to be handling Hacker
News traffic very well.


Minotaur (MIT X11 License) by Tomi is a long poll server that uses JSONP for communication. It comes
with a simple chat client/server example app. The Node dependencies are
fairly minimal: node-uuid, and cookie-node. The client-side uses jQuery
and jquery-jsonp.

If you're interested in seeing how the client might poll, take a look at
minitaur.js. The author has written a post about the project here: Tales of the
minotaur or long polling with