November 1st, 2007 by Aaron N.
This post over on ajaxian today led me over to d’bug, a blog by Brian & Stephanie Reindel. The Ajaxian post points to their recent post “How to Choose a Javascript Framework” which is a brief overview of what to look for in choosing. They don’t endorse a particular framework but rather clue you in on what to look for.
But this article led me to “Mastering Javascript - concept and resource guide“. Holy guacamole. This article is great. It’s very direct and to the point and lists out the main things that you really need to grok to be a javascript bad ass:
- Access Control
- Accessible Javascript
- Closures
- Classical OOP
- Concepts in AJAX
- Memory Leaks
- Namespaces and Self-invoking Functions
- JSON and Object Literal Notation
- Security
Each item has a quick one or two sentence description followed by 3-5 links to deeper resources on each topic. Then, after all this, there’s sections of links to JS articles, tutorials, and publications, Javascript tools, and finally frameworks.
This is going on my list of links for developers getting start with javascript and even if you think you have these bases covered its worth bookmarking it. Terrific stuff!
Posted in Best Practices | 1 Comment »
October 25th, 2007 by Aaron N.
I use Eclipse at home (I run Ubuntu), but I can’t say that this plugin excites me terribly. I use the debugging in firebug for a lot of different things (with our own debugging wrapper: dbug.js) and I don’t know that I want all that stuff diverted into my editor… Still, it’s cool and I’ll probably install it just to see if it’s more useful than firebug on its own. I don’t really get all the mileage out of Eclipse that I could, so maybe this is just another instance of me not getting it entirely. To you Eclipse users out there, what do you think?
Note: the comments on ajaxian imply that this plugin isn’t quite ready for prime time as of this posting.
via ajaxian, via Dean Edwards…
John J. Barton has released a new open source framework named Fireclipse that enables nice coupling of Firefox and Eclipse for debugging purposes, working on top of Firebug.
- Fireclipse routes error messages from Firefox’s
Javascript Console to Eclipse’s console.
- Fireclipse positions an Eclipse editor on the source line reported by Firefox.
- Calls to
dump() end up on the Eclipse console
- Fireclipse adds an Eclipse panel to Firebug
- Extensions to Firebug include:
- debug
eval() code.
- debug event handlers
- route error messages to eclipse
- executable line numbers marked
Take a peak at the page of screenshots to see it setup in Firefox and Eclipse.
( via Dean Edwards )
Posted in Browser Plugins | No Comments »
October 24th, 2007 by Aaron N.
The CNET JS code includes references to various assets - images and a few css files and at least one flash (swf) file. I include references in the javascript so that these things “just work” when you use them.
First and foremost, our libraries are designed for us to develop with, and making that process easy is our main concern. The problem is when you want to use these scripts somewhere other than CNET (or for local development).
Well, now you can. Just download the assets here:
http://code.google.com/p/cnetjavascript/downloads/list
Then use http://cnetjavascript.googlecode.com/svn/trunk/setAssetHref.js to set the location of the assets. Voila.
Posted in CNET JS Standards, Server-side Integration | No Comments »
October 23rd, 2007 by Aaron N.
via ajaxian:
John Allsopp, who authored XRAY, has a new tool for us to play with. MRI is a bookmarklet that fires up a tool allowing you to query items on the page using CSS selectors. As you put in your queries you will see the items on the page that match. You can also click on areas of the page to show some selector queries that would find that area.

