Saturday, January 02, 2016

What is JQuery?

Remember the Browser Wars?

Back in the day, pre Web everywhere, I was typing odd-looking graph theory describing hypertext (the Web) and mailing it to the Library of Congress for some reason.

I was living in WDC and exploring their collection at the time, though it's hardly "open stack" like Firestone (Princeton campus), which would entail more monitoring.  I was galvanized by the idea of hypertext and not having it, felt like a palpable absence.  CERN felt it too.

A lot of us saw hypertext coming over the horizon (Ted Nelson a main avatar), but the devil is in the details, meaning W3C and Mosaic, the first freely downloadable graphical web browser, got the ball rolling on a particular implementation centered around Hypertext Markup Language or HTML.

Netscape followed shortly, with its Mozilla engine (the core of FireFox today) and the Browser Wars had begun, each vying for supremacy, though for what reason?  What was this War all about?

Zooming out even further, these types of wars boil down to whether a lead company or cabal will set the standard, leaving others to play catch-up, or whether a global standard gets established with companies agreeing to write to that standard.

Both patterns make sense, although the latter one sounds less cut throat i.e. more civilized.  But sometimes "groupthink" or "designs by committee" are less than optimum and a pioneering company trail blazes a better way.  More curious things have happened.

JQuery enters the picture when the Browser Wars have mostly ended, with W3C committees having settled the standards all major browsers now follow.  We're in a time of relative civility.

However the legacy of the Browser Wars lingers and JQuery provides a logical layer above the battlefield, masking off some of the scarring inconsistencies.

For example, the JQuery event wraps the original event as an attribute, but for the most part the JQuery user remains blissfully oblivious to browser-specific details.  One ring to bind them all!

However saying JQuery detects and handles events bleeps over its core design, which is to select and filter based on HTML tags, classes, ids, attributes, and then apply changes against whatever crop is harvested.

One might select all paragraphs, or some div with id="special", and then apply new css, such as adding a class attribute, specifically to these elements.

Now, knowing what all that means requires knowing the shoptalk of tags and elements, HTML and CSS, which we may have neglected to consider as part of Language and Communications at the high school level (Unicode etc.).

Our curriculum is full of holes.  Many school systems have promised to address them.  Some will even deliver on their promise.

If you're looking for a fast way into JQuery and have a training budget, I recommend jQuery Essential Training with Joe Marini on  His presentation is well organized, moves at a good clip, and is a great introduction to this JavaScript tool, appreciated by many a web developer.