CloudFront CDN for jQuery

Posted on by

Here at jQuery we’ve been using Amazon S3 to host the jQuery code and static site files for quite some time. It’s remained dependable and quite responsive.

Yesterday Amazon released their new service, called CloudFront. The major difference between it and S3 (they are both designed to serve files) is all about network performance. Whereas S3 was just about instantaneous control (being able to upload a file and see it live, instantly) – CloudFront tries to serve up a file as quickly as possible.

Yesterday we made the switch to using CloudFront for the jQuery site. The two domains that are affected are:

  • code.jquery.com – Hosts the jQuery source code.
  • static.jquery.com – Hosts all the jQuery site images, CSS, and JavaScript files.

Whereas S3 only had servers in Seattle, CloundFront has servers across the globe – allowing the site to load much-more-quickly no matter where you’re located.

Some initial numbers of come in and they’re quite promising.

Roland Moriz posted about the improvement in latency that he’s seen in Germany – with static.jquery.com coming in at 24ms latency in comparison to jquery.com’s 105ms latency.

I ran a similar test here in Boston and even managed to see a large improvement. I was seeing latency of anywhere from 50-200ms on Amazon S3, but only a latency of 17-19ms with CloudFront.

What does all of this mean? It means that the jQuery site is going to load even faster than it does now. We already receive some excellent hosting from Media Temple but being able to off-load these static files to the fast-loading servers will only make for a better browsing experience.

It also means that the jQuery project can expect to be paying even more in hosting costs. In less than 24 hours we’ve already had almost 2.5 million requests for over 50GB of data.

We pay all of these costs out of our own pocket – so a donation will significantly help us to make sure that we can keep providing a fast jQuery web site.

It should also be noted that CloudFront doesn’t appear to provide any sort of GZip compression on the transferred data. Because of this I still recommend that you use the Google Ajax Libraries API to load your copy of jQuery, done like so:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>

If you’re unfamiliar with the Google Ajax Libraries API I highly recommend that you check in to it – we use it on jquery.com and it’s still the fastest way to serve up jQuery (Hosted by Google, Gzipped, and Minified).

jQuery Pumpkin

Posted on by

jQuery Halloween Pumpkin

Created by jQuery user Christopher Pickert (of BigFishGames.com), he writes:

"Since Halloween is the perfect time to celebrate the black arts of web development, I carved a special jQuery pumpkin last night. I hope you enjoy it.

Our QA person said that he found a bug in the code, but I explained that it was because of the candle."

He continues:

I did carve that – it’s not photoshop. On an impulse I bought a little $7 battery-operated pumpkin saw at the grocery store, and it’s great because you can do small details more easily. So actually the hard part was drawing the characters first and getting them the right size.

Great work Christopher!

jQuery, Microsoft, and Nokia

Posted on by

We have two pieces of fantastic, albeit serendipitous, news today: Both Microsoft and Nokia are taking the major step of adopting jQuery as part of their official application development platform. Not only will they be using it for their corporate development but they will be providing it as a core piece of their platform for developers to build with.

Microsoft is looking to make jQuery part of their official development platform. Their JavaScript offering today includes the ASP.NET Ajax Framework and they’re looking to expand it with the use of jQuery. This means that jQuery will be distributed with Visual Studio (which will include jQuery intellisense, snippets, examples, and documentation).

Additionally Microsoft will be developing additional controls, or widgets, to run on top of jQuery that will be easily deployable within your .NET applications. jQuery helpers will also be included in the server-side portion of .NET development (in addition to the existing helpers) providing complementary functions to existing ASP.NET AJAX capabilities.

Nokia is looking to use jQuery to develop applications for their WebKit-based Web Run-Time. The run-time is a stripped-down browser rendering engine that allows for easy, but powerful, application development. This means that jQuery will be distributed on all Nokia phones that include the web run-time.

To start Nokia will be moving a number of their applications to work on the run-time (such as Maps) and building them using jQuery. jQuery will become part of their widget development platform, meaning that any developer will be able to use jQuery in the construction of widgets for Nokia phones.

