Skip to content

One Week of URI.js

URI.js is a Javascript library for working with URLs (without going insane or shooting yourself in the head). It was released in the last week of 2011. Here's some background from a week after launch.

One Week of URI.js

Let's start with December 21st. I was on the train to Stuttgart (Germany), headed for the Smashing Meetup #3. The day before I was pissed at myself for doing some ugly regular expression crap to manipulate some URL's query string. I used the two hours on the train to initially map out what I wanted an URL abstraction to accomplish.

That evening I did not only get to see Paul Irish's and Christian Heilmann's talks. Working Draft (German podcast on web development) allowed @kahlillechelt and me to join a discussion with Paul, Christian and Vitali Friedmann (editor-in-chief of Smashing Magazine). If you're interested, watch it on youtube. Right after the camera stopped rolling, I kicked Paul and Christian for their respective browsers not offering any sane way to manipulate URLs. Paul said someone started working on a specification for that. Christian and me then talked about java.net.URI and drifted off into Java's Swing… (Java, of all things, right?)

During Christmas I was facing a choice. Work (commercially) on something I wasn't excited about, spend quality-terror-time with my family, or do something fun. I picked up the javascript pieces from the train ride to Stuttgart and pretty soon had some cool API in front of me.

I was happy as a clown. URI.js did not need anything javascript hasn't offered since the very beginning, so theoretically it should've worked in every JS environment. Also I gave QUnit a shot. I've done TDD in PHP, but never in Javascript. In short: It was fun and I was very pleased with the result.

Fully aware of the fact that URI.js was everything but rocket-science, my expectations for the JS community accepting or talking about it were zero. I figured it would go as always. A couple of retweets from friends and then a couple of weeks silence. But I was about to be proven wrong.

Incoming Traffic

The following "stats" and "timeline" are based on Google Analytics and Twitter search.

Twitter

Immediately after my christmas gift I mentioned Paul Irish and Christian Heilmann, to explain what I was talking about before Christmas. @codepo retweetet this, which caught @mathias attention. I believe this tweet, is what got this whole thing rolling.

Biggest influencers on Twitter seem to have been

At January 3rd 10:00 (CET, UTC+1) a total of 524 tweets (including retweets) named or linked to URI.js.

News Services

  • I knew Hacker News only from the occasional random link to a »look at that ranting idiot«-comment. As I've never participated in HN, it never occured to me to post a link to URI.js there. Much to my surprise someone else did on December 28th. Since people already started asking questions (and complain about things, of course, after all it's Hacker News…) I signed up and worked myself through the feedback.
  • December 30th Javascriptw Weekly listed URI.js in the Code and Libraries section of their news digest. On the same day Christian Heilmann blogged about him being offline at some airport and noted URI.js being one of his open tabs.
  • January 2nd URI.js was named by DailyJS.

According to Google Analytics, Hacker News has (by far) brought in the most traffic.

The Week In Numbers

One week after the release of URI.js

  • 520+ tweets mentioned URI.js
  • URI.js has been trending on github's daily trending repos in and out, but is still listed in the trending this week section
  • 650 people are watching it on github
  • 3 of the 27 forks show commits and pull requests
  • 7 issues have been dealt with, 2 new came in this morning
  • I've already committed version 1.3.0 (being 3 updates ironing out the kinks)
  • 14,708 Visits to URI.js generating 20,637 Pageviews in total

Conclusion

Although I'm extremely pleased with how URI.js turned out, I'm a bit shocked as well. It's a bunch of well organized functions to manipulate strings. That's it. Anyone could've done it. We could've been using something like this little library for years. But we didn't. Instead everyone built their own solutions and was constantly pissed about ugly query string mutation.

I'm not comparing Javascript to PHP or Java, but the latter have quite a number of libraries and functions that make life simple. Javascript does not. Every "awesome" Javascript API is built in JS, potentially wrapping some native methods. This has got to change. Are you hearing me, Brendan? String.trim, RegExp.escape, String.escapeHTML, URI.js, Date.js, … - make ever repeating standard functionality part of the native Javscript environment. #kaythxbe

Comments

Display comments as Linear | Threaded

No comments

The author does not allow comments to this entry