4 years of Encosia, and the best of 2010

General By . Posted December 22, 2010

It’s December 21st as I write this, which means it’s time for my yearly recap and a recounting of this year’s most popular posts. The way 2010 began, it threatened to be a tough fourth year of Encosia, but has eventually turned out to be a great year in the end.

Encosia-related metrics are up across the board, from page views, to RSS subscribers, to Twitter followers. In fact, the site has served right at one and a quarter million page views to JavaScript-enabled, human visitors in the past year. That’s chump change for a lot of larger sites, but it’s a number that’s truly hard for me to fathom in the context of my paltry trickle of niche content.

The year wasn’t all smooth sailing though…

Click here to read the rest of this post »

The 2010 Encosia Holiday Contest Results

General By . Posted December 13, 2010

526 entries later, it’s time to announce the winners of the 2010 Encosia Holiday Giveaway. Without further ado:

Congratulations! I’m contacting each of you right now via email or Twitter to get your prizes to you. If you haven’t received anything from me in the next 24 hours, please get in touch with me directly to be sure my attempt wasn’t marked as spam or otherwise thwarted.

I want to thank my friends James and Rob at TekPub for providing the TekPub memberships, and of course Microsoft for providing the MSDN subscription.

Finally, I want to thank everyone for participating. The topic suggestions, both in comments and the TekPub voting area have been even higher quality than I had expected. You can be sure that your feedback will influence what you read here and see at TekPub over the course of the next year.

Announcing the 2010 Encosia Holiday Giveaway

General By . Posted December 7, 2010

Each year around the 21st of December, I’ve ended the year with a brief recap and a list of the year’s most popular posts. That has worked well in the past, but this year I find myself in the position to give more than just information back to the community. So, as I close in on my fourth full year here at Encosia, I’m going to try something a bit different this time around.

This year, I’m going to precede that yearly recap giving away some great prizes, including a full free year at TekPub and Visual Studio 2010 Ultimate with a year-long subscription to the MSDN library.

Additionally, I know that many of you will already be spending time offline with your friends and family by the 21st of December. So, I’m also going to move things up a bit this year to make sure that everyone’s able to participate.

Click here to read the rest of this post »

jQuery Templates, composite rendering, and remote loading

JavaScript, jQuery, UI By . Updated December 4, 2010

In my last post about jQuery Templates, I showed you how to use template composition to build a template out of simple sub-templates. These composite templates are a great way to address the complexity that creeps into real-world UIs, as they inevitably grow and become more intricate. However, one feature missing from my last example was the ability to store those composite templates in external files and load them asynchronously for rendering.

I’ve described how to accomplish that with single templates in the past, using jQuery’s AJAX utilities and a particular usage of tmpl(). Unfortunately, remotely loading a group of composite templates from a single file is not quite as simple, and the technique I’ve described previously will not work.

Not to worry though, it’s still relatively easy.

In this post, I’ll show you how to move a group of composite templates to an external file, how to load and render them with jQuery Templates, and how to take advantage of an expected benefit to improve separation of concerns.

Click here to read the rest of this post »

Composition with jQuery Templates: Why and How

JavaScript, jQuery, UI By . Updated November 11, 2010

I doubt anyone was happier than I was to see that support for composite template rendering was added to jQuery Templates during the interim between the first community proposal and its recent release. If you’re a regular reader, you might remember that I personally lobbied for that functionality back in May, based on how I’ve used jTemplates’ similar #include feature.

Since then, a common question I’ve received amounts to: “Great, but why?”

I think that’s natural, because template composition is one of those things that can seem obscure until you put it to work for the first time. From that point onward, you’ll begin to see the structure of your client-side templates in a different light. Simplifying your templates into smaller logical parts and then combining those parts to create the desired end result is a powerful approach. It’s terrific for making large templates more approachable and maintainable over the lifetime of an application.

In this post, I want to show you an example of a scenario that template composition is well suited to, a couple ways that jQuery Templates’ {{tmpl}} feature can be used to simplify that scenario, and a bonus advantage that the composition approach provides even after the template has been rendered.

Click here to read the rest of this post »

Using external templates with jQuery Templates

JavaScript, jQuery, UI By . Posted October 5, 2010

Now that jQuery Templates is official and definitely will not include remote template loading, I wanted to publish a quick guide on implementing that yourself. As I mentioned previously, there’s a handy interaction between jQuery Templates’ API and jQuery’s AJAX methods that makes this easier than you might expect.

