JQuery deconstructed
keyframesandcode.com
keyframesandcode.com
Problem is those always erupt into flame wars, people don't like being deconstructed, I wish it wasn't so hard, self awareness is a good thing, even if the deconstruction is a leaky abstraction as generalizations are.
Then again, we do have Yegge ;-)
implicit iteration (obviating for-loops) across a node-set, type-agnostic starting points (constructor accepts a snippet of HTML, a selector, a node or another jQuery object), and simple chaining (functions return 'this') enable concise code
on top of this it smooths out DOM API inconsistencies and quirks between browsers
jQuery's design, in large parts mirrors the needs http://en.wikipedia.org/wiki/Progressive_enhancement. Once you reached enlightenment / chose progressive enhancement as your client development methodology, all javascript code boils down to two phases:
- find the points in the document to enhance - transform those DOM elements into javascript enabled awesomeness
Which is exactly what jQuery does.
For example, all the method and properties relating to events: http://api.jquery.com/category/events/
Detailed explanation and categorization of the event object properties: http://api.jquery.com/category/events/event-object/
We studied how users were interacting with the jQuery documentation and overwhelmingly they were ignoring (and out-and-out confused by) the categorization and going straight to Google - because they wanted to find methods by name or functionality. For this reason we improved our search functionality and made the URLs super-intuitive (.html() is now just http://api.jquery.com/html, for example).
Note that the rest of the "old" documentation is still in place - this includes all the tutorials and other getting started guides - the only thing that was "moved" was the API documentation. Undeniably the browsability of the API docs has improved with this revision.
I might be different. I came to learn jQuery through the raw docs, not through tutorials, and found that the old docs' organization was more friendly for casual browsing & exploration, and the new is more amenable to API lookup ("I already know the name of the method").
For example, compare the selectors page:
New: http://api.jquery.com/category/selectors/
Old: http://web.archive.org/web/20080516171346/docs.jquery.com/Se...
(The CSS is very broken on the archive--) but you can see that you used to have it organized functionally, not alphabetically, which was great for me as a learner to see at a glance the different axes of capability for jQuery's selector engine, instead of a alphabetical mash of selector operators, some titled by the operator, others by a description. If I didn't already know CSS thoroughly, reading your selector operator list now would be very disorienting.
I have to say jQuery and its community is amazing, without it QuickFuse (http://quickfuseapps.com) would not have been possible. But one of its strengths was being able to be grokked so quickly by newcomers, and I was a bit disheartened to see the docs stray away from a introductory format more in favor of a reference format. It's a bit more intimidating to the newcomer to have to wade through categorical tagged lists of methods with brief descriptions, instead of a human-organized page on each aspect of the jQuery object that presents the methods in a sensible order.
Try removing the background colors and leave it b&w or gray shades.
And add a collapse/expand per sections.
My screen is bright... I'm still blinking. The apprehension was justified, the warnings were valid and sadly were not heeded.
Anyone want to rig up a quick alternate CSS we can apply with greasemonkey? Or are those horrible things images?
ps. shade 3 welding goggles would do the trick
I get the picture. I honestly didn't expect it to get the attention it's gotten.
If any of you want to play with some CSS colors, or do a PhotoShop mockup, I will happily provide an alternative color dropdown.
I guess I have my monitor set to a reasonably low contrast, so I'm not blinded by looking at it.
:D
Observation: there's alot of dead space in the middle and right of all the blocks. If there's nothing useful to put there, it might be worth considering a different, more compact graphic layout.
The InfoVis and ProtoVis libraries, among others, may have better layouts for this data:
Agreed about the amount of space used up when the blocks are closed, but once you've clicked a few to view the internal code, it's not such a big deal.
Perhaps someone else would like to take up the challenge of make the jQuery code navigable by treemap!?