Slashdot Mirror


DHTML Utopia

Bruce Lawson submits the review below of Stuart Langridge's Excellent guide to creating dynamic web pages; scalable and sensible., writing "Don't be put off by the title: the DHTML here bears no resemblance to the stupid Web tricks of the late 90s that allowed animated unicorns to follow your cursor or silly Powerpoint-like transitions between Web pages." Read on for the rest. DHTML Utopia: Modern web design using JavaScript and DOM author Stuart Langridge pages 300 publisher Sitepoint rating 8 reviewer Bruce Lawson ISBN 0957921896 summary Excellent guide to creating dynamic web pages; scalable and sensible.

This book is the opening salvo in the latest battle in the Web Standards war -- the battle for unobtrusive JavaScripting, or Unobtrusive DOMscripting as many call it, in order to rid it of all the negative connotations that "DHTML" and "JavaScript" bring. Combined with the non-standard XMLHttpRequest object, it's sometimes referred to as "Ajax". Terminology aside, though, what are the substantive differences between the old-skool and the "modern" of the title?
  • Graceful degradation. A great example of this is Google Suggest in which the DOMscripting enhances functionality by making the page feel more responsive, but if you don't have JavaScript for some reason, the page still works.
  • Separation of structure, presentation and behaviour. The DOMscript deals with the behaviour in the same way as CSS defines the presentation in the brave new Web standards world, and the three remain separate. The html has no JavaScript in it at all -- everything is handled by in separate code files.
  • No browser sniffing. This aims to future-proof code by testing for features rather than sniffing for browser name and version. So, before using the TimeTravelCureCancer method, the current browser is tested to see whether it's supported. If it is, the script continues. If it isn't,the script silently fails with graceful degradation.
Theory sounds cool -- how's the damn book? I was pleasantly surprised by how quickly the book gets to work. Even before page numbering begins, the introduction has a lucid and compelling argument for using HTML 4.01 rather than XHTML as the markup language of choice.

Chapter 1 has a brief (6-page) overview of the importance of valid code and separating presentation into CSS, and a short description of the unobtrusive nature of Langridge's scripts: no script in the mark-up at all; instead, the .js files contain "event listeners." The reasons why this is desirable are promised later. Chapter 2-4: The basics Now that document.write in the html is no longer needed, you need to know the "proper" way to add text or elements to a Web document. So Langridge gives us a tour of the DOM, showing how to walk the DOM tree and create, remove and add elements to the tree. It's methodical, and by the time I was beginning to get a bit tired of theory and thinking that you'll have to prise document.write out of my cold, dead hands, we get an "Expanding form" which allows us to expand a form ad infinitum to sign up as many friends as you want to receive free beer, without ever going back to the server. (You can see such a thing in action in gmail, when you want to attach multiple documents to an email).

I started to warm to the author and his style. 33 pages into the book, and we get a real-world working example to examine (I like my theory liberally garnished with practice). I also feel a kinship with authors who fantasise about mad millionaire philanthropists giving away beer.

By chapter 3, we've really got going. Apart from one rather pedantic edict (the event is mouseover, the event handler is onmouseover and we should separate the nomenclature, even though it makes no practical difference), the focus here is on real-life browsers. And, as we all know, in Web dev books, real-life browsers means grotesque exceptions to our ideal-world rules .Strangely -- and oddly satisfyingly to this PC user -- the culprit isn't only the perennially despised IE/ Win; shiny Safari comes in for a good bit of stick!

The real-world example here is a data table that highlights the whole row and column of any cell that's being moused-over. Now, in any modern browser except for IE/ Win, the row could be given a hover pseudoclass (IE/ Win only allows :hover on anchors). But as there is (weirdly) no HTML construct for a column, this effect can only be achieved through DOMscripting. What the script does is to dynamically append a class name to every cell in the row and column at run time -- and the pre-defined CSS file determines the styling of that class.

Herein lies an advantage in Unobtrusive DOMscripting: you could just take this script and plug it into a Web site without changing any of the html (except to add a link to the script file in the head). But the script is relatively complex for a newbie to code, and for the techniques to be widely used, I suspect that the billion old-skool cut'n'paste JavaScript sites will need to be replaced with a single, canonical library of modern scripts for people to cut and paste from. For those who find CSS challenging, JavaScript is probably even more complex. . Chapters 5 - 7: blurring the division between Web UI and application UI It's a truism that the Web has set back UI development some years -- in fact, back to the old dumb-terminal paradigm of filling in a screen full of data, pressing the button to send it back to the mainframe and waiting for the next page to be sent -- or the old one returned with errors noted.

Langridge shows that we can make the experience smarter than this, going beyond the traditional JavaScript client-side validation interactivity by adding animation to allow text to fade in and out over time, styling tooltips to be sexier than the default yellow box and which can gently appear into view rather than the browser default on/ off state are examples that struck me.

When I first read these, I thought they were cheesy gimmicks -- the modern equivalent cursor-following unicorn -- until I considered more deeply and realised that many of the UI elements that we enjoy in modern desktop apps are precisely these small, cosmetic effects: abrupt transitions, lack of transparency, sharp edges to UI widgets all feel like old operating systems or clunky Web pages.

It's not all touchy-feely; we get auto-complete text entry, degradable calendar pop-ups, flyout menus and lessons in OOP, encapsulating code for re-usability, and avoiding Internet Explorer memory leaks. Chapters 8- 10: seamlessly working with the Server So far, so client-side. Where Unobtrusive DOMscripting really gets developers juices flowing is the ability to communicate with the server without obviously refreshing the page. Chapter 8 takes you through a variety of methods. Some, like the hacky iframe method or hideous 204 piggyback method are so gruesome that I breathed a sigh of relief loud enough to wake the cat when I finally turned the page to read "XMLHTTP". This method (which is non-standard and introduced by Microsoft) has ushered in the Next Great Web Thing: asynchronous communication with the server. Langridge walks through using the Sarissa library to make a user registration form that checks whether the user name you choose is taken, and if so, suggest some alternatives without refreshing the page.

There's a lot of unresolved accessibility problems with the Ajax method (how does a screenreader alert the listener to the fact that something new has appeared on the page? How do they navigate and hear the new stuff in context?) and while it is laudable that Langridge notes these issues exists, I'd hoped he would have suggested some solutions. He doesn't, but as he's a member of the Web Standards Project's DOMscripting task force I'm guessing it's being worked on.

The project that really kicks ass in this section is a file manager, like the one in most people's Web site control panels, where you can actually drag and drop the icons, like an operating system, and the server does the work. Langridge carefully goes through all of the steps, all of the pitfalls and all of the code needed to make this happen in any modern browser.

It doesn't take a lot of imagination to realise just how this could revolutionise the Web experience. Drag and drop products into a shopping cart. Drag the shopping cart to the checkout icon. Moving money around bank accounts in some integrated internet banking application. The possibilities are huge. Conclusion The whole technique of unobtrusive DOMscripting needs further research before it's ready for prime time -- particularly from an accessibility point of view, but then as an accessibility bore you'd expect me to say that. I think it's beyond question that there's ideas in here that radically enhance the usability of Web-based applications by making them more intuitive and more like the desktop drag-and-drop interface we know from our desktops.