Microsoft and Nokia aren’t looking to make any modifications to jQuery (both in the form of code or licensing) – they simply wish to promote its use as-is. They’ve recognized its position as the most popular JavaScript library and wish to see its growth and popularity continue to flourish.

In fact their developers will begin to help contribute back to the jQuery project by proposing patches, submitting test cases, and providing comprehensive testing against their runtimes. As with any contribution that comes in to the jQuery project it’ll be closely analyzed, reviewed, and accepted or rejected, based upon its merits, by the jQuery development team – no free ride will be given.

A significant level of testing will be added to the project in this respect. The jQuery test suite is already integrated into the test suites of Mozilla and Opera and this move will see a significant level of extra testing being done on Internet Explorer and WebKit – above-and-beyond what is already done by the jQuery team.

The whole jQuery team is quite excited by these prospects and wishes to take this opportunity to welcome both companies to the jQuery community. It’s phenomenal to see these two, major, corporations take the large step of using jQuery as a base for their, and their developers, future development. They will join a long list of happy jQuery users, including Google, Intel, IBM, Intuit, Reuters, and many others.

Update: Blogs posts by Scott Guthrie and Scott Hanselman, both at Microsoft, have posts on the subject matter from their perspective.

jQuery Conference 2008 Agenda

Posted on by

The sold-out jQuery Conference 2008, being held in Boston at the MIT Stata Center on September 28th, is nearly upon us. With 13 sessions being delivered by the jQuery team as well as prominent industry experts such as Jonathan Snook, Aza Raskin and Cody Lindley, this is sure to be a stellar event.

The conference has been broken out into two tracks, Beginner and Advanced, to allow developers of various jQuery expertise to take full advantage of the sessions that will be suit their needs. Below you will find the agenda for the conference. In the interest of sharing information, we wanted to put up the agenda as soon as possible. We will be releasing another page shortly that will provide topic descriptions as well as bios for each of the speakers.

Featured Presenters:

John Resig

John Resig

John Resig is the creator and lead developer of the jQuery JavaScript library. He’s also a JavaScript Evangelist for the Mozilla Corporation and the author of the book Pro JavaScript Techniques.

Currently, John is located in Boston, MA. He’s hard at work on his second book, Secrets of the JavaScript Ninja, due in bookstores Late 2008.

Joern Zaefferer

Joern Zaefferer

Jörn Zaefferer is a member of the core jQuery team. Along his work on jQuery itself, he wrote and maintains several of the most popular jQuery plugins. Jörn Zaefferer works as a consultant for maxence integration technologies GmbH in Cologne, Germany, where he architects and develops Java-based web applications for maxence’s customers and maxence’s own products.

Jonathan Snook

Jonathan Snook

Web designer and developer, Jonathan Snook moves effortlessly from client-side, front-end work to hardcore server-side challenges, and his fluency in CSS, JavaScript, PHP and MySQL make make him the “turn-to” man for many high-profile clients. Coauthor of Accelerated DOM Scripting and The Art and Science of CSS, he writes regularly at his popular blog snook.ca, and for Digital Web and Sitepoint. Jonathan also works with his partners at Sidebar Creative, makers of world-class websites and innovative applications.

Richard Worth

Richard Worth

Richard D. Worth is a Web developer in the Washington, DC area. He works for Fulcrum IT on web services contracts, primarily for the government. Richard is one of the lead developers of jQuery UI, a component framework built on top of jQuery, designed to make Rich Internet Applications as simple as jQuery has made Ajax. Richard is also a contributing author on dmxzone.com, writing regular beginner and advanced jQuery UI articles, and has been selected as a Technical Reviewer for a book on jQuery UI to be published in the fall.

Paul Bakaus

Paul Bakaus

