Cappuccino (with Objective-J). One of those, 'so batsh#t crazy, it's brilliant' things. Note they are one of those that make a distinction between a library and framework.
Bacon.js: https://github.com/raimohanska/bacon.js -- functional reactive programming in javascript. It's another way out of callback hell when doing UI work.
Amazingly, work on Flapjax dates all the way back to 2006! Let that sink in ... the point is that it was way ahead of its time, and with all due respect to bacon.js, I think Flapjax is still in in a league of its own with respect to how it's implemented.
I studied the internals for months back in 2010, and that learning experience was a huge catalyst in pushing me toward functional programming, Clojure and ClojureScript.
The reason Flapjax never quite caught on was in part, I think, that it was so ahead of its time. And also that its internals, while well engineered, are much harder to understand than those of jQuery and other popular libraries. It's harder to use something truly effectively if you can't quite wrap your head around how it works, and understanding Flapjax certainly takes dedication.
I'm a huge fan of Enyo (http://enyojs.com). It's stupid-easy to get a native-feeling app running that works across (nearly) every modern device. Mostly, I love its UI components (which are expanded by the associated Onyx library), which means I have less lines of code to write -- which is always better.
PouchDB is a full reimplementation of CouchDB inside the browser (using browser storage), you can build applications that work offline then sync your data with 'the cloud'
TypeScript. Fastest JS parser I've seen (at least in JS compared to coffeescript, esprima, narcissus, etc), bootstrapped in its own language, great type checker/inferencer, easy to follow codebase.
d3 is an amazing library, both for the beauty of the framework API itself, and for how it can be used not just for SVG manipulation, but for general DOM manipulation itself. The power of d3.js is just beautiful.
"Sugar is a Javascript library that extends native objects with helpful methods. It is designed to be intuitive, unobtrusive, and let you do more with less code."
I know this is a crap answer to this question, but for me what is "cool" is what can easily do things that I think are awesome. For me, that's Angular.js.
I like TinySort which is a no-frills jQuery plugin to sort HTML elements. Great for data tables -> http://tinysort.sjeiti.com/
Speaking of data tables, I wrote a little function to make table headers sticky so they stay at the top of the viewport as you scroll down a large table. https://github.com/kingkool68/stickyHeader No options, just include on the page, add a class of stickyHeader on the table and you're done.
I discovered underscore.js recently, I really like it as well. After learning a little functional programming, it is cool to see things like map, contains, select, etc. brought into JavaScript in an easy-to-use way.
Rohan,
Pretty difficult to parse "coolest JS library". The "42" for that question came up as "it depends for what" ;-)
Anyway, I use this site as a quick reference to see what is new in JS world. www.functionn.in
The author seems to be pretty meticulous in his updates, so there's a lot of interesting libraries. Seems like a labour of love for him. (P.S: Thanks, Hirvesh)
There's also Hakim who comes up with some interesting stuff from time to time www.hakim.se
Even though it's not "cool" in the sense that it's very low level and doesn't do fancy UI stuff, my asynchronous code has become significantly cleaner and easier to maintain through using promises rather than having callback pyramids. The ability to wait for a number of promises to resolve before firing the next makes life so much easier too.
Another library that tries to make async code much cleaner is async.js (https://github.com/eligrey/async.js#readme). It uses yield and generators to abstract away the callback jungle.
For example, you can easily condense tens of lines of event code into a single `event = yield document.next("click")`
I think it was because of the lack of documentation. Back then prototype had none and jQuery had a lot. They had a rich site and prototype had a single spartan page.
This is not what I remember. I even have a printout of the full prototype doc hidden somewhere, it had clean and straightforward explanations for all the API.
Scriptaculous, built upon prototype.js, was nice too.
My guess is that jQuery targeted and solved a problem that was bigger for a broader base of people doing JavaScript development: the DOM API (and some other browser APIs) was both pretty awkward and inconsistent.
Prototype.js seemed to be targeting the problem of providing a familiar class system, standardizing some functional features, and some utility functions. It was something else, and I loved experimenting with it and reading the source, but ultimately, I think fewer people were finding this to be their pain point with the language or that using it made them significantly more productive.
Of course, considering the fact that they seem to solve different problems, it may be an interesting question why they were fighting for mindshare in the same space.
I never looked that close, but I thought that prototype extended the base objects with the prototype property? If this is the case, then it wasn't a great idea. Meta programming is acceptable when you control the compiler or spec of the language, but as ECMA specifications move forward, and those functions are added, you'll get conflicts. And you can't control what browser is interpreting your javascript.
Because Prototype does what the name says, i.e. pollutes the prototype chain. Also, Prototype tries to monkey 'classical inheritance', whereas jQuery encourages chaining, which obviously people like more.
Why I think it's cool? Well it's really fast, and it's lazy which allows you to work with really big arrays. Plus it's a really tiny library providing you with a streamlined set of APIs for working with lists (similar to array.js/Enumerable)
If you're working with smaller lists it's probably best to go the lodash route, but if you want it to be lazy then I believe lz is the right tool for the job.
My vote is for TypeScript (http://www.typescriptlang.org/). It fixes some of the problems that I encountered while creating an enterprise class application and not being able to strongly type parameters, classes, etc (which meant that I had to open up every JS file to figure out what parameters a function truly required).
http://browserify.org/ because it will fundamentally change how you approach writing and organizing front end code. The moment you stop writing boilerplate code to glue your disparate files together and start using a simple module system you will never look back. This is more than a library, it is a way of re-thinking how you can maintain js libraries going forward.
I found that browserify tried to do too much by emulating Node within the browser so wrote JoinJS which just implements CommonJS modules without trying to parse the JS files: https://github.com/olegp/joinjs
It breaks down large frameworks like jQuery, Underscore, Backbone, Twitter Bootstrap, etc into small, reusable, and composable micro libraries. There are UI elements like tool tips and modals, wonderful and tiny DOM manipulation tools, well documented AJAX libraries, and more low-level functional and control-flow related tools. It's really amazing.
It's by TJ Holowaychuk too, who is huge in the node community (Express, Jade, Mocha, Stylus, Connect, and many others).
94 comments
[ 2.8 ms ] story [ 146 ms ] threadhttp://280north.com http://www.cappuccino-project.org http://arstechnica.com/apple/2008/06/cocoa-on-the-web-280-no...
http://www.flapjax-lang.org/
https://github.com/brownplt/flapjax/
http://cs.brown.edu/~sk/Publications/Papers/Published/mgbcgb...
Amazingly, work on Flapjax dates all the way back to 2006! Let that sink in ... the point is that it was way ahead of its time, and with all due respect to bacon.js, I think Flapjax is still in in a league of its own with respect to how it's implemented.
I studied the internals for months back in 2010, and that learning experience was a huge catalyst in pushing me toward functional programming, Clojure and ClojureScript.
The reason Flapjax never quite caught on was in part, I think, that it was so ahead of its time. And also that its internals, while well engineered, are much harder to understand than those of jQuery and other popular libraries. It's harder to use something truly effectively if you can't quite wrap your head around how it works, and understanding Flapjax certainly takes dedication.
http://pouchdb.com/
PouchDB is a full reimplementation of CouchDB inside the browser (using browser storage), you can build applications that work offline then sync your data with 'the cloud'
From the site
"Sugar is a Javascript library that extends native objects with helpful methods. It is designed to be intuitive, unobtrusive, and let you do more with less code."
http://angularjs.org/ Angular UI is amazing http://angular-ui.github.com/ And Angular for Bootstrap is also amazing http://angular-ui.github.com/bootstrap/
I'm not a great programmer, so that's what excites me. It's flexible enough that as you get better as a programmer, you can plug that right in.
And that's what I think is cool.
Speaking of data tables, I wrote a little function to make table headers sticky so they stay at the top of the viewport as you scroll down a large table. https://github.com/kingkool68/stickyHeader No options, just include on the page, add a class of stickyHeader on the table and you're done.
http://underscorejs.org/
https://github.com/bestiejs/lodash
Anyway, I use this site as a quick reference to see what is new in JS world. www.functionn.in The author seems to be pretty meticulous in his updates, so there's a lot of interesting libraries. Seems like a labour of love for him. (P.S: Thanks, Hirvesh)
There's also Hakim who comes up with some interesting stuff from time to time www.hakim.se
Here's another that came up on radar lately -- http://soulwire.github.com/Makisu/
Subscribe to the smashing letter magazine's newsletters for a periodic stream of latest "cool" into your Inbox.
Hope that helps.
Even though it's not "cool" in the sense that it's very low level and doesn't do fancy UI stuff, my asynchronous code has become significantly cleaner and easier to maintain through using promises rather than having callback pyramids. The ability to wait for a number of promises to resolve before firing the next makes life so much easier too.
For example, you can easily condense tens of lines of event code into a single `event = yield document.next("click")`
jQuery.
Its not sexy, but it gets the job done for pretty much everyone.
Scriptaculous, built upon prototype.js, was nice too.
Prototype.js seemed to be targeting the problem of providing a familiar class system, standardizing some functional features, and some utility functions. It was something else, and I loved experimenting with it and reading the source, but ultimately, I think fewer people were finding this to be their pain point with the language or that using it made them significantly more productive.
Of course, considering the fact that they seem to solve different problems, it may be an interesting question why they were fighting for mindshare in the same space.
Maybe I just didn't understand it well enough.
You do have a good point though
https://github.com/goatslacker/lz
Why I think it's cool? Well it's really fast, and it's lazy which allows you to work with really big arrays. Plus it's a really tiny library providing you with a streamlined set of APIs for working with lists (similar to array.js/Enumerable)
If you're working with smaller lists it's probably best to go the lodash route, but if you want it to be lazy then I believe lz is the right tool for the job.
/shameless plug
Your thing could use some tests if you hope for people to trust it :)
http://component.jit.su/
It breaks down large frameworks like jQuery, Underscore, Backbone, Twitter Bootstrap, etc into small, reusable, and composable micro libraries. There are UI elements like tool tips and modals, wonderful and tiny DOM manipulation tools, well documented AJAX libraries, and more low-level functional and control-flow related tools. It's really amazing.
It's by TJ Holowaychuk too, who is huge in the node community (Express, Jade, Mocha, Stylus, Connect, and many others).