14 June 2004
Javascript in Web Standards
It seems to be that when people think 'web standards', quite often they think XHTML, CSS, and some times JavaScript. The importance they put on those technologies is also in that order.
Despite the obvious flaw in that way of thinking (that is, that web standards are the up to date guidelines on how to use web technologies, not the technologies themselves), it always seems that JavaScript gets pushed to the back, or forgotten all together. For this reason I feel that JavaScript's place within web standards is a bit fuzzy, and that the amount of people talking about using JavaScript within web standards is lacking.
The side effect of this is that people are either shying away from JavaScript, or don't know how to use it properly and go about undoing all their good work with XHTML and CSS by using some really BAD JavaScript.
What I would like to know in this 'Ask the Audience' entry is;
- What resources do you use to learn how to implement JavaScript into your web standardised sites?
- Who do you think is on the cutting edge of using JavaScript within web standards in the blogging community? (like Eric M is for CSS)
- Do you feel that JavaScript does have a place in the future of the web?
I want to become better acquainted with JavaScript. I did learn a lot about JavaScript, but that was before I learnt anything about web standards. Now I feel as if I have to learn it all again. Any help would be great.
- Time: 21:00
- Ask the Audience
Comments ( 9 )
Eric
This is interesting to me...
Much of what I've seen on A List Apart in Javascript is less than impressive to me, and seems to break usability more than it helps.
So, I am anxious to know others' views on this subject, and as a sidebar, if anyone knows of a good resource to learn Javascript in a way that bypasses the useless aspects (rollovers, stupid smoke and mirrors) and focuses on the ways to interact with the DOM in a standards-compliant way.
Phil Baines
I think that Bert Bos' statement was extreamly harsh, and stupid. He will reap the reward for that one.
JavaScript DOM Programming is the way to go, yes, but I do not know the way. ;)
Chris
I tend to try and avoid using Javascript for anything complicated on my pages, instead substituting it for server side code and only using Javascript for validation and layer code.
Jennifer Grucza
I try to write Javascript that works in all browsers, or that degrades gracefully in browsers that don't support certain methods or attributes, so that I don't have to do any browser sniffing or multiple versions of code.
At work, I typically use Javascript for things like enabling or disabling input fields based on whether a checkbox or radio button is selected, expanding and collapsing trees, and similar things.
I haven't really gotten into seperating my Javascript from my HTML using event listeners, though. Though I do seperate out all commonly used functions into a seperate Javascript file.
Richard@Home
Web Standards and Javascript
It can be used to add additional functionailty at run time without bogging down your clean, semantic markup. See my article 'Back To Basics: Web Development turns full circle' ( http://richardathome.no-ip.com/index.php?article_id=227 ) for some examples.
Now we are moving towards a mindset that separates behaviour and presentation, javascript will become more and more exceptable. There are some excellent examples of this process already ( http://www.clagnut.com/sandbox/dynamic-accesskeys/ for one )
Phil Baines
I also think that Mr Rutters script is a great exampe of Javascript being used properly, and put to good use.
Jeremy Keith
JavaScript is the new CSS
In the same way that CSS should be abstracted to as a presentation layer over the content, good JavaScript acts as a behaviour layer over the content and presentation.
Up 'till now, a lot of JavaScript has been mixed in with the content layer: adding event handlers to tags which is kind of like adding inline style attributes. The age of unobtrusive JavaScript is about to dawn though.
Some names on the cutting edge:
Stuart Langridge
http://kryogenix.org/
Simon Willison
http://simon.incutio.com/
Peter Paul-Koch
http://www.quirksmode.org/
Phil Baines
"JavaScript is the new CSS" - Such a true statement! I really think that the way we use JavaScript is about to go through a massive period of enlightenment.
I understand what you mean by separating the Behaviour Layer, and such. I think the theory of it is just dandy. I just haven't had the ability to start implementing it yet. It is such a shame that I can only learn so many new tricks at one time.
Hopefully, with those links I can gain more knowledge and start using JavaScript in the way that it should be used. I have to admit that I am guilty of using inline JavaScript on this site to make my pop outs work in IE. With just a small bit of research I hope to get on top of that.
Once again, thank you for your informative comment!
texas holdem software
texas holdem software
Sorry, commenting has been disabled for a while. I am getting a stupid amount of comment spam, and need to find a new way of doing things.
I will not publish your email address, but I may use it to get in contact with you.
HTML tags and entities display as source; they do not render. To create a live link, simply type the URL (including http://).