Paul Bakaus is a UI architect living in Germany. He’s the creator and lead of jQuery UI and works for the open source company Liferay in a full-time sponsored position to jQuery UI. He’s responsible for the overall direction and roadmap of jQuery UI and he enjoys speaking about his user interface work in many places of the world. He’s also a member of the jQuery core team and takes part in the discussion of the overall direction of the jQuery project. In the past, he was largely responsible for creating the jQuery dimensions plugin (which is now part of the jQuery core) and worked together with Stefan Petre on the rich effects and components library Interface.

Yehuda Katz

Yehuda Katz

In addition to being the co-author of jQuery In Action, Yehuda Katz is a contributor to Ruby in Practice and co-author of the upcoming Merb in Action. He is a core contributor to DataMapper and jQuery. Before coming to Engine Yard, he worked for on a construction management tool written in Ruby on Rails and jQuery. Yehuda is a Merb core developer, contributes to Rubinius, and is taking a lead role in the development of Engine Yard’s new Control Panel.

Aza Raskin

Aza Raskin

Aza Raskin is the founder of Humanized (now part of Mozilla), Songza, and Bloxes. The son of Apple software pioneer Jef Raskin, he brings a keen interest in human interface design to everything he does.

Karl Swedberg

Karl Swedberg

After having taught high school English, edited copy for an advertising agency, and owned a coffee house, Karl Swedberg began his career as a web developer three years ago. He now works for Fusionary Media in Grand Rapids, Michigan, where he specializes in client-side scripting and interaction design. Karl is an “Evangelist” for the jQuery JavaScript Library and the co-author of two books, Learning jQuery and jQuery Reference Guide.

Scott Jehl

Scott Jehl

Scott Jehl is a designer at Filament Group, a Boston, MA studio specializing in web application design and development. At Filament, Scott and his colleagues frequently contribute design and code to the jQuery community, and recently built ThemeRoller, a theme design application for jQuery UI. Scott leads the design team at jQuery, and runs WriteMaps, an ajax web application for building visual website sitemaps. He enjoys wake/skate/snowboarding, being outdoors, and spending time with his wife Stephanie and their two cats.

Jonathan Sharp

Jonathan Sharp

Jonathan Sharp is a standards driven freelance web designer and developer. With experience in both frontend and backend technolgoies he brings value in integration delivering a seamless user experience. Jonathan has also developed a number of jQuery plugins such as jdMenu, jdNewsScroll and positionBy. Prior to freelancing, Jonathan worked for Union Pacific Railroad, CSC and Motorola, Inc. in Chicago after helping found Imprev, Inc. in Bellevue, WA in early 2000. He lives in Nebraska with his wife, Erin, and their daughter Noel. When not working he enjoys spending time with his family, playing with their dogs, and riding off into the sunset on Micah, his draft horse.

Kevin Hoyt

Kevin Hoyt

Kevin Hoyt is a Platform Evangelist with Adobe Systems, Inc. Passionate about engaging user experiences, you’ll most often find him meeting with customers, speaking at conferences, presenting online seminars, or just enjoying the chance to share ideas and brainstorm with other developers. When not on the road, Kevin enjoys spending time with his family, photography and general aviation.

Cody Lindley

Cody Lindley

Cody Lindley is a Christian, husband, son, brother, professional web developer, and outdoor enthusiast. He spends the majority of his time sleeping and working, but who doesn’t? In between the daily routines of the average American, he desires an existence that entails a relationship with God, family, and nature. He considers himself a bookworm and a novice theologian, but truth be told, he simply enjoys watching movies and playing Xbox way too much. He is thankful for the luxury of pursuing his profession as a personal passion. More details can be found about cody on his site codylindley.com.

Mike Alsup

Mike Alsup

Mike Alsup is a Senior Developer at Click Commerce in Rochester, NY. He has been developing software solutions for 15 years with a current focus on Java, Swing, J2EE and web applictions. Involved with the jQuery project since near its inception in early 2006, Mike has authored many popular plugins including the Form Plugin, BlockUI, Taconite and Cycle.

Agenda:

