That's incredibly comprehensive, a great primer. It's interesting how the call-chaining gimmick of JQuery actually turns out to be nothing of the sort -- it's really the core idiom of what's almost a DOM-centric DSM.
There are a still a couple of places in those slides where it does obfuscate things, though, and it would arguably be clearer to have two or three discrete statements -- mainly when the chain's context is popped with end().
I guess it says a lot about the flexibility of JavaScript that largely the same functionality ends up being expressed so differently in JQuery, YUI, Dojo and Prototype.
Really helpful sets of slides for non-programmers jQuery users (like me).
I have a question regarding the label.js example: for example, if it is used on a contact form and the visitor hits the submit button without changing one (or all) of the input values, will them be submitted with the contained value (like "First name")? or will the be submitted as empty?
Of course, on the server-side there could be a validator that checks the form, so it can be extented to not validate the values that are equal to the labels, right?
Other approach could be to add some jQuery magic so when visitor clicks on the submit button, those fields that still have the "default" (=label) values, are set to empty again, so they will be submitted as empty. What do you think?
You had me at the first slide.
LOL!
Very Helpful, thanks for sharing.
Mark Baggott - 6th May 2008 21:38 - #
Very good work, congrats!
That's incredibly comprehensive, a great primer. It's interesting how the call-chaining gimmick of JQuery actually turns out to be nothing of the sort -- it's really the core idiom of what's almost a DOM-centric DSM.
There are a still a couple of places in those slides where it does obfuscate things, though, and it would arguably be clearer to have two or three discrete statements -- mainly when the chain's context is popped with end().
I guess it says a lot about the flexibility of JavaScript that largely the same functionality ends up being expressed so differently in JQuery, YUI, Dojo and Prototype.
phl - 8th May 2008 11:23 - #
oops - 8th May 2008 11:30 - #
Really helpful sets of slides for non-programmers jQuery users (like me).
I have a question regarding the label.js example:
for example, if it is used on a contact form and the visitor hits the submit button without changing one (or all) of the input values, will them be submitted with the contained value (like "First name")? or will the be submitted as empty?
Of course, on the server-side there could be a validator that checks the form, so it can be extented to not validate the values that are equal to the labels, right?
Other approach could be to add some jQuery magic so when visitor clicks on the submit button, those fields that still have the "default" (=label) values, are set to empty again, so they will be submitted as empty.
What do you think?
Julián - 9th May 2008 20:16 - #