Post Archive

› June 3, 2005

Javascript: what's next?

  • Reported by Alessandro

I was thinking about how javascript has evolved in recent times. The subject is really wide, so consider this post as a links-article: instead of repeating or summarizing what others have said, I'll use links as if they were concepts trying to maintain a logical thread. So, at least for the first reading, I'll suggest you to not jump on links, since most of them have a title.

In this article I'm sharing some of my reflections; I ask you to not consider them an absolute truth, but rather, my personal and modest point of view supported by some must-read articles and recent ground-breaking techniques. I hope that this will be both a resource to modern coding and an inspiration for further thinking.

It was said in the beginning of the year that 2005 is the year of DOM, and I fully agree. Those not in favor of javascript should realize that it's not the devil's plaything and that there's an easy way to write modern and accessible javascript.

I won't talk about Ajax: while it could certainly be revolutionary technology in web development, I'm referring to how some recent and interesting techniques are changing the way we do web design. Let's take a big step back four or five years ago, when CSS layout was spreading around. The times when the first CSS layouts came out on bluerobot, glish and box lessons. Since then, we have learned that we should provide proper structure for the meaning of our content, we shouldn't use tables for layout, but CSS for presentation, and finally we should separate content and structure from presentation.

Then javascript, and DOM in particular, was invited to the party we call now web standards. To javascript was given another layer of abstraction: the behaviour layer. While now we have concrete ways to use proper structure and presentation and to keep them well separated, but we're still just discovering the real possibilities of javascript.

Content, structure and presentation are now precisely defined, but I believe that the behaviour layer is too tight for javascript, javascript is not only about events, and separation is not good for the evolution of javascript. Modern javascript is in fact breaking the layer-model we thought was correct. I believe it's perfectly logical to have presentational javascript which can go throughout structure and presentation.

So, instead of asking ourselves how to keep javascript seperate from content, structure or presentation, we should realize that a separate-layers model is perhaps not adequate when dealing with javascript.

Apart from adding behaviour, Javascript in fact can change content, manipulate content, embed content, bring interaction to content, add visual emphasis to content, provide content to improve presentation, change presentation, enhance presentation, provide both extra structure and presentation, and even transform structure. Javascript surely can improve usability and perhaps improve accessibility.

Still convinced that javascript is only for behaviour? Most of the scripts, articles and techniques I've just linked were written in the last year.

So, what's next? Instead of asking what we can do perhaps we should try to define what javascript is and isn't, the possibilities are growing faster and are almost endless.

In my opinion, javascript should always be considered as an enhancement. It should not be thought of as a layer anymore, and the only separation needed is between markup and javascript. No more embedded event handler or functional links, please. The ideal place for javascript is in the head section.

Modern javascript should be made up mostly of DOM, and browser detection should be avoided save execeptional cases.

We should never provide core content or structure with javascript, while we can improve upon them. Javascript with the aid of DOM is an excellent medium to add non-semantical or presentational elements. Javascript with CSS is also, in my opinion, a very powerful mixture.

Javascript surely can enhance usability, but in my opinion, since it's an extra, in the end, it should not pretend to improve accessibility. Besides, Javascript (and also CSS) should leave accessibility of content and structure intact.

Our pages with Javascript should remain accessible to old browsers, users with Javascript turned off, and alternative browsers such as screen readers.

Finally, I'm beginning to think that in the end the most critical and dangerous use of javascript is for behaviour. Beware of this when, for instance, a badly coded dropdown would prevent some user to navigate your website (with no alternate navigation).

Well, after so many links, concepts and techniques perhaps your head is spinning. Just take your time to read and think. Here's the linkography:

Markup, CSS, separation and Web Standards

A small note: perhaps the CSS layout links are quite outdated, but I think that they contributed for the most part to the way we develop now, and I cited them for historical reasons.

Javascript articles and tutorials

Javascript techniques

Comments

1. June 3, 2005 09:35 PM

Quote this comment

david currey Posted…

"Modern javascript is in fact breaking the layer-model we thought was correct"

Then I would say that "modern" code is wrong. When using unobtrusive scripts it is even easier to keep code clean. There is no reason to effect the accessibility of a document by using javascript (even if it is an app), and those that are breaking the layer model we correctly thought was right are making the same code that gave javascript such a bad name until XHR was re-branded.

2. June 4, 2005 01:07 AM

Quote this comment

nortypig Posted…