Beginner Advanced
9:00 – 9:30
Registration, Breakfast
9:30 – 9:55
State of jQuery – John Resig
10:00 – 10:50 Learning jQuery – Karl Swedberg Optimizing jQuery Core – John Resig
11:00 – 11:50 jQuery Case Studies – Cody Lindley
and Jonathan Snook
Writing Scalable jQuery Applications – Yehuda Katz
12:00 – 1:00
Lunch
1:00 – 1:50 Rich Interactivity, Simplified with jQuery UI – Richard Worth An In-Depth Look at jQuery UI – Paul Bakaus
2:00 – 2:50 Designing Reusable jQuery Components – Scott Jehl Desktop Applications with jQuery and Adobe AIR – Kevin Hoyt
3:00 – 3:50 Making the Case for jQuery – Jonathan Sharp Using jQuery in Firefox Extensions – Aza Raskin
4:00 – 4:50 Your First jQuery Plugin – Mike Alsup Building Robust jQuery Plugins – Joern Zaefferer
5:00 – 6:00
Dinner
Later
Cambridge Brewing Company for drinks and socializing

Full details of the individual sessions, biographies of the speakers, and additional conference information is forthcoming.

Death to JavaScript Rock Stars!

Posted on by

We’ve been listening to your feedback today, about the new jQuery site redesign and one thing has become clear:


Death to JavaScript Rock Stars!

Poor dude didn’t even last 24 hours. We wanted to have some fun with the home page, but this bordered on a little too “extreme” for most tastes.

We plan on bringing some further revisions to the homepage in the future, but in the meantime here’s a quick overhaul, put together by the always-excellent Scott Jehl, that’ll help tide everyone over:

jQuery Homepage

As a token of our appreciation for sticking with the “JavaScript Rock Star” for a day we’ve included a little Easter Egg in the new site. It would be useful if you knew the Konami Code.

Naturally, the whole redesign still has many tweaks that’ll be made over the next couple weeks, especially to individual page fonts, font sizes, and colors.

I want to, once again, thank Scott Jehl for all the hard work that he’s been putting in to the site design – and the excellent Varick Rosete (of nGenWorks and Happy Webbies) for the great illustration that he drew for us.

Here’s to many happy days of rockin’ out with jQuery!

jQuery.com Site Redesign

Posted on by

We’ve just pushed out a brand new site redesign (for jQuery.com and all its sub-sites). This has been a long time coming and it feels great to get it out the door.

New Homepage

jQuery.com

Easily the most contentious part of the redesign – but absolutely the most eye-catching.

jQuery has long been driven by rock, even looking back to its original release which was heavily inspired by the always-excellent Devo. We shot for a catchy design that helped to bring JavaScript out of the cold doldrums that it frequently inhabits – giving it a serious jolt of fun.

New Site Layout

jQuery Docs

The entirety of the site has a new layout. With drastically improved multi-layer navigation and a standardized sidebar it should become much easier to navigate the individual portions of the site.

You should probably wear a hard hat while exploring the interior pages – font sizes, spacing, and colors are all in need of tweaking, which will be handled over the upcoming week (it’s fun working against Trac, WordPress, Drupal, and Mediawiki simultaneously).

New Logo

jQuery Logo

The original jQuery logo was a variation of the Devo hat – we’ve taken that concept, turned it on its ear, and made it something that we can call our own – while still being inspired by the original contours of the Devo Energy Dome.

Thanks

Site and Logo Design: Scott Jehl – he put a fantastic amount of work into this redesign, bringing it all the way from conception to final implementation.

Rockin’ Illustration: Varick Rosete from nGenWorks also of Happy Webbies fame.

Initial Logo Prototyping: Bradley Sepos.

Also want to thank Media Temple for our hosting. They’ve been helping us a lot this past week migrating our sites to some new servers – expect some speed improvements for the sub-domains very soon.

jQuery UI 1.5.2

Posted on by

About 4 days ago, many have noticed that we had uploaded another minor bugfix release to our Google Code account. While there’s, again, no new API introduced, more than 30 issues have been cleared and the codebase is growing more stable every day.