This is a good-humoured, thoroughly-researched book that combines theory with practical learn-by-doing examples. To this reviewer, the code appears scalable and sensible. This book is never going to appeal to the quivering aesthete designers -- probably because it's fundamentally about code. But precisely because it proposes a complete separation of code and design, it facilitates the advancement of the Web.

You can purchase DHTML Utopia: Modern web design using JavaScript and DOM from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

154 comments

  1. Re:Save Some Money by Anonymous Coward · · Score: 0

    Sure. I'll just click through your redirect.
    Blow me.

  2. Re:Save Some Money by soniCron88 · · Score: 1, Informative

    Sure, so you can get referral bucks for it? Whatever. Interested parties can get it from this untracked link.

  3. Re:Save Some Money by Anonymous Coward · · Score: 1, Informative

    Or HERE without this guy's referer code included.

  4. Unicorns by onion2k · · Score: 4, Funny

    stupid Web tricks of the late 90s that allowed animated unicorns to follow your cursor

    If my boss reads Slashdot I think I know what I'll be asked to add to the corporate website tomorrow morning..

    1. Re:Unicorns by op12 · · Score: 1

      A cursor?

    2. Re:Unicorns by varmittang · · Score: 1

      What, actual content worth reading.

      --
      -----BEGIN PGP SIGNATURE-----
      12345
      -----END PGP SIGNATURE-----
    3. Re:Unicorns by Surt · · Score: 1

      Well if you do, you can start with these excellent resources:

      http://bunnyherolabs.com/adopt/

      http://byjoni.com/blueunicorn.html

      --
      "Who is the Journal of Quantum Physics going to believe?" --Stephen Hawking
    4. Re:Unicorns by Fallingcow · · Score: 1

      Holy crap, the "HTML Writer's Guild"! I hadn't seen their logo on a page in *years*. Thanks for the trip down memory lane!

  5. Birth of Ajax by webword · · Score: 3, Informative

    For your reference, this is how "Ajax" got started. I'd say about 75% of the article is useless, but about 25% is actually useful. The main value of the article can be summed up in two words: Mi>eye candy. Jesse James Garrett is good with graphics.

    Ajax: A New Approach to Web Applications

    1. Re:Birth of Ajax by sykjoke · · Score: 1

      Well, when I worked at Experian 3-4 years ago we were doing all of that with JavScript, XSL, CSS, XML, Cobol for the main frame and no server side web scripting. On a typical page we would run a number of dynamic transactions that just modified the DOM instead of posting the page. Everything was based on standards where support was available (e.g. IE hack around code wasn't standards based), everything had to pass Bobby accessability and it all had to be simple to use (The police were one of our clients).

      Anyhow I hope someone has patents on Ajax, I'd love to take them out with prior art.

  6. Why do it yourself? by MosesJones · · Score: 4, Interesting

    The challenge with Ajax, and complex DHTML is that a slight error produces big problems. Its a shame that the book doesn't look at the tooling approaches for instance the Ajax plug-in that Sun have released (via Open Source). DHTML and these active elements can be great, but as a practice I'd be more inclined to have a few people invest time in developing components that the majority of people can use, rather than having lots of people trying to understand the complexities, and buggering it up.

    Interesting technology, but too easy to use REALLY badly. It would have been nice if the the book had covered how to build SOLUTIONS using DHTML, rather than focusing on how an individual can use it.

    --
    An Eye for an Eye will make the whole world blind - Gandhi
    1. Re:Why do it yourself? by b4k3d+b34nz · · Score: 2, Insightful

      While plugins like the one that Sun released are nice, the battle of course is with flexibility. That's why people build their own content management or forum systems, even though there are plenty of choices like Mambo and PHPBB. Sure, plugins are at a lower level, but the point stands--they can't always provide the flexibility necessary.

      The challenge with Ajax, and complex DHTML is that a slight error produces big problems.

      I think the challenge with any program is that errors produce problems. That's why they're called errors. Thankfully, most languages, including JavaScript/DHTML/AJAX/whatever we call it this week, have a try/catch error handler.

      --
      Grammar Lesson: you're is a contraction of "you are"; your means you possess something; yore means days gone by.
    2. Re:Why do it yourself? by Flammon · · Score: 1
      The challenge with Ajax, and complex DHTML is that a slight error produces big problems.

      I think that slight errors in any framework or programming language can cause big problems and not something particular about AJAX.

    3. Re:Why do it yourself? by Anonymous Coward · · Score: 0

      The plugin looks interesting... thanks for the info.

    4. Re:Why do it yourself? by Anonymous Coward · · Score: 0

      I'm not sure that Sun plug-in is general purpose enough to be included in a book like this. There's a lot of us not using JSF for the view layer of our Java applications and even more people out there using PHP, Perl, ASP and other technologies. Since Ajax techniques execute in the client environment, each platform will need their own library.

      However one thing that could have been mentioned to help simplify this type of web interface is a library like Prototype. The fact that it can be used by everyone who wants to use these new techniques make it, IMHO, a more useful library and something that should have been talked about in the book.

    5. Re:Why do it yourself? by AstroDrabb · · Score: 1
      but as a practice I'd be more inclined to have a few people invest time in developing components that the majority of people can use, rather than having lots of people trying to understand the complexities, and buggering it up.
      Did you RTFA or even the post? An Open Source cross-browser implementation called Sarissa does that.

      Sarissa Oveview:

      Sarissa is an ECMAScript library acting as a cross-browser wrapper for native XML APIs. It offers various XML related goodies like Document instantiation, XML loading from URLs or strings, XSLT transformations, XPath queries etc and comes especially handy for people doing what is lately known as "AJAX" development.
      --
      If Tyranny and Oppression come to this land,
      it will be in the guise of fighting a foreign enemy. -James Madison
    6. Re:Why do it yourself? by tigersha · · Score: 1

      Yes, and if anyone writes ANY documenttation for prototype I am sure lots of pwople WOULD use it.

      --
      The dangers of excessive individualism are nothing compared to the oppressiveness of excessive collectivism
  7. Re:Save Some Money by Anonymous Coward · · Score: 0

    Heaven forbid somebody actually makes a few bucks besides amazon!!! Our whole communist happy world is crashing down!!! What a fucktard.

  8. Does anyone read these things before posting? by Anonymous Coward · · Score: 0
    Bruce Lawson submits the review below of Stuart Langridge's Excellent guide to creating dynamic web pages; scalable and sensible., writing [...]

    Copy'n'pasted the summary instead of the title, didn't you?

  9. thanks by larry+bagina · · Score: 0, Redundant

    i have a low opinion of most slashdot book reviews (and the books they review), but this [book|review] sound good.

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

  10. Regardless of theory by DevanJedi · · Score: 1

    Only in the past few years has client-side web scripting come out of its 'kiddie' version to demonstrate some really cool hacks (many google examples come to mind) which- coupled with CSS- have changed how we interact with web sites and how they are built. Standards-compliance and strict separation of content and presentation makes CSS+'AJAX' seem like a leap forward in technology when it is actually just a prudent and smart use of old technology. It is a matured technology and with the latest news of IE7 coming closer to compliance, things will only get better. Now if only we could get those kids at home building their first web pages with MS Frontpage to learn...

  11. Please... Don't by esconsult1 · · Score: 3, Insightful
    It doesn't take a lot of imagination to realise just how this could revolutionise the Web experience. Drag and drop products into a shopping cart. Drag the shopping cart to the checkout icon. Moving money around bank accounts in some integrated internet banking application. The possibilities are huge.
    I'd really hate having to do the above. What would be better and smarter (IMHO), is to:
    1. click on the "Add to Cart" button
    2. AJAX adds the product to the card without refreshing the page.
    It seems to me that AJAX works worderfully in limited cases that gets rid of the annoying browser refresh problem.

    Expect to see flooding the internets(tm) over the next few months annoying over-use of AJAX in every single way that programmers can -- even if they don't need to.

    1. Re:Please... Don't by Anonymous Coward · · Score: 0

      You're missing the point. Yeah, drag the product to the shopping cart. But don't make it mandatory, leave the 'Add to Cart' button in as well. I think that was implied, as how often do you see a feature that can ONLY be triggered by drag-and-drop?

    2. Re:Please... Don't by kae_verens · · Score: 1

      I'm working on something like that - check this out: https://inkjet.ie/shopping cart?catid=22

      It's not quite perfect yet, and is not accessible yet, but the functionality is there.

      When I'm happy with the cart's functionality, I'll be writing an article explaining exactly how it was all done, and what problems I came across while building it (uploading files through AJAX is a pain, for example).

    3. Re:Please... Don't by Anonymous Coward · · Score: 0

      you can see this in action in http://vingo.tv/

  12. Ruby on Rails by threaded · · Score: 1

    Ruby on Rails is really sweet for that AJAX stuff.

    1. Re:Ruby on Rails by Anonymous Coward · · Score: 0

      Ruby on Rails sucks donkey nuts and so do you.

    2. Re:Ruby on Rails by Anonymous Coward · · Score: 0

      And you, sir, suck monkey ass hair.

    3. Re:Ruby on Rails by Anonymous Coward · · Score: 0

      Mmm... Dingleberries...

    4. Re:Ruby on Rails by willCode4Beer.com · · Score: 1

      Rather than invite flames (as your other replies) with a useless comment, why not tell why this is so?
      How about explaining your statement.
      Give a small example.
      Saying RoR is sweet doesn't help the Ruby community or the Slashdot community. I could say using modperl or IIS/ASP is sweet for AJAX but, it would serve no purpose.
      Why not add a comment that informs and helps the reader?
      Why not respond to this post saying how Ruby on Rails and AJAX can work together? That might provoke interesting and informative discussion rather than fanning the flames. Everyone would benefit.

      --
      ----- If communism is a system where the government owns business, what do you call a system where business owns govern
    5. Re:Ruby on Rails by Anonymous Coward · · Score: 0

      I'm fanning something at you...

    6. Re:Ruby on Rails by JamesOfTheDesert · · Score: 2, Informative
      Why not respond to this post saying how Ruby on Rails and AJAX can work together?

      Ruby on Rails has clean, built-in support for template code that generates the client-side Javascript for using the prototype.js library.

      It makes it next to trivial to create, for example, Google Suggest text fields because the developer focuses on using Ruby syntax to indicate the server action to invoke, based on what client behavior, and what to do when the results come back to the browser. The annoying little details that are easy to muck up are handled for you.

      This may help explain more

      http://www.onlamp.com/pub/a/onlamp/2005/06/09/rail s_ajax.html

      --

      Java is the blue pill
      Choose the red pill
  13. broken link by Anonymous Coward · · Score: 0

    Google paths are case sensitive, so the link should be: Google Suggest.

  14. Re:Save Some Money by Anonymous Coward · · Score: 0

    Suck my balls, douche caboose.

  15. MOD DOWN - REFERER LINK SPAMMING ALERT by Anonymous Coward · · Score: 0

    do NOT click the parent's link

    he will benefit from this blatant attempt at spamming. he is no better than other spammers like Roland Piquepaille.

    1. Re:MOD DOWN - REFERER LINK SPAMMING ALERT by Anonymous Coward · · Score: 0

      Roland Piquepaille is no spammer - he's an educator, a true humanitarian, dammit!

    2. Re:MOD DOWN - REFERER LINK SPAMMING ALERT by Saeed+al-Sahaf · · Score: 1

      After enhancing my dietary supplements with Roland Piquepaille's ball sack sweat, I can tell you that my hair is growing back, my penis is longer and harder and with bigger girth, and the chicks like me.

      --
      "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
  16. Bookpool has it cheaper than bn.com by COBOL/MVS · · Score: 2, Informative

    Bookpool has this book for $24.95 with no club to join. Bn.com has it for $39.95 (save $5 if you're a club member).

    --
    GOBACK.
    1. Re:Bookpool has it cheaper than bn.com by Anonymous Coward · · Score: 0

      Yes, but Bookpool lists it as "out of stock"

    2. Re:Bookpool has it cheaper than bn.com by COBOL/MVS · · Score: 1

      I'll be danged...

      Must be why it's so much cheaper.

      --
      GOBACK.
  17. Re:Save Some Money by Hobobo · · Score: 1

    I don't see why people hate giving others referals. I mean, when people get referal bucks it only costs Amazon.com money--why is everyone on the lookout to save Amazon a few dollars? It's not like it hurts you to help out someone in this case.

  18. No, pay attention. by Grendel+Drago · · Score: 1

    No, heaven forbid that guy makes a few bucks from people not intending to donate to his beer-and-porn fund.

    --grendel drago

    --
    Laws do not persuade just because they threaten. --Seneca
    1. Re:No, pay attention. by RealAlaskan · · Score: 2, Insightful
      ... heaven forbid that guy makes a few bucks from people not intending to donate to his beer-and-porn fund.

      Since it doesn't change the price I pay Amazon, I'm afraid that I just can't work up any rightous indignation about it. In fact, since (or maybe if) he's saving folks $10, I'd say it's pretty good if a few quarters land in his beer fund.

    2. Re:No, pay attention. by Anonymous Coward · · Score: 0
      By your logic you must think spamming email accounts are just as fine as spamming slashdot.

      If kaleidojewel-20 aka pmc258 aka pmc255 aka pmc256 actually contributed something to the article it would be different be he's a leech in the truest sense, trying to make money off of other people's work.

      He's also violating Amazon's referral TOS by spamming.

    3. Re:No, pay attention. by Anonymous Coward · · Score: 0

      How's the guy violating Amazon's TOS? Where in the TOS does it mention the prohibition of one, non-intrusive post on, essentially, a web forum?

    4. Re:No, pay attention. by Anonymous Coward · · Score: 0

      One post? Check his post history, bud. He also has multiple user accounts (check another post in this thread) using to spam referral links.

      I dont know why people like you go out of your way to support spammers..

  19. I give up by Locke2005 · · Score: 1, Interesting

    Why is HTML 4.01 better than XHTML?

    --
    I've abandoned my search for truth; now I'm just looking for some useful delusions.
    1. Re:I give up by goldspider · · Score: 1

      It's not. DHTML (if this is the same DHTML of old) is a leftover of the browser pissing-contests of the 90's, and represents an obstacle to standards adaptation.

      Let's drop DHTML like the steaming sack of decaying garbage it is and focus on writing quality, structurally sound, and accessible code.

      --
      "Ask not what your country can do for you." --John F. Kennedy
    2. Re:I give up by gusnz · · Score: 2, Informative

      Long story short, to make effective use of XHTML you have to serve it as "text/html" to the browser, as IE doesn't support its proper MIME type (thanks, Microsoft!). Here's a good summary of the issues surrounding XHTML vs HTML 4.

      Personally, I don't mind using XHTML 1.0 as text/html, as although it's not quite "ivory-tower" perfect, it's still IMHO a little cleaner and more elegant. Either way, (X)HTML+CSS still beats the living daylights out of "any-old-HTML + tables".

    3. Re:I give up by rebug · · Score: 1
      Content negotiation is an old concept. In Apache with mod_rewrite:
      RewriteEngine on
      RewriteBase /
      RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml
      RewriteCond %{HTTP_ACCEPT} !application/xhtml\+xml\s*;\s*q=0
      RewriteCond %{REQUEST_URI} \.html$
      RewriteCond %{THE_REQUEST} HTTP/1\.1
      RewriteRule .* - [T=application/xhtml+xml]
      will serve application/xhtml+xml to any client that claims to accept it. Mozilla does, IE doesn't. Safari just sends */* as its accept string, so it gets text/html.
      --

      there's more than one way to do me.
    4. Re:I give up by eddy+the+lip · · Score: 1

      I'm sorry, that makes no sense. DHTML has nothing to do with browser pissing contests (those just made it hell to implement.) DHTML is the aggregation of (X)HTML/Javascript/CSS to make a page less static.

      The lack of standards has made pretty much anything implementing DHTML a steaming pile, but DHTML itself is just a technique. And if you're willing to ignore four year old browsers, the state of affairs has gotten to the point that you can write decent code properly separated from your presentation.

      --

      This is the voice of World Control. I bring you Peace.

    5. Re:I give up by brianmf · · Score: 2, Informative

      Because XHTML is a pointless and overhyped waste of time and energy at this point.

      Read more of Stuart's thoughts on his website:

      http://www.kryogenix.org/days/2002/11/28/whats

      http://www.kryogenix.org/days/2005/02/21/xhtmlHtml

    6. Re:I give up by Brandybuck · · Score: 1

      But add XMLHttpRequest to it and suddenly you have don't have a standard. Wooo!

      --
      Don't blame me, I didn't vote for either of them!
    7. Re:I give up by Anonymous Coward · · Score: 0
      And his thoughts basically add up to "XHTML sucks because I don't like RSS." Gimme a break.

      It's just more inane shit like Hixie's rants, which all come to "XHTML sucks because everybody is too stupid to realize why it doesn't."

      Anytime something new comes along, especially something like XHTML which is only marginally different than its predecessor, you'll have some dipstick somewhere trying to prove how clever he is by spewing garbage in his blog about it being worthless.

      Of course, there are many people out there who do understand what the explicit advantages of XHTML are, and exploit them in ways that simply aren't possible with HTML 4.x. You may not see that, but it doesn't make it untrue; it just means you don't see it.

      Here's a clue, bunky. When someone bashes something and gives you the "trust me, I know what I'm talking about, I'm smarter than you" shtick, and you believe them, only two things are going to be true:

      1. they're not very smart at all
      2. they're right, they are smarter than you
    8. Re:I give up by AstroDrabb · · Score: 1
      XMLHttpRequest is pretty much a defacto standard in the major modern browsers. All the modern browsers are the same except (of course) for IE which doesn't implement it internally and requires an ActiveX instantiation. However, that is very easy to code around and then you have a cross-browser implementation of XMLHttp such as Sarissa.

      As long as you don't need to support 4-5 year old browsers, XMLHttp works fine. If you need to support 4-5 year old browsers, either force your users to upgrade (by not supporting them) or use old techniques like form posts and hidden variables or cookies.

      --
      If Tyranny and Oppression come to this land,
      it will be in the guise of fighting a foreign enemy. -James Madison
    9. Re:I give up by Brandybuck · · Score: 1

      You're forgetting Konqueror. It's not 4-5 years old. Just because it doesn't run on Windows doesn't mean it's not a major browser, as it's pretty damned major in the Unix world.

      Websites should use the freaking standards. Doesn't ANYONE remember the browser wars?

      --
      Don't blame me, I didn't vote for either of them!
    10. Re:I give up by Linus+Torvaalds · · Score: 1

      Content negotiation is an old concept.

      It also reduces your cache hits, increasing server load and bandwidth costs, and slowing down your website.

      Your code is broken, BTW. You need to transmit a Vary header when you vary content based upon request headers, otherwise you can screw up caches so they send application/xhtml+xml to Internet Explorer.

    11. Re:I give up by serber · · Score: 1

      Konqueror on my boxes supports XMLHttpRequest just fine, at least in my experience.

      And I wouldn't call it a major browser by any means, I don't know anyone who uses it...

      --
      Sometimes bad things happen.
    12. Re:I give up by Brandybuck · · Score: 1

      I don't know anyone who uses it...

      Of course you won't find any Windows users who use it! Duh! But it's the default browser for KDE, which I understand is a wildly popular desktop for Unix.

      As for XMLHttpRequest, I only know what I've been told. And I've been told that the only reason all the new Google apps don't support Konqueror is the lack of that non-standard item.

      --
      Don't blame me, I didn't vote for either of them!
    13. Re:I give up by Anonymous Coward · · Score: 0

      As for XMLHttpRequest, I only know what I've been told

      And so you thought repeating in a public forum a statement which may or may not be true is helpful? Huh?

    14. Re:I give up by Pollardito · · Score: 1

      you can dynamically load content without XMLHttp and without frames, but everything has its limits and i think most of us are sick of supporting netscape 4.7 either way :)

    15. Re:I give up by Baricom · · Score: 1

      I'm curious. At what point does something become a standard? After all, I'm pretty sure Sir Berners-Lee didn't worry about all that standardization stuff when he released WorldWideWeb in 1990 - he simply told people how to write HTML that his code could read. This is approximately four years before W3C even existed.

      XMLHttpRequest is available, in a mostly identical form, in the current stable versions of Internet Explorer, Gecko-based browsers (including Firefox, Netscape, Mozilla, and Camino), Opera, and KHTML-based browsers (including Konqueror and Safari). I would say that representents the vast majority of Internet users.

      If a spec becomes a standard after a standards organization vets it, then how does one become a standards organization? To the best of my knowledge, W3C has no government mandate.

    16. Re:I give up by Brandybuck · · Score: 1

      There are two kinds of standards. One is the defacto just-because-everyone-uses-it standard. Such as Windows. Windows is a standard because 90% of the people use it. Not fair to all other operating systems? Fine, then another example is GCC. It's free, but has extensions that no other compiler has, to the point that some major open source projects cannot be built with any other because they were silly enough to use them.

      The other kind of standard is the formal standard. It does NOT need to be a government mandate. Examples are ISO. For some things a formal standard is almost a necessity. Protocols for public use for example. That's why we have the W3C. It is the formal standards body for the web.

      How can one know that his implementation of XMLHttpRequest is fully interoperable with all the XMLHttpRequest sites out on the web? Without a formal specification for the standard, you just don't know. If a site doesn't operate correctly, is it the site's fault or yours? With a formal specification, you would know.

      --
      Don't blame me, I didn't vote for either of them!
    17. Re:I give up by Baricom · · Score: 1

      You may have answered my question, but I don't see it. Who decides that the W3C is "the formal standards body for the web?" We could just as easily put Microsoft, Apple, or Mozilla in that role. The only reason W3C defines the standards is that the browser manufacturers and content providers decide it does.

      Is your complaint that XMLHttpRequest isn't documented? I argue that it is.

      RSS has been through several revisions. Is 2.0 a "formal standard"? If so, what makes XMLHttpRequest different? If not, why not?

      Everything on the Internet started as a de-facto standard, and the definition of "formal" depends on who you're talking to.

      I argue that XMLHttpRequest is implemented consistently and widely enough that it can be considered a reliable standard. Heck, there's more major implementations of it than Load and Save.

  20. I'd rather save 100% by Anonymous Coward · · Score: 0

    anyone got an ebook link?

  21. Re:Save Some Money by EnronHaliburton2004 · · Score: 1

    Because it's a referral disguised as a legitimate post. It's not entirely honest.

  22. Slight Error Causes Big Problems? by Anonymous Coward · · Score: 0

    a slight error produces big problems.

    I think that's true of just about any language (programming or human) or system.

  23. browser problem by MatD · · Score: 4, Interesting

    A lot of the annoyance of 'web apps' comes from the fact that browsers can't just refresh a simple tag on the page from the server. They have to re-render the entire page, causing a jarring visual experience for the user.

    Browsers should be able to realize that since the url is the same, diff the previous stream, and the current one, and modify the current page inline.

    As it stands now, web developers have to jump through a lot of hoops to get that sort of functionality. They shouldn't.

    --
    Since when did operating systems become a religion?
    1. Re:browser problem by shmlco · · Score: 1

      Sounds good. Let's see the code.

      --
      Any sect, cult, or religion will legislate its creed into law if it acquires the political power to do so.
    2. Re:browser problem by TardisX · · Score: 1
      --

      Command attempted to use minibuffer while in minibuffer
    3. Re:browser problem by MAdMaxOr · · Score: 1

      That *might* work to reduce rendering time depending on the engine. Some engines are slow with innerHTML calls, so it could be a wash.

      Most of the slowness with a page refresh is typically network latency and bandwidth bottlenecks. Browser tricks won't help with that.

    4. Re:browser problem by slashdot.org · · Score: 1

      A lot of the annoyance of 'web apps' comes from the fact that browsers can't just refresh a simple tag on the page from the server. They have to re-render the entire page, causing a jarring visual experience for the user.

      Yeah, like:

      Chapters 8- 10: seamlessly working with the Server
       
      Where Unobtrusive DOMscripting really gets developers juices flowing is the ability to communicate with the server without obviously refreshing the page. Chapter 8 takes you through a variety of methods. Some, like the hacky iframe method or hideous 204 piggyback method are so gruesome that I breathed a sigh of relief loud enough to wake the cat when I finally turned the page to read "XMLHTTP". This method (which is non-standard and introduced by Microsoft) has ushered in the Next Great Web Thing: asynchronous communication with the server. Langridge walks through using the Sarissa library to make a user registration form that checks whether the user name you choose is taken, and if so, suggest some alternatives without refreshing the page.

    5. Re:browser problem by AstroDrabb · · Score: 1
      Browsers should be able to realize that since the url is the same, diff the previous stream, and the current one, and modify the current page inline.
      Why don't you submit the code to re-parse the DOM tree and update the page in-line? You could submit it as BSD-licensed code so all browsers could use it, you would be famous!
      As it stands now, web developers have to jump through a lot of hoops to get that sort of functionality. They shouldn't.
      AJAX is _really_ not that hard as another poster pointed out. Search Google for "AJAX library" and have fun : ) Oh, I like Sarissa!
      --
      If Tyranny and Oppression come to this land,
      it will be in the guise of fighting a foreign enemy. -James Madison
    6. Re:browser problem by jmooney · · Score: 1

      A full refetch of the page text (whether or not the screen is redrawn) couldn't let the user carry on with field input while a server fetch is pending. Not keeping the user waiting while network round trips are happening makes a much better "responsive" impression.

      Plus, with larger pages and/or slower networks a full refetch would become a lot slower than DOM modifications.

    7. Re:browser problem by gglaze · · Score: 1

      Actually, I think IE has already been doing something like that for some time now. I don't know the exact details of how it works, but it definitely does partial refreshes of only specific areas of the screen in some cases. I think it may actually have something to do with optimization when IE is communicating with IIS, but I could be wrong...

    8. Re:browser problem by Anonymous Coward · · Score: 0

      I think it is important to point out here, that the essence of the functionality hinted at by parent is already possible using Javascript to modify the page DOM such that the url for a 1x1 image is changed. Information to be sent to the server can be added to the resulting HTTP GET request as required.

      Using this technique data can be sent to a server without needing a page refresh.

      I agree, however, that this is a bit of a "hoop".

  24. XHTML 1.1 now ! XHTML 2 coming up ! by Exaton · · Score: 0, Flamebait

    the introduction has a lucid and compelling argument for using HTML 4.01 rather than XHTML as the markup language of choice

    Bye !

    (Phew, one less long article to read).

    1. Re:XHTML 1.1 now ! XHTML 2 coming up ! by Anonymous Coward · · Score: 0

      Me no speak-a his langridge.

  25. -1, street begger / spammer by Anonymous Coward · · Score: 0
    I have little problem with referral links so long as the person making the money contributed something to the article and (if the link is on someone else's site) discloses he's making money.

    pmc258 did neither and is nothing more than a spamming leech. Please mod all his posts -1.

  26. simple by Anonymous Coward · · Score: 2, Funny

    Two years ago, the "Valid XHTML" button was leet as all hell. Now that everyone and their grandma's pantyhose produces valid XHTML (well, mostly (cough)), it's not cool. Since XHTML 2.0 isn't supported anywhere, people had no choice but to declare HTML 4.0 to be the new leetness.

    I think slashdot is smart for sticking with terribly invalid HTML 3.2. In another year or so, they'll be leet as fuck.

    I'll be lanching my new markup language soon, which is going to be so leet you'll shit your friends' pants.

    <weblog title=dar weblog! <!-- notice we don't need closing tags!
    <stylesheet whereisit="my.leetass.stylesheet" "title'=90k of CSS that somehow convinces me i'm saving bandwidth'/
    <post>
    <microfont>
    Dude, Ruby on AJAX is teh fuckin <a with="annoying tooltip thing>ROOL!
    </post>
    </post></microfont>
    <list of my equally retarded friends />

    <creative commons license, because that's really going to hold water when someone rips off your stupid weblog></darweblog!<powered by blogzor! >

    1. Re:simple by bad-badtz-maru · · Score: 1


      You mean Powered by Bloxor!!

    2. Re:simple by Baricom · · Score: 1

      That is incredibly sweet. Just to clarify, this was posted in 2005, right? I don't see the year anywhere.

    3. Re:simple by zootm · · Score: 1

      Looks a lot more like HTML4/CSS, but it's a hell of a good step forward...

    4. Re:simple by Anonymous Coward · · Score: 0

      I wondered the same thing, but in that post he mentions that his rogue in World of Warcraft just hit 60, so it must have been recent.

  27. Stupid Web Tricks From The 90s... by __aaclcg7560 · · Score: 0, Offtopic

    ... stupid Web tricks of the late 90s that allowed animated unicorns to follow your cursor or silly Powerpoint-like transitions between Web pages.

    Wow! I been running my website since 1998 and I never came across a web book with stupid web tricks like that. Did I missed something?

  28. "Graceful Degradation" = Don't Use It. by Anonymous Coward · · Score: 0

    Since every page must be coded as if JavaScript/DHTML were not used then which should we choose:

    1. Add unnecessary, possibly buggy JavaScript. Note: requires $25, time to read book, with resultant cluttered mind containing unnecessary constructs [when instead you should be studying your SQL reference manual]?
    2. Do none of the above?

    Does it take an Einstein to see which is the lowest-cost, lowest-bandwidth, most reliable solution?

    This is an application of Occam's Razor: use only what is necessary and avoid unnecessary complication.

    1. Re:"Graceful Degradation" = Don't Use It. by Linus+Torvaalds · · Score: 1

      Unnecessary != not useful. Possibly buggy is irrelevent so long as you test properly.

      Does it take an Einstein to see which is the lowest-cost, lowest-bandwidth, most reliable solution?

      Does it take an Einstein to realise that it depends on what you are doing?

      Example: If you have something like Hotmail's signup page, you can save bandwidth by using XMLHttpRequest, because you'll get a hell of a lot of people constantly going back and forth on the registration pages trying to get a username that isn't already taken. Those registration pages might be in the region of 40K per request or more. An XMLHttpRequest script could do it in around 1K per request.

      As with anything else, declaring one thing to be the best solution in all situations is a blanket statement that doesn't hold true in all cases.

      This is an application of Occam's Razor: use only what is necessary and avoid unnecessary complication.

      So you don't use CSS or images either then? Even links are unnecessary, users can copy & paste the URIs or type them in by hand. Maybe what's necessary isn't the only thing that's important.

    2. Re:"Graceful Degradation" = Don't Use It. by Anonymous Coward · · Score: 0

      Does it take an Einstein to realise that it depends on what you are doing? I sure hope not.. coz he's dead

    3. Re:"Graceful Degradation" = Don't Use It. by Anonymous Coward · · Score: 0
      Example: If you have something like Hotmail's signup page, you can save bandwidth by using XMLHttpRequest, because you'll get a hell of a lot of people constantly going back and forth on the registration pages trying to get a username that isn't already taken. Those registration pages might be in the region of 40K per request or more. An XMLHttpRequest script could do it in around 1K per request.
      The sign up app could also do it in less than 1K per request if it asked for the user name first, by itself, on a page without a lot of other crap on it.
    4. Re:"Graceful Degradation" = Don't Use It. by Linus+Torvaalds · · Score: 1

      The sign up app could also do it in less than 1K per request if it asked for the user name first, by itself, on a page without a lot of other crap on it.

      No, it couldn't. A typical HTTP request/response without an entity body is around 1K. That's before you've even begun to send any HTML.

      An XMLHttpRequest approach, on the other hand, can signal when a username is already taken with a 409 response, so there isn't any need for an entity body at all.

      So unless you've found some magical way of sending HTML without using any bandwidth, the traditional approach can't beat the XMLHttpRequest approach.

  29. Re:Save Some Money by KenBot_314 · · Score: 1

    How do you say that a message that informs ppl of a place to get the book for a cheaper price is "disguised as a legitimate post"? if the link went to goatse, that would be one thing, but it IS a legitimate post.

  30. Re:Amazon has it cheaper than bookpool by MatD · · Score: 1
    --
    Since when did operating systems become a religion?
  31. It's still just stupid hackery by melted · · Score: 1, Interesting

    Granted, the reach is good and for some tasks there's nothing better than web UI, but as soon as you find yourself in need of building something more than just a bunch of web pages with links it all turns into mind-boggligly weir hackery. You start using javascript for layout. You need to manage state. The most trivial UI things become a fucking mess of JS and CSS "hacks", etc., etc. It's also a pain to turn all this crap into components for future reuse, so chances are next time you do something similar you'll have to reinvent the wheel.

    The web was originally invented for publishing hyperlinked documents. It's nice to see it come this far, but web as it is is not designed for writing _applications_.

    As far as I'm concerned XAML and XUL are the way of the future. Do as much as you can on the client, communicate only what you need to the server, don't re-render everything every time the user needs to change something, concentrate rendering on the client as well.

    Remember these simple mantras if you plan on doing a lot of web development in the coming years.

  32. Good review! by gusnz · · Score: 1

    I haven't read the book myself, but well done on a coherent review that covers the resurgence of unobtrusive scripting. The author is quite well respected in the community, and I can only hope books like these begin to replace the "omg dhtml netscape 4!!11one" fare usually found on shelves.

    I think AJAX et. al. could be a bit of a diversion though from the ideals of "unobtrusive scripting" though. Many sites using XMLHttpRequest and similar techniques aren't easy to degrade in older, non-JS-supporting browsers. GMail, for instance, had to write another whole separate version using plain HTML for legacy useragents; this seems a little beyond the "progressive enhancement" ideals in which JavaScript adds to, rather than replaces, essential page functionality. I'm putting together my own LGPL'd AJAX library that operates via plain HTML links and forms (and yes, those IFRAME hacks you speak of are really hard to get right!). So in theory it should degrade well.

    And what the heck, while I'm self promoting, here's my free event manager script that works around IE memory leaks, as well as making the whole cross-browser-event-handling stuff easier (which is still the main annoyance when writing cross-browser code -- hurry up and implement DOM Events, MS!). Hope any other JS coders here find it useful.

  33. MOD PARENT DOWN by dotzie · · Score: 1

    Parent tries to boost his/hers website in Google pagerank. Also, comments offtopic.

    1. Re:MOD PARENT DOWN by __aaclcg7560 · · Score: 1

      As if I gave a damn about the Google pagerank. BTW, what is the Google pagerank? :P

    2. Re:MOD PARENT DOWN by Anonymous Coward · · Score: 0
      aaaaaaaand there's two more links to your website, good job

      seriously fuck off

    3. Re:MOD PARENT DOWN by __aaclcg7560 · · Score: 1

      Thank you for seriously NOT answering my question. So WHAT if my URL is visible?

  34. Take me to XML Island by baadger · · Score: 1

    Can anyone tell me why Microsoft's "XML Data Islands" didn't take off in the mainstream given that IE has had a 90% browser share? For external XML they are simple and neat and don't require any javascript whatsoever for basic fetch-and-display use (but you can enhance functionality using javascript).

    Here's a demo (use IE5 or later). I figure they must be in use somewhere because there's even a Mozilla article on getting them working in Mozilla.

    1. Re:Take me to XML Island by therodent · · Score: 1

      Cause Mozilla wasn't doing it too.

      Kindof like XSL/XML/CSS display bullshite circa 2003:

      In the Firefox/Mozilla camp, CSS was the only way for a long time to manipulate XML for display.

      In the Internet explorer camp, XSL was the only way to manipulate XML for display.

      Hopefully we can get XML to display with CSS 100% in IE7, cause you can't in IE6. I think Mozilla has XSL embedded in the browser now (I hope).

    2. Re:Take me to XML Island by Anonymous Coward · · Score: 0

      Mozilla does, but it's pretty crippled. You can't navigate XML documents that use id attributes very well because Mozilla doesn't support the id() function in XSL.

      You also can't use external XML entities in Mozilla, even if they are from the same website. So you have to stuff all your code into a single XSL instead of having it broken into many separate library XSLs and ancilarly data XMLs.

      So any large project using XSL with Mozilla starts to get really ugly with duplicate code and data everywhere.

  35. Re:Save Some Money by Anonymous Coward · · Score: 0

    Alas not. You have no idea whether the book is being touted purely to make money for the poster. I.e. there's a huge conflict of interests.

  36. Torrent File? by Anonymous Coward · · Score: 0

    Anyone have a link the of the Torrent?

  37. Free DHTML Poster with this book. by Anonymous Coward · · Score: 0

    The publisher of this book, SitePoint.com, is offering a free DHTML Quick Reference Poster for ordering directly through their Website ($39.95 - just like BN.com). They also sell the poster seperately for $9.95. It looks useful and very cool.

    1. Re:Free DHTML Poster with this book. by Anonymous Coward · · Score: 0

      You forgot to give us a link to buy the book from the publisher and get the free reference poster. here it is.

  38. DHTML popup ad hell. by zymano · · Score: 1

    Websites are now using these instead of regular popups to get by the popup blockers.

  39. For your enjoyment by Eil · · Score: 1
  40. Drag and drop example. by geniusj · · Score: 1

    For an example of drag and drop in use, check out Panic's website

    1. Re:Drag and drop example. by Anonymous Coward · · Score: 0

      For some drag-and-drop resources check out http://script.aculo.us/ or http://tool-man.org/examples/. For an interesting practical application of drag-and-drop take a look at this bookmarklet/Greasemonkey script for Netflix: Netflix Queue Manager

  41. I see by Locke2005 · · Score: 1

    So HTML 4.01 is better than XHTML because IE is broken? Isn't that like saying a Kia is better than a Ferrari because there is a 55mph speed limit?

    --
    I've abandoned my search for truth; now I'm just looking for some useful delusions.
  42. Extreme DHTML? by Bemmu · · Score: 1

    Try this small DHTML thingy we made :-)

    http://assembly.mbnet.fi/asm05/compos/browser_demo /pure_javascript_demo_by_IKU.zip

    If you use 800 x 600 resolution you can see it fullscreen. It placed third in the Assembly 2005 demo competition. IE recommended for watching, though it runs on Firefox as well.

    1. Re:Extreme DHTML? by KillShill · · Score: 1

      umm is it written in assembly?

      IE recommended... now there's something you hope not to see.

      --
      Science : Proprietary , Knowledge : Open Source
    2. Re:Extreme DHTML? by oliderid · · Score: 1

      Quite impressive, especially the polygon rendering. How did you do that?

    3. Re:Extreme DHTML? by cr0sh · · Score: 1
      I am not the coder of this demo - but I am very impressed by what I have seen.

      Basically, this demo uses javascript and DHTML in some interesting ways, but the code behind the scenes is pretty "standard".

      Essentially, they render the sides of the cube using a scanline renderer, which simply renders the sides as two separate triangles, built by drawing horizontal lines top to bottom (hence "scanline"), with the widths dependent on the slopes of the sides of the polygon (triangle). This is accomplished via a simple Bresenham algorithm. If you know how to draw a line between a pair of x/y coordinates using the Bresenham algorithm, you can create a scanline renderer. This particular renderer manipulates the images "n.jpg" where "n" is a number (of the scanline? or width?) - and horizontally displaced as well. Strange thing is, it seems as if for the 3D engine portion they use Math.cos and Math.sin - instead of a quicker (?) sin/cos lookup table. The spinny-twisty thing at the end is done in a similar fashion (except manipulating the pics "fn.jpg". DHTML layers are used extensively, along with PNGs with alpha layers and such.

      Very impressive for javascript, but behind the scenes pretty standard code (though I would really like to know why no lookup tables)...

      --
      Reason is the Path to God - Anon
  43. Another way - applets by Anonymous Coward · · Score: 0

    Although applets require Java to be installed on the machine ( and the java plugin integrated with the browser ), it possible to do without XMLHttpRequest.
    Actually, it was already 5 years ago. At least with netscape browsers.

      All you need is to call your applet from javascript, get the applet to talk to the server and you will have your server query without any page refreshes.

    As an added bonus, you can TEST the applet as part of the server solution. Can you do that with XMLHttpRequest?

  44. Separate this... by Eric+Pierce · · Score: 1

    I'm so far ahead of this guy it hurts...

    My pages are nothing but a single, empty html and body tag... and EVERYTHING is dynamically cross format focused in Nashian triplicate (yeah! it goes there) on the back-end.

    You cannot touch this!

  45. Congratulations on your site by PinkX · · Score: 1

    and your work. I'd already visited your site some (not so long) time ago. Very good, nice and useful stuff in there.

    Keep up the good work.

    Regards,

    1. Re:Congratulations on your site by gusnz · · Score: 1

      Cheers, I'm glad you found the scripts helpful :).

  46. Regardless of the W3C by Anonymous Coward · · Score: 0

    Just remember to give the W3C a great big hug for all their hard work, despite how some around here treat them.

  47. DynLayer is the way to go by squirrelhack · · Score: 1

    Whenever I see books like this, I always wonder why people do not use the dynlayer api. DynLayer Api at SourceForge This has been around for quite sometime. Handles drags, moves, events, layers, z index, etc. Everything. True, it is now a bit big, but do like I do and remove what you do not need and away you go. You can AJAX as a separate piece.

    --
    - Creativity is more important than knowledge. - Albert Einstein
    1. Re:DynLayer is the way to go by uptoeleven · · Score: 1

      > Whenever I see books like this, I always wonder why people do not use the dynlayer api. DynLayer Api at SourceForge

      Lots of reasons.

      Firstly from a philosophical stand-point it is always best to have more than one way to do things.

      Secondly because not everyones' experiences of dynapi are positive.

      I found it:

      1.) awkward to use.
      2.) able to cause even well specced machines to grind to a halt.
      3.) a pain to extend.
      4.) clunky, overwrought, fairly incomprehensible.

      Also I'm not sure that it entirely separates the scripting from the content.

      Other than that it's great :D

  48. Re:Save Some Money by zakkie · · Score: 1

    Instead of modding this fool up, down or sideways, complain to Amazon's Associates program directly. Include his referrer tag and they will almost certainly revoke his affiliate status because of unacceptable spamming in violation of Amazon's Affiliate agreement. His Amazon affiliate ID is kaleidojewel-20 and associates@amazon.com is the place to email your complaints to. If we nip this in the bud, there'll be no more incentive for such spam. Please be polite when emailing Amazon - this *is* against their policies, they just need it to be brought to their attention.

    HTH

    Ciao

    Zak

  49. Re:DHTML popup ad hell. by Snover · · Score: 1
    --

    [insert witty comment here]
  50. Re:Save Some Money by HeroreV · · Score: 1

    What?! It costs money?! But information wants to be free!

  51. table of contents? by subtropolis · · Score: 1

    Neither B&N nor Amazon see fit to display the TOC for this book. If somebody knows of somewhere it's listed could you post that here? I'd especially like to know if 1/3 of the book is appendices we don't need.

    Good review, BTW. Too bad about the book's cover. What's up with that? Although it did make me think of the Brazil dream sequences. Perfect for those dreary winter afternoons in the cubicle farm.

    --
    "Our interests are to see if we can't scale it up to something more exciting," he said.
    1. Re:table of contents? by Anonymous Coward · · Score: 0
    2. Re:table of contents? by cryptogryphon · · Score: 1
  52. Re:Save Some Money by Anonymous Coward · · Score: 0

    How is this against their policies thought? I went an looked up the "Amazon Operating Agreement" or whatever, and it doesn't seem to mention anything in specific. There is, however, a very generic clause about how all associates should abide by the US laws regarding spam (ie. CAN-SPAM Act?). I don't know how extensive these laws are, and whether or not they cover one comment placed unintrusively in a Slashdot discussion.

  53. I just bought this book by Evets · · Score: 1

    Funny, this book arrived today at my house. I was hoping the section on AJAX would be more extensive, but it's relatively slim.

    IMO, the layout of the book is good and it's written well - from first glance anyways.

    Can anybody point out any strong online resources on AJAX development? I guess it's not that difficult to grasp, but I would like a little more of a foundation.

    1. Re:I just bought this book by kalirion · · Score: 1

      I usually use this board for any questions I have about AJAX or plain old DHTML. One of the moderators is in the process of coauthoring a book about AJAX, and has some blogs on the subject as well.

  54. Re:Save Some Money by Anonymous Coward · · Score: 0

    Are you retarded? This guy is spamming Slashdot left and right:

    http://books.slashdot.org/comments.pl?sid=157754&c id=13217853

    Jesus. Fucking spammer supporting asshole. Fucktards like you are the reason why my inbox is full of utter garbage.

  55. That Google Suggest link by beowulfcluster · · Score: 1

    If '404 not found' is graceful degradation I don't want to see ungraceful degradation.

  56. 404 by Anonymous Coward · · Score: 0
    404 not found

    The requested resource could not be found.
    ...I think I just heard 50,000 slashdotters breathe a sigh of relief.
  57. AJAX by Elixon · · Score: 1

    I love AJAX. It's fast for development and powerfull. JS+XUL=POWER ;-)

    --
    Well, I've got to get back to work. When I stop rowing, the slave ship just goes in circles.
  58. I hear a distant rumble... by curious.corn · · Score: 1

    ... as a herd of corporate lawyers stumble against each other to file a new non obvious technology: drag & drop... but on the internet!

    It doesn't take a lot of imagination to realise just how this could revolutionise the Web experience. Drag and drop products into a shopping cart. Drag the shopping cart to the checkout icon. Moving money around bank accounts in some integrated internet banking application. The possibilities are huge.

    --
    Mi domando chi à il mandante di tutte le cazzate che faccio - Altan
  59. what is so great about "unobtrusive" ? by Evil+Grinn · · Score: 1

    The one part that I don't get about the "new Javascript" philosophy that has been going around is, why people are so obsessed with keeping the scripts optional.

    Why not use the full power of DHTML and build applications that totally rely on it?

    The one piece of the Ajax puzzle that I could see being optional is XMLHttpRequest, as it is only a de-facto standard. ECMA script, CSS, and DOM are standards, and the browsers can be expected to support them.

    Attempting to maintain support for non-conforming browsers seems to add a lot of time (read: money) for little benefit. Too many bucks for too little bang.

    Also, you can't point at CSS and say that just like good CSS is unobtrusive, so is good scripting. Apples to orange. CSS is about presentation. And unless you're a marketing person, presentation IS optional. A colorful, three-column positioned blog done with CSS that degrades to plain black on white text laid out from top to bottom, is a good thing. Or at least it's fun to develop and then brag about how well it degrades. But scripting is NOT presentation, or at least it is not JUST presentation. If what you are developing is not a "web page" but a "web application", then scripting is part of what the application does.

    Finally, don't anybody trot out the line about companies that forbid their employees from running browsers with JavaScript enabled. I haven't seriously known of a policy like that since about 1998. You also hear the same thing about cookies, and that's BS as well.

    I am not trolling I actually don't get it.

  60. why not by willCode4Beer.com · · Score: 1

    Sure the *web* was originally designed around the idea of hyperlinking documents.
    But, whats wrong with building rich applications for the browser? Is this somehow more evil than hard to maintain, bloated, crappy VisualBasic/Swing/Delphi/Powerbuilder applications that will be very platform specific?
    A mess of code will happen in any language on any platform. Its up to the developer to prevent it.

    The browser is just a tool. Why not exploit that its much easier to build/test an app for a handful of browsers than it is for many operating systems.
    The security side doesn't need much explanation, browsers though insecure are still better than installing random executables.
    Should a user have to download and install a program just to get a rich ecommerce experience?

    XAML and XUL are just another (albeit, better) way to do this. Apps to use it (Moz) just aren't ubiquitous (yet). However, generally, XUL apps are just as Javascript heavy as a DHTML app. Alot of the ideas behind these DHTML apps are the same as you propose for XUL, "Do as much as you can on the client, communicate only what you need to the server, don't re-render everything every time the user needs to change something, concentrate rendering on the client as well."

    The big downer will be when people decide that sites/apps should only be usable by browsers with these capabilities. Then again, thats been happening for awhile.

    --
    ----- If communism is a system where the government owns business, what do you call a system where business owns govern
  61. To me there are three deal killers in Web Dev by melted · · Score: 1

    1. You need to maintain state (and re-parse it on every request, or execute dozens of SQL queries to fetch it from the DB).
    2. Any user action that alters state (and often even those that do not) require a round-trip to the sever, including #1.
    3. Creating a quality UI has become a voodoo-like thing where you have to rely on all kinds of unwritten laws because CSS2 is not flexible enough beyond simple document formatting. Place a login UI in the center of the screen in XHTML1.1 Strict without using Javascript. You can't! I could come up with three dozen more examples of what you should be able and can not do. I kind of can even understand Microsoft who said CSS2 is a fucked up standard and it's better to wait for CSS3.

  62. Capability Sniffing does not work in all cases. by KnowlerLongcloak · · Score: 1
    • No browser sniffing. This aims to future-proof code by testing for features rather than sniffing for browser name and version. So, before using the TimeTravelCureCancer method, the current browser is tested to see whether it's supported. If it is, the script continues. If it isn't,the script silently fails with graceful degradation.
    Here is an example that I ran into of how capability sniffing is not enough:

    The add method on a select element exists in IE 6 as well as Firefox. However, in order to add an option element to the end of the select element's list, you need to do this in IE:

    objSelectElement.add(objOptionElement);

    And this in Firefox:

    objSelectElement.add(objOptionElement, null);

    References:
    MSDN Reference
    DOM Reference
  63. Two words... by cr0sh · · Score: 1
    HOLY SHIT!

    This is very impressive - sorta runs under Mozilla (had to load index2.html directly (for some reason the popup redirect in index.html didn't work) - and it was kinda jerky on my box (but my box isn't the latest, greatest, or anything like that) - but I am impressed nonetheless! I really loved the ending spinny-twisty thing! Great job!

    --
    Reason is the Path to God - Anon
  64. Re:Save Some Money by petermgreen · · Score: 1

    but he isn't touting the book merely giving you a cheaper source than the article gives.

    --
    note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register