News roundup: jspp, node-scraper, Nike Better World
If you have npm (more than likely if you’re running node.js), just type this to install: npm install jspp
node-scraper is a fairly simple screen scraper that relies on node.js and jQuery. Though I’ve been admittedly slow to jump on the node.js bandwagon, I’ve always thought node.js would be the perfect platform for a screen scraper or web crawler. Instead of finding content with regexes (eek) you can find content just as you would on the client side with your favorite selector engine, in this case jQuery (or Sizzle to be more precise).
node-scraper is pretty basic: it allows you to specify one or many pages to be scraped and allows you to specify a callback for each. There’s also a setting to allow you to throttle back connection attempts so you don’t pound any particular server.
I realize this wasn’t made to really be a web crawler, but it would be handy if a future iteration of node-scraper supported link following. I’ll put that on my wish list!
Nike Better World
I’m not particularly a fan of Nike, but their new site Nike Better World is worth a look. It’s made in the spirit of Ben the Bodyguard and other one-page scrolling webpages. It achieves a neat effect, with some layering of graphics to achieve a parallax scrolling effect. Other than just scrolling, the page can be navigated by buttons on the right side of the page pointing to each section. What’s also somewhat fun is a counter at the bottom of the page which keeps track of how many pixels you’ve scrolled.
When you pry into the source code you’ll find plenty of new semantic HTML5 tags (yay) but soon will find that they’re actually being used incorrectly (boo). Each section of the page is within a Section element, which makes sense, but some sections only contain one child (Article), which itself contains one child (Header), which contains all of the content for each section.
There’s still a bit of confusion over how to use these new elements correctly. We used to have div-itus (overuse of divs in webpages), now it seems we’ll be seeing a lot more of HTML5-itus. Don’t be afraid to use divs where it makes sense to!
Paul Irish on HTML5 Boilerplate (January 27, 2011 in San Francisco, CA)
Mozilla/P2PU School of Webcraft (January 2011 online)
JS Boot Camp (February 10-11, 2011 in Reston, Virginia, US)
Confoo.CA: Web Techno Conference (March 9-11, 2011 in Montreal, Canada)
JSConf 2011 (May 2-3, 2011 in Portland, Oregon, US)
NodeConf 2011 (May 5, 2011 in Portland, Oregon, US)
jsday (May 12-14, 2011 in Italy)
Mobilism (May 12-13, 2011 in Amsterdam)
The “catch” with try…catch by Ben Alman examines a quirk of using the variable “e” in IE6-8 (the lesson: use another variable name)
OOP The Good Parts: Message Passing, Duck Typing, Object Composition, and not Inheritance by Nick Fitzgerald
5 Things You Might Not Know about jQuery written by David Flanagan as a tie-in to his latest book
Backbone and couchdb by Ben Nolan
Audio: Brian LeRoux on HP Palm WebOS 2.0 (Minute With Mobile)
WebKit implements Mozilla’s animationTime property
Require.js: Integration with Has.js (require.js documentation) – uses the power of Has.js and Closure Compiler to remove dead/unsupported code
jsshell: Shell/bash in Node.js
List of languages that compile to JS