The full changelog is available here if you want to find out if a specific issue has been addressed. As with 1.5.1, updating to this version is highly recommended and likely not to break anything in your written code.

You can grab the latest release as always via the downloader or as developer package at http://ui.jquery.com/download or if you prefer, get it as latest tag from Subversion.

As a last comment, this is probably the last minor release before 1.6, which we will announce before the end of July, so watch out for a couple of awesome new components and enhancements soon!

Have a nice day,

Paul Bakaus & the jQuery UI Team

jQuery UI 1.5.1

Posted on by

Soon after the release of jQuery UI 1.5, we were getting many useful feedback and issues entered in our bugtracker. Today, we’re happy to release another version of jQuery UI which takes care of many minor regressions and a lot of unsolved issues.

1.5.1 doesn’t add any new features or API changes, but fixes more than 50 found issues. A full changelog is available, if you want to know the specifics. Updating to this version is highly recommended and likely not to break anything in your written code.

Additionally, issues within ThemeRoller and the demos on our homepage also have been reported and fixed. We are now continuing to finish all unit tests and functional demos, so expect to see another release of both UI and its website soon again.

You can grab the latest release as always via the downloader or as developer package at http://ui.jquery.com/download or if you prefer, get it as latest tag from Subversion.

See you soon,

Paul Bakaus & the jQuery UI Team

jQuery 1.2.6: Events 100% faster

Posted on by

jQuery 1.2.6 is primarily a bug fix release for jQuery 1.2. You can view the full list of what was fixed on the bug tracker.

This is the next release immediately following jQuery 1.2.3. Releases 1.2.4 and 1.2.5 were skipped (1.2.4 was built incorrectly, rendering it effectively identical to 1.2.3, and 1.2.5 was missing a patch).

The entire jQuery team did a fantastic job in pulling this release together – I want to take this opportunity to thank them all for their continued hard work.

I’d also like to take this opportunity to welcome Ariel Flesler to the core jQuery development team. He provided valuable help in pulling this release together – contributing bug fixes, performance improvements, features, and test cases. You can see the result of his hard work all throughout this release. Welcome Ariel and thank him for all his contributions!

Downloading

jQuery 1.2.6:

If you wish to checkout the full release from the Subversion repository, you can do so by following the instructions and checking out the source from the following location:

svn co http://jqueryjs.googlecode.com/svn/tags/1.2.6

Performance Improvements

Once again the jQuery team has worked hard to bring huge performance improvements in this release. As with previous releases we’ve expanded to look at many areas of the jQuery framework, looking for common pain points, and providing relief.

All data and test cases for the below performance improvements can be found in the the following jQuery 1.2.3 v. 1.2.6 Google Spreadsheet (results for Internet Explorer 6 were excluded in favor of Internet Explorer 7 due to their virtually-identical results).

Event Handling is 103% Faster

In analyzing intense application code (specifically operations such as drag-and-drop) we looked for ways in which universal changes could be made that would affect all users. A frequently-called piece of code was that of the jQuery event handler, any optimizations to it would dramatically improve the performance of all resulting frequently-called events. By focusing improvements here all frequently-called events that you have should see immediate benefits.

CSS Selectors are 13% faster

A number of optimizations have been made to internal jQuery methods, dramatically improving their performance, while providing measurable benefit to some of the most commonly used code in jQuery (such as the CSS Selector code).

For example the jQuery.map() method is now 866% faster and jQuery.extend() is 19% faster. These two changes have allowed for dramatic improvements in performance all throughout the library.

.offset() is 21% faster

Together with the improvements to jQuery’s event handling code optimizations of .offset() have allowed intense mouse-based operations to become much faster. For example jQuery UI’s drag-and-drop code is now over 300% faster because of these change (allowing you to achieve faster, smoother, drag-and-drop operations).

.css() is 25% faster

A method that’s frequently called (both internally and externally). The optimizations to this method are easily felt in others (like .offset(), for example).

New Features and Major Changes

Dimensions Plugin is Now Part of Core