In this post, I’ll show you how to use a plain string as a template, how to asynchronously load an external template file as a string, and how to render it with jQuery Templates once it’s loaded.

Click here to read the rest of this post »

Understanding jQuery’s impact on Microsoft and ASP.NET

AJAX, ASP.NET, jQuery By . Updated May 19, 2011

It hasn’t been easy keeping up with the twists and turns that Microsoft’s client-side frameworks and libraries have taken in the past couple years. Even today, I still hear from a surprising number of developers that don’t realize the ASP.NET Ajax Library is dead.

With that in mind, I’ve been writing an article on and off for the past several months that attempts to disambiguate Microsoft’s various client-side initiatives and hopefully provide some clarity. When Karsten from Mix Online contacted me about writing another article for them, we decided that this would be a perfect follow up to the jQuery article I wrote for them last year.

Here’s the first few paragraphs:

When Microsoft announced they would begin providing official support for jQuery, few of us realized how profoundly that announcement would eventually impact client-side development on the ASP.NET platform. Since that announcement, using jQuery with ASP.NET has moved from the obscure, to a central role in ASP.NET MVC’s client-side story, and now to the point of potentially superseding ASP.NET AJAX itself.

The journey hasn’t been all smooth. With Microsoft’s move toward jQuery, the ASP.NET AJAX, Microsoft Ajax Library, ASP.NET Ajax Library and Ajax Control Toolkit roadmaps have been uncertain at times. This has made it difficult to keep track of which projects are still relevant, and especially which you should choose going forward.

In my last article for Mix Online, I discussed what ASP.NET needed to know about jQuery from development perspective. In this article, I want to provide clarity on the events that led us to this point, talk about what portions of the current AJAX framework are and aren’t affected by recent changes and show you where we’re headed next. In addition, I’ll dive into the implications of the recent announcement about the adoption of Microsoft’s template library by the jQuery core.

Click here to read the rest of this article at Mix Online

6,953 reasons why I still let Google host jQuery for me

JavaScript, jQuery, Performance By . Updated December 16, 2010

It’s been nearly two years since I wrote about using Google’s CDN to host jQuery on your public-facing sites. In that post, I recommended it due to three primary benefits that public CDNs offer: decreased latency, increased parallelism, and improved caching.

Though the post has been overwhelmingly well-received, concerns have been raised as to whether or not the likelihood of better caching is truly very significant. Since the efficacy of that benefit depends entirely on how many other sites are using the same CDN, it takes quite a bit of research to make an objective case either way.

I’ve never been happy about responding with vague answers. Caching probability is a valid concern and deserves to be taken seriously. So, I decided to cobble together an HTTP crawler, analyze 200,000 of the most popular sites on the Internet, and determine how many of those are referencing jQuery on Google’s public CDN.

Click here to read the rest of this post »

Announcing my new TekPub series, where you call the shots

General By . Posted September 1, 2010

Last Friday, the “final” two episodes of Mastering jQuery went live: Using Custom Events and Upgrading to jQuery 1.4. While we’ll almost certainly add another episode when jQuery 1.5 is released, we’ve covered what we set out to.

Weighing in at nearly six hours of video, we covered a wide range of content, and have had overwhelmingly positive feedback on the series. I hope you’ve enjoyed the episodes as much as we’ve enjoyed recording them.

I want to thank those of you who helped promote Mastering jQuery through Twitter, word of mouth, and other avenues. It became one of the most viewed series on TekPub, and that couldn’t have happened without your help and support.

Click here to read the rest of this post »

Hear me talk jQuery and ASP.NET on the jQuery Podcast

jQuery By . Posted August 30, 2010

The jQuery Podcast logoLast week, Ralph Whitbeck was kind enough to have me as a guest on episode #32 of the jQuery Podcast. We spoke about topics including:

  • Research I’ve done on the public CDNs that host jQuery, and why it matters which one you choose
  • Why you should never use a "latest version" reference to scripts on those public CDNs
  • The drawbacks of always waiting on $(document).ready()
  • My video tutorial series, Mastering jQuery

I really enjoyed talking with Ralph, and I think the episode turned out great. You can listen to it at: http://podcast.jquery.com/2010/08/27/episode-32-dave-ward/