Home & blog  /  Tag: NET  /

Article by me in next issue of .NET

posted: 06 Aug '12 18:19 tags: .NET, jQuery, deferred

You might recall I did a tutorial last year for .NET Magazine, an introduction to regular expressions. Well, the next issue (?) will feature another one from me - this time, a jQuery catch-up piece.

The premise is this: many developers got comfy with earlier versions of jQuery. A scout around some big traffic sites proves this; many are still on 1.4 or 1.5.

But jQuery hasn't sat still; it has developed, and at some pace. The article will look in turn at jQuery 1.5, 1.6 and 1.7, covering some of the main features in each release:

Deferred objects

I'm a particular fan of the deferred objects concept, and jQuery's implementation of it is a good one. They offer a wealth of flexibility with regards to how you approach callbacks to asynchronous - or even synchronous - operations. These arrived in jQuery 1.5 as part of a major overhaul to jQuery's AJAX module, and are therefore probably the most notable feature of jQuery in recent years.

In the article I'll show not only how they can be used with AJAX (their most common haunt) but also for situations other than AJAX. I demonstrated this here a few months ago when I showed how deferreds could be used to make an interactive word game.

Word game made with jQuery

Attributes vs. properties

1.6 was a quieter affair; no new major features, but a handy tidy-up of how jQuery handles attributes vs. properties. Until 1.6, both had been dealt with via the attr() method. Whilst helpful, this unhelpfully gave the impression that attributes and properties were one and the same.

If you're not sure of the difference, I go into it fully in the article.

on() / off()

Of course the big arrival in 1.7 was an encapsulated approach to events. By 1.7 the events API had got pretty messy, with all sorts of methods kicking around. 1.7 introduced on() and off(). The former can be used for both direct and delegated events, such that no other method is required (previously, if you wanted to delegate, you had to look at live() or delegate()).

XMLPlayground

While we're talking about .NET, I was pleasantly alerted on Twitter today to the fact that they featured my very own XMLPlayground.com in their list of top recent tools. Happy days!

1 comments | post new

My article in .NET / update to Dropdown

posted: 03 Sep '11 18:54 tags: REGEXP, .NET, article, me, dropdown, image

Remember I blogged a few months back that I'd been approached to write for .NET? Well my article is in the latest (September) issue, so perhaps you've seen it.

It's a beginner's guide to tackling regular expressions - one of the most avoided and feared areas of programming for elementary-intermediate-level developers.

There's an annoying typo; the * modifier, of course, matches zero or more characters, not one or more. D'oh. I had meant the + modifier, which does match one or more characters.

In other news, following a recent update to my jQuery Dropdown script (which allowed it to be used as a form field, not just as a navigational tool), there's been another update.

In the comments on the script page, Michael Eaton requested that it be possible to include icons in the 'options'. This is now possible!

Head over here to download, get usage info or view a demo.

post a comment

REGEX article by me in .NET magazine

posted: 13 Jul '11 21:07 tags: REGEXP, .NET, article, me

I've just completed an article for .NET magazine, to be printed in one of their upcoming issues. The article is an introduction to - what else - regular expressions, and why you should get into it.

There's three good reasons, actually. Firstly, and most simply, you'll gain the benefit of a very powerful part of programming. Secondly, REGEX grammar is implemented in much the same way across multiple programming languages, so learning it in Javascript also means learning it (or at least to a large degree) in whatever else you program in - say, PHP.

Lastly, and perhaps most importantly, it sets you apart. The age of jQuery means everyone is a JS developer these days. Mentioning on your CV that you know REGEX makes clear you REALLY know Javascript, rather than simply dabble with a few jQuery plugins.

So look out for that one. I'll do a follow-up post when they finally publish it.

2 comments | post new