I don't understand this line ... "The ideal place for javascript is in the head section" ... why is that better than in an external javascript file?

Isn't it better with say a few hundred pages to have the js in it's own folder instead of having to troll every page? I'm probably missing something... sorry.

3. June 4, 2005 01:17 AM

Quote this comment

Alessandro Posted…

David, not sure I explained it well. Javascript should always remain unobtrousive, that's for sure. The point is that instead of adding just behaviour, javascript could play with content, structure and presentation without affecting accessibility.

4. June 4, 2005 01:23 AM

Quote this comment

Alessandro Posted…

Nortypig, I didn't mean that we should write embedded javascript in the head section. The ideal place is in the head section.. but in external files! Sorry if I wasn't explicit on that.

5. June 4, 2005 01:24 AM

Quote this comment

aliotsy Posted…

Thank you! I've been looking for just this sort of article. I started discovering the DOM in the past year or so, and I've been looking for something or someone to help me in the transition from the tacky mouse trailer effects of the late nineties to the sort of experience-enhancing JavaScript we're seeing today.

6. June 4, 2005 07:24 AM

Quote this comment

Kevin McDonagh Posted…

I understand how people could sometimes perceive the role of JavaScript as an additional presentation tool. Its only very recently last 4 years there has been any such strict division of labour for our conceptual model in markup and presentation coding.

I myself though believe that all those actions that you described as presentational JavaScript are in fact inherently dynamic and should remain in their appropriate realm. CSS remains completely static and is more easily organised within the architecture of web design as being presentaional since that is all it provides and in the future when we move on to style sheets for many different mediums this will dramtically help our organisation. If someone wishes to use JavaScript to enhance the content then I feel that would be perfectly acceptable but would consider it an action fitting to the traditional behaviour layer. Interested to hear others view s though.

7. June 13, 2005 03:28 PM

Quote this comment

Dimitri Glazkov Posted…

Kevin,

Using JS for presentation is indeed behavioral, if it is viewed as a way to augment existing browser rendering engine with new presentational capabilities.

It is a presentational behavior! :)

8. June 17, 2005 06:58 AM

Quote this comment

Henry Posted…

How about www.webml.org as a Javascript successor?

9. April 16, 2006 08:44 AM

Quote this comment

tim Posted…

