Applying OOP principles to jQuery

some job descriptions now include:

[quote]Applying OOP principles to jQuery development[quote]

would appreciate being enlightened here a bit… I’m very good with DOM-scripting with jQuery… and also have basic OO, but would love to see some elaboration here, maybe code samples…

thank you…

I don’t think I would be quite sure what this employer was looking for either. jQuery of course manipulates lots of objects, especially DOM objects, but the vast majority of jQuery code is written in a procedural style. There’s no object type hierarchy or composition. There’s just the one, monolithic jQuery object type. Not even jQuery.extend does prototypal inheritance. It actually just copies properties from one object into another.

If you want to see what real OOP principles looks like, you should check out other libraries such as YUI, Dojo, or ExtJS.

Though, I suppose it’s likely that the employer used the word “jQuery” as if it were a synonym for “JavaScript”. In which case he’s actually asking about OOP principles in JavaScript.

Some resources about JavaScript OOP that might help:

yes I thought someone would say something like this…

(yes they could be referring to plain JS instead of jQ, like other responder said, but if it’s a job description for a web developer one would think they’d get the terminology correct, right? ;~))