January 30th, 2007 by Aaron N.
Mootools 1.0 is out. Fancy new site design and docs.
We’ve already refactored all our code for 1.0, though it is not yet released to the CNET site. We’re entering into QA now…
I’ve also released the second part of my wiki tutorial series, this time giving working examples of all the CNET common code. The CNET Libraries are comprised of common code (widgets, shortcuts, etc.) and implementation code – code that is specific to a given page or application. The implementation code is usually just implementing and executing functions and libraries in the common portion of the library. The wikitorial for the CNET common code focuses on this generic content. Form validation, date pickers, carousels, etc. Dig in! Oh, and if you have a chance, Digg the tutorials, too. You’ll find shortcuts to do that in the right navigation column in the tutorials.
Posted in Ajax, CNET JS Standards, Event Scripting, Examples, Manipulating the Dom, MooTools, Reference, Visual Effects | Comments Off
January 30th, 2007 by Aaron N.
In my previous post I pointed out the Firebug presentation by Joe Hewitt over at Yahoo’s UI Theater. This really is a treasure trove of videos a that is worth exploring. In particular, I’d like to bring your attention to two series: The JavaScript Programming Language presented by Douglas Crockford, and the followup, Advanced Javascript.
These videos are long, but if you’re looking for a way to get started with javascript and you want to understand it completely, they are fantastic resources. I’ve learned a lot from watching them, though finding the time is a challenge.
I’ve emailed Douglas to see if he’d be willing to give this presentation here, but in the mean time, dig in to these excellent videos.
Posted in Reference | Comments Off
January 30th, 2007 by Aaron N.
Today on Ajaxian there’s a post about Joe Hewitt’s recent presentation where he demonstrates the nice new features in Firebug 1.0 (note that the ajaxian post actually includes a video of Joe presenting Firebug from last may, which I think is an error as the post refers to this most recent presentation). If you haven’t had time to fool around with Firebug, or feel like you’re not getting everything out of it that you can, you really should watch this presentation.
Posted in 'Industry' News, Browser Plugins, Examples | Comments Off
January 26th, 2007 by Aaron N.
What are you waiting for? Get Firebug now.
One year and twelve days later I am happy to announce that the leopard’s growl has been quieted to a purr, clearing the path for the final Firebug 1.0 to make its way in the world.
If you read this blog, that won’t mean much to you personally since you’re probably already using 1.0 beta. However, there are still tens, maybe even hundreds of thousands of people who are still using 0.4.1 and are going to get a very nice present the next time they restart Firefox.
Thanks to all the people who have supported Firebug during its infancy, especially those who have contributed new ideas and donations to the project. We’re just getting started here! If nothing else, I hope Firebug inspires the makers of other browsers to invest more time in development tools. The web development paradigm wants to evolve, but we can’t build the future with yesterday’s hammer.
Posted in Browser Plugins | Comments Off
January 23rd, 2007 by Aaron N.
There’s a nice article over at Snook’s today on writing clean, concise, and reusable javascript.
As a JavaScript developer, you are in many ways an environmentalist. JavaScript is a language unlike most other languages. For when it comes to JavaScript development, we must consider the mantra of the environmentalist: Reduce, reuse, recycle.
It’s a short article that’s worth reading. All of these concepts are in use in our new framework, and if you’re writing javascript for yourself or for CNET or whatever, it’s always good to keep these things in mind.
Posted in Optimization, Organizing Code | Comments Off
January 22nd, 2007 by Aaron N.
via Ajaxian.
Ben Alex of Interface 21 has written a detailed post on Java to JavaScript compilation.
The article discusses some of the choices out there (GWT, OpenLaszlo) and goes into an open source alternative called Java2Script Pacemaker.
Spring integration is shown and available for download and it concludes:
J2S promises some attractive benefits for projects that require JavaScript compilation or a web browser implementation of SWT. It also interoperates successfully with a Spring backend. J2S’ deliberate choice to leverage proven existing technologies such as AST and SWT make it a good example of reusing existing code and developer skills, in turn lowering adoption barriers and the prospect of material API change. If you consider yourself an early adopter, SWT devotee, or need a client-centric, web-based user interface that is built upon the mature SWT UI framework, it is definitely worth taking a closer look at J2S.
Does SWT support do it for you?
Posted in Server-side Integration | Comments Off
January 18th, 2007 by Aaron N.
For those of you out there who are using an old version of firebug, or aren’t using firebug at all, you best get with the times. If you’re writing html or css or javascript or application (server side) code that talks to pages via ajax, you NEED this plugin.
via Ajaxian:
Joe Hewitt somehow managed to find the time to write an article on Ajax Debugging with Firebug, which he created.
The article will show you that Firebug is more than just a JavaScript console: Read the rest of this entry »
Posted in Browser Plugins | Comments Off
January 18th, 2007 by Aaron N.
I’ve updated my Mootools Tutorial for the upcoming version 1.0 of the library. It (the library) is still in development, so my tutorial is likely to always be a little behind the svn, but if you’re digging into Mootools for the first time, or you want to see what’s different in version 1.0, here’s the place to start.
I’ve also installed a copy of docuwiki for all my example and tutorial work. The old stuff is still there but I’ll be moving it all over to the wiki. Expect to see more examples of code I’ve written in the coming weeks.
Posted in Examples, Reference, Uncategorized | 3 Comments »
January 18th, 2007 by Aaron N.
When I first launched clientside internally at cnet.com, I used the default wordpress “Kubrick” template because I didn’t care what it looked like.
Then I launched the blog so that others outside our network could see it and felt compelled to make it look a little more unique, but I was in a mad rush to get the content out and continue my other work. So I threw together your generic blog layout template with some colors and a logo in an hour and up it went. I was never happy with it, but it would suffice.
Well, after a few months of staring at it I finally caved and redesigned it. I hope it looks good in your browser and that you find it easier to read and what not.
Posted in 'Industry' News | 4 Comments »
January 12th, 2007 by Aaron N.
So I spent an entire day discovering a quirk about javascript that I must now share. In a previous post on creating default settings for classes/objects I discussed the following technique:
var Widget = new Class({
initialize: function(element, options){
this.element = element;
this.options = Object.extend({
offsetX: 0,
offsetY: 0
}, options || {});
this.setPosition();
},
setPosition: function(){
this.element.setStyles({
left: this.options.offsetX + 'px',
top: this.options.offsetY + 'px'
});
}
});
Now, this isn’t a very useful class, but it illustrates the technique. The functions in our class don’t have to worry if the options are defined; they are either what the default value is or they are what the user passed in. If the user elects to just pass in a subset of the values, that’s fine:
var myWidget = new Widget(myElement, {offsetX: 100});
//myElement will be offset by 100 on the left,
//zero (the default) on the top
But what if you want to extend the functionality of your class later? What if you want to be able to insert more default options?
Here’s what I was doing that caused me trouble: Read the rest of this entry »
Posted in Best Practices, Browser Bugs, Code Snippets, Examples, Reference | Comments Off