Posted in CSS, Tools | 1 Comment »
October 19th, 2007 by Aaron N.
I’m curious if this will actually gain traction. Certainly the introduction of the first round of web fonts helped web developers create a coherent presentation, but I’m wondering how adoption will go of these new typefaces…
via slashdot:
“Beginning with Vista, Microsoft has updated the standard Web Core Fonts that it has used since the late 1990s. ‘With the release of Windows Vista, Microsoft has unleashed something quite new on the Web — the “C” fonts; Cambria, Calibri, Candara, Consolas, Constantia, and Corbel.’ The article goes on to state that ‘if you’re a web designer and not using Vista then this download is mandatory since it will let you see your page as your Vista users see it.’ The article includes a PDF document offering visual comparisons of the old and new fonts (pdf).”
Posted in 'Industry' News | No Comments »
October 18th, 2007 by Aaron N.
via ajaxian:
VentureBeat is reporting that Google has updated their popular Google Analytics service to begin tracking Ajax and Flash-based requests:
The new additions reflect a growing feeling on the web that pageviews are a less important metric than they used to be. Google Analytics is opening a feature for beta testing that tracks user engagement with elements that have become common with Web 2.0 services, including Javascript, Ajax and Flash applications, widgets and gadgets, and downloadable pages.
With many sites reliant on selling advertising based on page views, this update will allow developers to leverage Ajax, JavaScript and/or Flash without the worry of losing valuable stats data:
While small web companies will be the primary beneficiaries of the new features, the move could also prove meaningful for online advertising. Experts have suggested for some time that advertising rates should reflect elements beyond the simple standard used so far, page views.
Full article here.
Posted in 'Industry' News, Tools | No Comments »
October 17th, 2007 by Aaron N.
About a year or so I went to see Bill Scott give this talk down at a gathering hosted by Google (he worked for Yahoo at the time though). The talk was great but I felt I was the wrong audience for it (though I found it very informative). Really, the people who needed to see it, were designers, product managers, and engineers. The talk is awesome as it goes through all the challenges to designing and building user interaction with tons of examples and patterns. On top of that, Bill was a fun speaker.
So I emailed him and asked if he’d be interested in bringing the talk to CNET and, to my astonishment, he did. Maybe 75 of our staff crowded into our largest conference room and watched his presentation. Afterwards I got a lot of thoughtful comments and questions; he had a real impact.
There were, however a lot of people who didn’t get to see this lecture and I’m glad to see that Yahoo got footage of him giving it and have posted it for anyone who missed it. It’s great stuff.
Blog post on the YUI blog>
Video on YUI Theater>
Posted in 'Industry' News, Best Practices, Examples | 1 Comment »
October 15th, 2007 by Aaron N.
Hey gang,
Two new classes in the CNET libraries today.
CNETAPI.js
The first, CNETAPI, is probably not going to be very interesting to those of you reading this who don’t work at CNET. Basically, this class makes it super-duper easy to get stuff out of our REST API. For example:
//you have to do this only once on your page
//this is my dev key; get your own!
new CNETAPI(19926949750937665684988687810562);
//now our request:
new CNETAPI.TechProduct(32069546).chain(function(){
dbug.log("got the Ipod, here's the data: ", this.data);
alert(this.data.Name + ": " + this.data.EditorsRating.$);
});
Pretty snazzy, eh? Props go to Hunter Brown who wrote the guts of this class. I (Aaron) added some flare. More details and examples in the wikitorial.
ObjectBrowser.js
I’m working on some CMS tools for selecting options out of a tree (think genres/ontology) and I needed a tree browser. So I wrote a generic one that can be used to explore just about any kind of javascript object. Rather than paste in a lot of detail here, I’ll just point you towards the wikitorial.
Posted in CNET API, Server-side Integration, Widgets | No Comments »
October 9th, 2007 by Aaron N.
About a year and a half ago I started focusing on javascript again. I’m not really a developer here at CNET (though you’d be hard pressed to tell) but javascript was a means to an end and I didn’t really have anyone here that could do the work, so I rolled up my sleeves, unaware that I’d be spending this much time on the subject. It’s a good thing I find this stuff fun.
Anyway, over the course of that time I learned a lot of the ins and outs of writing javascript well. I blogged about many of these discoveries along the way here on this blog. But if you’re just getting started with javascript, or you suspect that you’re writing things without really understanding them, or maybe you’re using javascript the “old way” or whatever, where do you start?
All my tutorial work just assumes that you know a lot of these ins and outs and doesn’t spend much time talking about the whys of “new” javascript methodology.
Over my lunch break I thumbed my way through Jonathan Snook’s Accelerated DOM Scripting with Ajax, APIs, and Libraries and if you feel like you need a primer on how to do “modern” javascript, it’s a great starter book. It covers a lot of stuff from the DOM to Ajax, closures and more.
It touches on Libraries (prototype, YUI, jQuery, Mootools, etc.) but it’s not going to teach you to use them. Instead it shows you a lot of the conceptual stuff going on in frameworks and helps you understand modern browsers and the javascript concepts that they implement.
If you’re just getting started with javascript, I highly recommend it. Even if you’re already using a framework, you can pick up some good practices from the examples and illustrations and detailed under-the-hood information.
Despite it being a rather technical book, it’s written so that even if you’re new to javascript you can learn a lot from it. It will help if you have experience with programming in general, as it assumes you have a general understanding of object oriented practices, but beyond that the book is very approachable.
-A.N.
Posted in Best Practices, Code Snippets, Reference | No Comments »
October 4th, 2007 by Aaron N.
Something that’s long been on my list is to do a write up on firebug. It’s such an indispensable tool that I can’t imagine my day without it. It’s like trying to understand how people did anything before the internet. Anyway, over at Ajaxian there’s a post about one that Phil Rees wrote up. If you don’t use Firebug (and if you’re reading this blog, you probably do), or if you feel like you’re not getting everything out of it, you should dig through this.
Phil Rees has written up a nice introduction to Firebug, showing us how you can use Firebug to:
- Inspect custom stylesheets included by Google Mashup Editor
- Modify in-memory stylesheets to see the changes reflected immediately
- Place watches and breakpoints into running JavaScript
- Execute arbitrary JavaScript in the context of your running application
- Monitor Ajax calls, showing response times, posted content, and results
- Profile JavaScript functions to help you identify bottlenecks and optimize your application.
The article walks through all of these points using Phil’s DanceMaps mashup using the Google Mashup Editor.

Posted in Browser Plugins | 1 Comment »