The remaining methods of the Dimensions plugin, by Brandon Aaron, have been introduced into jQuery core, along with additional bug fixes and performance improvements. This plugin has seen considerable use amongst developers and plugin authors and has become a solid part of the jQuery ecosystem. We’ve been, slowly, introducing the most-used methods from the Dimensions plugin over the past couple releases – but with the release of 1.2.6 all remaining methods are now part of core.

If you’re upgrading your copy of jQuery to version 1.2.6 you can now opt to exclude the Dimensions plugin from your code.

The full documentation for Dimensions can be found on the jQuery documentation site (and is in the process of becoming integrated with the core jQuery documentation).

.attr() overhaul

The .attr() method has been completely overhauled (resolving about 15 outstanding bugs). Additionally, the method has been significantly simplified and optimized.

.toggle() can now accept more functions

Historically jQuery’s .toggle() function has accepted two functions (to be toggled in an even/odd manner). However that has been changed so that any number of functions can be provided and toggled by a mouse click.

$("div").toggle(function(){
  $(this).removeClass("three").addClass("one");
}, function(){
  $(this).removeClass("one").addClass("two");
}, function(){
  $(this).removeClass("two").addClass("three");
});

You can now unbind bound .toggle() and .one() functions

function test(){ $(this).addClass("test"); }
$("div").one("click", test);
$("div").unbind("click", test);

$("div").toggle(test, test);
$("div").unbind("click", test);

.index() supports jQuery collections

jQuery’s .index() function has allowed you to find the location of a DOM element in the jQuery collection – now you can also specify a jQuery collection (the first element of which will be extracted and located in the original set).

var test = $("div.test");
$("div").index( test ) == 3

jQuery.makeArray can convert ANYTHING to an array.

jQuery’s internal .makeArray() method now converts any array-like object into a new array. Additionally it wraps all other objects as an array and returns the resulting set.

jQuery.makeArray( document.getElementsByTagName("div") )
// => [ div, div, div ]

jQuery.makeArray( true )
// => [ true ]

jQuery.makeArray()
// => []

beforeSend can cancel Ajax calls

The beforeSend Ajax callback has allowed developers to execute a piece of code prior to a request occurring – now that code can also verify the integrity of some parameters and cancel the resulting Ajax request (useful for tasks like form validation).

$.ajax({
  beforeSend: function(){
    return $("#input").val() == "";
  },
  url: "test.php"
});

Exposed Speeds

jQuery has a number of named animation speeds (such as ‘slow’, ‘fast’, and ‘default’) you can now provide your own names for animation speeds, or modify the existing ones, by manipulating the jQuery.fx.speeds object.

jQuery.fx.speeds.slow = 1000;
$("#test").slideDown("slow");

jQuery UI 1.5 release candidate, we’re getting excited

Posted on by

The jQuery 1.5 release candidate is now available at http://ui.jquery.com/download for everyone to test and download!

This is the most stable UI version ever, and it fixed all known bugs that are not in the categories “minor” or “trivial”, which means that we ourselves think it’s good to go. However, the reason why we’re still holding off with the final release is the fact that we want you to try out every aspect of our release candidate.

Therefore, the jQuery UI team encourages you to try out the demos on the website in any of the supported browsers, play around with every option you can find and test in different browsers using the new unit tests, which we’re finalizing right now. If you grab the whole development package from the website, it will come with unit tests for slider, draggables and resizables. We are working on other automated tests, which can be downloaded in the next few days from our SVN.

If you find anything strange going on, or if something isn’t working / looking like it should, that’s great :-) ! Please then submit your issue to us via the new jQuery UI bugtracker at http://ui.jquery.com/bugs/newticket. This will greatly help us to make the final release as solid as possible.

Now we really don’t want you to wait any longer than needed: I’m very excited to announce that jQuery UI 1.5 will be released and announced in exactly 6 days, on June 8th, along with updated documentation and a epic changelog to convince your bosses and collegues.

See you soon!

The jQuery UI Team