News for hackers. Stuff that matters.
Re:HTML.js – Befriend the DOM by grey-area on Tuesday August 13, 2013 @08:44AM (#6205315)
It doesn't wrap and extend dom elements, just finds them, so there's no $(this) etc just to be sure all your objects behave the same way, no .attr('id') to get attributes etc. It also has a nicer syntax I think, like the idea of doing HTML.body.ul.li.a So it looks interesting, though I wish they had included Ajax.

This doesn't do everything jquery does, and is not intended as a drop-in replacement, more as a different way of doing things which is simpler, smaller and more intuitive.

Re:HTML.js – Befriend the DOM by maxhowell on Tuesday August 13, 2013 @09:22AM (#6205510)
What does Hacker News recommend as a standalone AJAX solution nowadays?
Re:HTML.js – Befriend the DOM by jenius on Tuesday August 13, 2013 @09:52AM (#6205662)
I've used superagent (https://github.com/visionmedia/superagent) a number of times and it's wonderful, but beware if you're trying to make it work with old IE.
Re:HTML.js – Befriend the DOM by prezjordan on Tuesday August 13, 2013 @12:31PM (#6206700)
Geez, has he made everything?
Re:HTML.js – Befriend the DOM by phpnode on Tuesday August 13, 2013 @01:56PM (#6207146)
yes, he has. as has substack. basically everything.

but part of the reason they are so prolific is that they focus on very small, single use modules that do one thing well. So they have hundreds of repos, but many of them are 10 - 15 lines of code.

Re:HTML.js – Befriend the DOM by prezjordan on Wednesday August 14, 2013 @12:39AM (#6209956)
That may be one reason, but the guy's responsible for Express, Jade, Mocha, Commander, and many others. I honestly thought visionmedia was a company until a few months ago.
Re:HTML.js – Befriend the DOM by phpnode on Wednesday August 14, 2013 @01:30PM (#6212923)
i did too, the sheer volume of useful code he ships is incredible.
Re:HTML.js – Befriend the DOM by grey-area on Tuesday August 13, 2013 @09:31AM (#6205561)
Not sure if it is a complete replacement, but I needed to remove a dependency on jquery recently and used this code:

https://github.com/inkling/backbone.native/blob/master/backb...

The $.ajax function was all I needed.

Re:HTML.js – Befriend the DOM by jonahx on Tuesday August 13, 2013 @09:34AM (#6205577)
Just using the native XMLHttpRequest has pretty good support: http://en.wikipedia.org/wiki/XMLHttpRequest#History_and_supp...
Re:HTML.js – Befriend the DOM by 2mur on Tuesday August 13, 2013 @11:15AM (#6206214)
If you are a node.js user, these libraries have familiar APIs:

https://github.com/substack/hyperquest

https://github.com/iriscouch/browser-request

Re:HTML.js – Befriend the DOM by STRML on Tuesday August 13, 2013 @09:53AM (#6205668)
The node-inspired `http-browserify` is my favorite; really nice, sane syntax for doing ajax requests that you can mix with client-side streams and transforms to do really advanced things with code that is clear and readable. Of course you have to use browserify to use it, but it's worth looking into.
Re:HTML.js – Befriend the DOM by clarkdave on Tuesday August 13, 2013 @10:34AM (#6205947)
Reqwest (https://github.com/ded/reqwest) has worked well for me, and has EnderJS support too. The API is similar, but not identical, to jQuery.ajax.