[Javascript] Hopefully quick question.

Scott Reynen scott at randomchaos.com
Sun Oct 4 21:19:50 CDT 2009


On Oct 4, 2009, at 6:03 PM, Troy III Ajnej wrote:

> Not counting but, there's been 8 years or so, that I've been listening
> to all kinds of morons yelling STANDARDS; W3C; "how it shoould be"
> "document.getElementById('ID') - IS BETTER" etc etc etc...
>
> I mean, why is there, all of a sudden, this sort of need for coding
> convenience when there was a beautifully nice, clean, simple and
> ultra-convenient  mydiv call and super-widely supported also;
> Just like super-convenient innerHTML is, and has been for little over
> a decade or so?

Framework convenience functions are generally based on standards.  For  
example, if you look at the jQuery source, you'll see that ID-only  
selectors like the one that sparked this thread are passed directly to  
document.getElementById().  Of course, the same function that does  
that can also do selection by class name, tag name, attribute values,  
position in a tree, position in a list, and so on.  If all you're  
doing is selecting things by ID, yeah, it's not very helpful.  But  
that's a very limited use case.  I'd be curious to hear how you handle  
those other use cases without a framework.  Or do real coders not  
select on anything other than ID?

> Why didn't people, for their own coding convenience's sake stick to it
> as they did with innerHTML so that W3C bandits would finally get  
> forced
> to accept it as they did with the previous?

The W3C doesn't consistently follow de facto standards.  Frameworks  
generally abstract away browser implementation differences, so even if  
everyone drops support for innerHTML tomorrow, as long as they replace  
it with some other way to do the same thing, the same functions will  
still work in most frameworks.  In that same scenario, innerHTML  
would, of course, stop working.  And, of course, there was a time when  
it wasn't clear innerHTML wouldn't suddenly disappear, so whoever  
criticized your use of innerHTML years ago so strongly that you still  
haven't let it go, that person was probably right to do so.

> Why are people wasting time on learning how to use javascript
> skinners like these, considering other people scripting habits as  
> their
> scripting knowledge, and atop of it forcing clients to download up to
> 200KB for a crap like that, instead of learning to code for real.  
> That is:
> javascripting?!!

Ha.  I remember when real coders used assembly, and then C, and then C+ 
+, and then Java.  It's nice to know real coders can use JavaScript  
now, if not yet the frameworks used by the non-real coders who are  
doing all the cool work.  Also, I really appreciate the extra touch of  
this elitism coming from a hotmail address.  Comedy gold!  Thanks a lot.

Peace,
Scott



More information about the Javascript mailing list