accelerator free elder couples fat weman absoloutely free free amatuer russian porn findaroo php adult sexy absolutly free Girl preteens adalt free adult sex chubby teen findaroo php nude man grannies fucking amimal sex live david but does absoluty free adult erotic absolutly free adlut video stars nues japanese forced lesiban fucking fattest bitches huge cocks galery teen amutre exotic amputee sexpics pakistani actresses actress nake fakes alessia Lolitas nudist nude celeb absoulutly free adoult hardcore Amateur teens big breast paki erotic absolutely free free free free xxx free toon freefemale male little angel absolutley free free erotic korean nude voyeur fucking absolutely free Celeb lesbian absolutley free adult india absolutely free adult asian asain schoolgirl absoulutly free couples fucking asianporno fotos adult very sex porn adult sex sex anal absolutely free virgin girs amature nude afroamerican sex xxx hentai absolutley free absolutly free free sex free demo free live free xxx absulutly free jeevs dbe high school seattletimes doctors bisexual free right months absolutely free Porn teens absolutely free adult sex Little sex absoulty free upskirt fakes nacked gay school gilrs click here free rape absolutly free ebony nude adlut lesbiansex adult nude sexyfree savers pics indian adualt sex Tgp lolita hot fucking absolutely totally hot wemen absolutly free africian sexy adult sex absolutly free adele stephens italian fakes absoloutely free secondpower phtml lolita india absoulutly free absolutly free abosolutely free Nudist little absolutely free anal freemovie desi son aishwarya sexcy Teens girl sex father findaroo php absoulty free amaeteur sex amateur sex vidoes granny amateur sex oriental teen adalt sexy japaness sexy anal sex absolutly free adult lesiban adult lesiban adultsex, adultsex Picture girl absolutely free absolutly free live hardcore Porn video absolutely free freesex video free pics absolutly free dounload full piss freemovie Naked galleries fan fiction piss golden japanes gril sexyfree clipart absolute free absoluty free cunt couples absolutly free abslutely free free women free pussy adult sex adult hotnudes alternative sex adult wemon absolutly free grandmother fucking this adult virgin girs sex porn absolut free absolutly free highschool girlsfucking simran sexfotos downblouse secretar aishwariya sex adult hetrosexual absolutly free sex free Teens photo Xxx sexy adult free nude chinise anal beads adult free amature sex pircing fotos asain schoolgirl littel . NO most beatifull boy cock free akira men fuck binaires erotica transsexuals female Naked video absolutley free absolutely jpg hardcore free slave gays absolutly free absoluty free absolu free amaters photos free nude young hairless adult blond granny fucker absolutly free amature black iranian fuck singapore schoolgirl absolutely free just asian absolutley free free pics absolutly free softporn asian black cocks toon porn findaroo php asses fuck adult exibitionist people schoolgirl absolutely free bisexual free absolutley free amature transexuals absolutly free absolutly free adult sextoon Picture nude pissing xxxrated Hot gallery suck models naked fat absoltely free adult sex japanise fucking free nude free rape absolutly free naked pictures absolut free horny fathers absolutely free this panties littel boy absolutely free free adult gif big nude sex japanes exotic absolutely free black erotica sadism female Preteen gallery echi hentai adult computer nudist amateur mom son free thumbs adullt image buttfuck free tom vassos frr big Lesbian club ass funking free cum inda prono free nude e man free online photos hentai naked teenages free alaskan free sample videos clips sample movies denmark nude upskirt peep bedava sexvideo yearsold sweet pubic vergin ebony sexgirls hot blondes long dong hot tits lesbian teen amature gallary malaysian teen uncencored hentai spanish, spanish thumb nails free pics amatur galleries free teen sexy twinkle big tits free pics gang bang fatlady cartoons pregant streaming silk panties nude xxxvideos sample video free fat free nude eroticanime south amercan picturesof pamala sexyfree stockquotes upskirts softporm free illegal adult sexx teens shaved ebony fourteen . NO !! NO lolitas japanese pics clickheretofind fat teen boys nude comics free thums free nude cumshot teengirl porn thumbnai free pamala free pamala skinney sex porn jenna sorority sluts sexy women dad sexy toons sex japan nonnudes free picture totaly free nauty upskirts anime hentai hardcore sixteen voyuer japan porn old japanese gay montana stream urdu erotic sally oasis skinney sex free nude insest photo girls pissing asia teen free fuck downlode hidden chineese japan hardcore pornpic free hot absolutly free naked women porn old free waltdisney adult anime asult toys free adult olderwomen wearing teenytoons, tenny live streaming blow jobs innocent vergin sexyfree thumbnail nudism nudist russian sexi fat teen free naked little cherry avi sex erotic sex britney spears hot turkish sample sex fucking pregant chinesegirl free teen spanish free russian live eating mdmaukf pvec resources canadian old jappanese videos pregnant fourteen year xxx sex mother son underground hentai free gay lionking xxx sexyfree poontang nude girle free topless cindy crawford webcam sex live streaming saigon sexgirls free son asian asses playmate pamala blojob videoclip comic toon free teen stories errotic free sex photos young sample gallerys free adult sample video horny adultcartoons adult sexx sample video argree titanic ricks erotic fatbooty thumbs girls woman nice size free extream trampling stories old lady ladyboy spy nude brazilian porm thumb pornstar tiny school showers bollywood heroines knee socks chicks strapons ejaculation videoclips sex photos teen stories freepics teens sample video free schoolgirls naked women innocent girls sexywomen nude galerry woman sexy gay men train upskirt rape lover dowloads sex pic sexvideos free naked anime hentai free live mature sex cheerleaders upskirts canda male softcore girls shemales whith eros girl twink showers ebony nude pamel anderson undress girl free boy model swimsuit pornlist sex china porn totaly free interracial thumbs chinese sex spanky lounge young pissing galery upskirts aika miura holiwood picture galore teen schoolgirl fanny blackwomen their young latina scat thumnails adult online age play cartoon sex amputee sex youngest spanish redhead groups diferent fucking wet steamy adult free fifteen year free sex school teacher ppussy tits teeny tiny picture student aisa sluts fucken sexy eroctic gay click here softporn pic free litle phillipines sex nude filipino sexy thumbnail virtual free free xxx pics horney free school free blowjob ilegal porn nude free bulma sexy asain men adult sex erotic stories free hantai real upskirts hindi erotic free litle japan sluts naked teenagers horny high webcam turkish free animated free free aisa sexy india sexi previews spanking hot naked lesbians sucking free hirsuite anal teen stories changed pussy sucking indian punjabi animae adult