Jonathan Snook’s jQuery Background Animation as a Plugin
Posted on: Wednesday, October 1st, 2008 at 7:53 am by Anup Shah
Jonathan Snook recently posted a really neat background animation technique using jQuery. This was something I was looking for and it seemed like a good candidate for a jQuery plugin.
So, following on from my recent post about turning jQuery code into richer, unit testable plugin code, I thought I’d describe the quick process of doing so here. (It’s worth reading Snook’s post first though!)
Read the full post titled, “Jonathan Snook’s jQuery Background Animation as a Plugin”
Turn your jQuery code into a richer, unit testable, plugin
Posted on: Sunday, September 28th, 2008 at 9:07 pm by Anup Shah
I find myself increasingly using jQuery as my JavaScript framework of choice.
It’s by-line of “write less, do more” really seems apt.
But sometimes, by writing just that little bit extra, you can do even more.
For example, I often try to do the following:
- Make most jQuery code into reusable plugins
- Use the jQuery plugin development pattern for added flexibility
- Use QUnit to unit test JavaScript
- Combine the two approaches to drive out a richer API for the plugin
By unit testing with QUnit, I find I often need to trigger additional events or add additional code from within the plugin so the test can be meaningful.
But this extra code isn’t only useful for testing, it becomes a useful part of the plugin’s API, improving its functionality and flexibility without sacrificing maintainability and readability of the code.
I’ll try to demonstrate that in this post.
Read the full post titled, “Turn your jQuery code into a richer, unit testable, plugin”
Google to host a number of JavaScript libraries
Posted on: Wednesday, May 28th, 2008 at 2:01 pm by Anup Shah
Google just announced their AJAX Library API, where Google will host many major JavaScript frameworks for you, such as jQuery, Prototype, Mootools, Dojo, etc.
This will allow you to write web pages that refer to those scripts rather than copies on your own site, reducing your bandwidth, but also leveraging the infrastructure capabilities of Google, such as their content distributed network (which means users would be served those files from a location much closer to them), properly compressed, minified, cacheable files, etc.
Read the full post titled, “Google to host a number of JavaScript libraries”
Day 2: @media ajax November 2007
Posted on: Thursday, November 22nd, 2007 at 11:28 pm by Anup Shah
My impression of day 2 at @media ajax, the ajax/javascript conference with some of the leading figures in this area.
Read the full post titled, “Day 2: @media ajax November 2007”
Day 1: @media ajax November 2007
Posted on: Thursday, November 22nd, 2007 at 1:04 am by Anup Shah
My impression of day 1 at @media ajax, the ajax/javascript conference with some of the leading figures in this area.
Read the full post titled, “Day 1: @media ajax November 2007”
