Slashdot Mirror


Advanced Requests and Responses in Ajax

An anonymous reader writes "The Web is no longer a place where simple applications are tolerated; 'users have become more advanced, customers expect robustness and advanced error reporting, and managers are fired because an application goes down 1 percent of the time. It's your job then, to go beyond a simple Ajax application that requires a more thorough understanding of XMLHttpRequest.' This DevWorks article tries to help developers use Ajax to build a solid foundation in which an application handles errors and problems smoothly."

209 comments

  1. Re:AJAX? by mmkkbb · · Score: 2, Informative

    It's the rather scary idea of using JavaScript on a webpage to run XML-RPC requests to a remote server and update the local page, allowing for flashy stuff like Google Maps and GMail that does not require a new page to be loaded.

    Too bad it requires JavaScript!

    --
    -mkb
  2. CS101 by slackaddict · · Score: 4, Insightful
    "...to build a solid foundation in which an application handles errors and problems smoothly."

    Um, aren't these concepts something we learned in college??? This is just basic stuff... although I think it highlights how RAD languages can teach you sloppy coding habits if you don't take the time do do things correctly.

    --
    ConsultingFair.com
    1. Re:CS101 by Emetophobe · · Score: 1

      Um, aren't these concepts something we learned in college???

      I learned these concepts even before college, in grade 10 computer science class.

    2. Re:CS101 by Anonymous Coward · · Score: 2, Insightful

      Isn't that a contradiction? The whole point of RAD is the "R"... you know, rapid. As in, NOT taking time?

      Oh sure, *I* agree with your point about doing things the right way, but the average acronym loving project manager sees "RAD" and (aside from the "party-on dude" connotations), assumes it means he doesn't have to spend time developing. One of the many reasons I hate that term and encourage others not to use it. It convinves people not to think in a relative perspective... "Rapid" means "faster than doing it in C. Not fewer ticks of the clock. But people don't see that.

    3. Re:CS101 by firewrought · · Score: 3, Interesting
      Um, aren't these concepts something we learned in college?u

      Error handling wasn't taught well at my college. Yeah, you might fail one of Greenlee's assignments if you if you didn't check the return status of a system call, but that's not the same thing as knowing how to handle an error when you get one.

      It wouldn't be difficult to add an error-handling module to an intermediate-level programming class. There are only a few basic response to any error situation: ignore it, propagate it, retry it, ask the user about it, log it to disk/email/syslog/database/whatever, log it to the GUI, and/or bail-and-quit. Talk about when and how to use each approach; throw in material about retry strategies, explicit vs. implicit error signaling, fail-fast behavior, ask-forgiveness, pitfalls of catching all exceptions, the needs of production systems, etc., and followup with an examination of a few platform-specific error-handling facilities.

      If you're college taught all this, then great!!! Mine did not. Maybe I should email some of my old profs...

      --
      -1, Too Many Layers Of Abstraction
    4. Re:CS101 by Serapth · · Score: 1

      Gotta disagree with you. RAD neither help nor hinder good coding habits. It generally just makes the tedious stuff easier. Actually if the RAD is in the form of a good code generator, and the programmer follows the pattern the RAD generator outputs, it could actually lead to better organized code. Either way, RAD doesnt really effect sloppy coding habits.

      However, SCRIPTING does. Growing up a C/C++ programmer, switching over to python ( which I love sofar ), I notice I have to work especially hard to write good code. Its just way to easy to write sloppy but working code in these languages. Especially when you have a language that can run itself, you suddenly are encouraged to do all kinds of bad things. Then take away the strictness that compiliers minimaly impose, and you got yerself a bomb in the making. Im not bashing on python in general, this applies equally well to javascript, ruby, lua, perl, etc...

    5. Re:CS101 by hey! · · Score: 3, Insightful

      What the issue at hand boils down to this: knowing how to program in an asynchronous enviornment. If you've done it before, you can skim the article in under five minutes, because it's just a small and managemeable set of conventions that sets dealing with the XMLHttpRequest that would be new to you. The strategy is just common sense, if you've done this sort of thing.

      CS101 certainly touches on aspects of asynchronous programming, such as threads, but I suspect the student's first serious exposure is more likley to come in second or third year OS class. But in any case you have to expect a CS program to fill the student's heads with more knowledge than skills. I've even hired engineers with masters degrees who, while they had the basic theoretical knowledge needed to do this kind of work, don't have a decent feel for it.

      The reason is that while they learned the theory, in practice details have always been taken care of by some framework or another. For example some ajax frameworks work by callback functions; clearly they're doing just this stuff under the covers.

      I'm not saying this is rocket science; quite the contrary. Very, very little in CS is. Most practical skills in CS amount to this: attention to detail and taking care with making assumptions you make -- particularly knowing when an assumption can be trusted to hold and when it cannot. I've often reflected that doggedness and fastidiousness (well, mental fastidiousness at least) are equally important with intelligence in making a good programmer.

      The problem is that programmers always have too many details to manage. Succeeding is what differentiates the good ones from the bad, and experience is very helpful. As in many things, an ounce of prevention is worth a pound of cure. It's all to easy to be careless or inattentive in the wrong places. Believing you know when to do this is what converts garden variety laziness into the hubris. Getting this stuff right isn't hard, but getting it wrong isn't hard either, in which case you end up with hard to debug problems or systems that are unresponsive.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    6. Re:CS101 by IPFreely · · Score: 1
      It's amazing how we keep going back and forth between fat server and fat client.

      First, you had to sit in front of the computer to use it. Then they invented terminals so you could sit far away and use it remotely. Then they invented portable/personal computers so you could take it with you and have it right in front of you again. Then they invented the web so you could use a program running on a computer far away. Now you just download the AJAX program and run it on your own computer again.

      Of course each iteration adds some fine tuning and functionality to the mix.
      But aren't we just moving from thin client to fat client again, only in Javascript instead of something else, and with awkward stateless HTTP connectivity thrown in to make it that much harder? And it's not like Javascripts is a decent engineering language. It's a UI scripting language for Gods sake.

      --
      There is nothing so silly as other peoples traditions, and nothing so sacred as our own.
    7. Re:CS101 by RetroGeek · · Score: 1

      Well, AJAX would actually be classed as a chubby client. Most of the work is being done on the server (SQL, validation), with some code running locally to put it all together.

      --

      - - - - - - - - - - -
      I am a programmer. I am paid to produce syntax not grammar. Deal with it.
    8. Re:CS101 by Bogtha · · Score: 1

      It's amazing how we keep going back and forth between fat server and fat client.

      The web is more than just another iteration. You can write a web application that transparently serves smart web browsers with a whole drag and drop interface, text-only browsers and dumb scripts.

      Okay, so lots of developers are dumb and end up writing one or the other, but the idea is that you build the basic stuff, and add all the fancy Javascript and CSS on top. That way it works for both smart clients and dumb clients.

      And it's not like Javascripts is a decent engineering language. It's a UI scripting language for Gods sake.

      It's a decent enough object-oriented scripting language. Most of the criticism of it comes from people who've only been exposed to dumb popup window scripts and rollovers. UI scripting is only one application, you can write server-side code, admin scripts and all sorts with it.

      --
      Bogtha Bogtha Bogtha
    9. Re:CS101 by IPFreely · · Score: 1
      It's a decent enough object-oriented scripting language. Most of the criticism of it comes from people who've only been exposed to dumb popup window scripts and rollovers. UI scripting is only one application, you can write server-side code, admin scripts and all sorts with it.

      Do you think the script writers would squeal too loudly if we added stuff like namespaces, strong typing and libraries to it? Having try/catch is respectable though.

      And it's delivered as source code, not exactly efficient. It's only a matter of time before some IP freak somewhere demands a way to protect their property with encryption or something. Maybe compiled ECMAScript with all those features. Oh wait, that's called Java. Never mind.

      I shouldn't rag on it. It's good for what it was designed to do. It just bothers me how people are (in my opinion) trying to do too much with it. Right tool for the job and all that. There are already tools for high function web interfaces. But for some reason Java didn't last in that space (mostly due to download/startup time and UI consistency, which have both been adressed since then). I look forward to ECMAScript morphing into all the things that originally sunk Java as a web UI.

      (Just FYI, I have written AJAX apps, but before the term AJAX was widely used. Creating and manipulating the UI and user behavior as a DOM is just a pain. Languages with clear UI related features are much easier to develop UIs in.)

      --
      There is nothing so silly as other peoples traditions, and nothing so sacred as our own.
  3. Ironically by RealProgrammer · · Score: 3, Funny
    When I tried to download the code from the article, and clicked through the license, it said:
    404 Not Found

    Not Found
    The requested URL /ibmdl/pub/software/dw/web/ wa-ajaxintro3_ajax-xhr_adv.zip was not found on this server.

    Perhaps someone should write an article on how to write robust AJAX code. Oh, wait...

    --
    sigs, as if you care.
    1. Re:Ironically by Emetophobe · · Score: 1

      I found the problem with their site in about half a second. I noticed there was a space between /web/ and wa-ajaxintro3... If you look at the address http://download.boulder.ibm.com/ibmdl/pub/software /dw/web/%20wa-ajaxintro3_ajax-xhr_adv.zip you can notice the %20, which causes the problem.

      Remove the whitespace and you can download the file.

      Here

    2. Re:Ironically by Emetophobe · · Score: 1

      Dammit, RealProgrammer beat me to it by 3 minutes...

  4. Re:AJAX? by DeveloperAdvantage · · Score: 3, Informative

    If you want a one hour summary, take a listen to our most recent audiobook at http://www.developeradvantage.com/products.html . It's free for now.

    --
    FREE - Java, J2EE and Ajax Audiobooks for Software Developers - www.DeveloperAdvantage.com
  5. nothing too new by nuttzy · · Score: 2, Insightful

    I think the article covers some things that are missing in a lot of ajax classes available, but really is nothing new. My own ajax class is far, far superior (trying to get the okay from work to OSS it).

    Too many classes are using a global httprequest object. This is not good if you are doing many requests (though I suppose uses less memory). There's also no timeout for graceful handling of a slow server. I've done quite a bit in the way of error handling.

    At least this one doesn't make you learn a damn mini-language... a major pet peeve of mine!

    1. Re:nothing too new by Anonymous Coward · · Score: 0

      There's also no timeout for graceful handling of a slow server.

      Reminds me of Gmail.

    2. Re:nothing too new by kalirion · · Score: 1

      We've also written applications with concurrent requests. The callback function takes an index into a request array, but the array is still global. Still, the limitation to concurrent XMLHttpRequests is the number of persistant connections the client's browser allows to a single server. If this is 2 (default in Firefox, supposed default in IE) then subsequent requests block until one of the first two finishes.

  6. Re:AJAX? by codesurfer · · Score: 2, Informative

    Not the most definitve source, but this should give you an adequate overview:

    http://en.wikipedia.org/wiki/AJAX

  7. Re:AJAX? by Anonymous Coward · · Score: 0

    An overhyped buzzword.

  8. Good for Them by trongey · · Score: 2, Insightful

    ...This DevWorks article tries to help developers use Ajax to build a solid foundation in which an application handles errors and problems smoothly.

    That's good, because none of the commercial "enterprise class" software that I have to work with handles errors and problems smoothly. They just crash or send an error message that has no relation ot the actual problem.

    --
    You never really know how close to the edge you can go until you fall off.
    1. Re:Good for Them by GoatMonkey2112 · · Score: 1

      It's nice that you have commercial "enterprise class" software that updates web pages without reloading the whole thing. What is it you use for that?

    2. Re:Good for Them by grimJester · · Score: 1

      That's good, because none of the commercial "enterprise class" software that I have to work with handles errors and problems smoothly. They just crash or send an error message that has no relation ot the actual problem.

      Yeah, all the "enterprise class" software I code just throw some odd "NullPointerExceptions" when things go wrong. Ajax could really help me with that.

  9. Re:AJAX? by FooAtWFU · · Score: 4, Funny

    Ajax was a king of Salamis, and a legendary hero of ancient Greece.

    --
    The World Wide Web is dying. Soon, we shall have only the Internet.
  10. Re:AJAX? by Transdimentia · · Score: 0, Troll

    You don't have the slightest idea what it is, do you? I was going to moderate this down, but there was no selection for 'ignorant'

  11. Re:AJAX? by FooAtWFU · · Score: 0, Flamebait
    That's not off-topic, you insensitive clod, that's humor. It's funny: laugh.

    THIS post is off-topic.

    --
    The World Wide Web is dying. Soon, we shall have only the Internet.
  12. Users.. by onion2k · · Score: 4, Insightful

    users have become more advanced

    They really haven't actually. They've stopped being mostly geeks and academics and now the internet is open to all. Users are much, much less advanced today than they were ten years ago. What has changed in more recent times is that the users now they're think more advanced. They're presented with interesting social networks (FlickR, Blogger, deli.co.us, etc), and they're capable of using these straightforward interfaces with lots of handholding (rebranding categories as tags for example) and they get the impression that they're learning something. Does that mean they know, or care, what an XMLHTTPRequest is? Nope.

    The same goes for customers. Yes, they want advanced reporting and robust apps .. do they care how those are achieved? Generally, nope.

    As for managers being fired for an application being unavailable 1% of the time .. the article talks about AJAX .. AJAX relies on JavaScript. Between 7% and 10% of web users have JavaScript turned off either implicitly or due to their IE security level. Surely if you're creating an AJAX application then you must realise the application is already unavailable to 7% of users even when your server is up and running? If high availability is key then you'd better not be using anything beyond HTML.

    1. Re:Users.. by nuttzy · · Score: 2, Informative

      If high availability is key then you'd better not be using anything beyond HTML.

      Uh... how about having an app degrade nicely? In most cases it's not that tough. So for the large majority that can take advantage of your whiz bang web app, go ahead and use AJAX (where it makes sense) and just be sure to have it degrade nicely for browsers that are not ajax aware and then also for browsers that are not handling javascript.

    2. Re:Users.. by spyrral · · Score: 2, Interesting

      My company uses a very popular ad system that relies on javascript to function. If the user doesn't have javascript turned on, then they can't see our ads. If they can't see our ads, then ... we really don't care if the site doesn't work for them.

      For all of you who've got adblockers on and javascript and flash turned off, welcome to the beginning of the end. I hope you enjoy cruising the crusty bowels of the Internet while the rest of us enjoy Flickr and the rest of the really tasty web 2.0 apps that are coming down the pipe.

    3. Re:Users.. by rubycodez · · Score: 1

      funny, all the hot internet sites I use work very well without any of that crap turned on - eBay, google, yahoo, amazno, various news sites, even slashdot. Maybe your company might see the beginning of the end as more and more people become security conscious.

    4. Re:Users.. by just_another_sean · · Score: 3, Interesting

      For all of you who've got ad blockers on and JavaScript and flash turned off, welcome to the beginning of the end.

      Oh the delicious irony of seeing this post immediately after a sensible poster mentions graceful degradation.

      See, I actually see things differently then you do. I do run with JavaScript disabled for the most part and AdBlock turned on. And you know what? I don't really have that many issues with websites. And if I do run into issues? Well, I really don't care if my browser doesn't work for them.

      I think perhaps just because you have "They're not seeing our ads? Well F them then!" attitude towards customers does not a) mean all companies do and more importantly b) not all developers do. Standards are generally designed to implement some backward compatibility. I don't think, despite your gloomy predictions, that this is likely to change anytime soon. The majority of (useful, interesting) sites will continue to keep this in mind in order to take advantage of as many eyeballs as possible.

      So I think I'll continue to use ad block, watch all my TV on DVR and skip the commercials, avoid tracking tools, like toolbars that integrate with my browser and in general keep myself as ad free as possible.

      Meanwhile you and the rest of the mass marketing industry can try the RIAA route and whine to the government about it. Maybe they'll make my DVR and ad blockers illegal. Then, I guess you win.

      --
      Creationist Textbook Stickers Declared Unconstitutional by CowboyNeal
    5. Re:Users.. by Dorceon · · Score: 1

      Yeah, I call BS on that managers getting fired claim. Nobody's getting fired for making pages that force you to use IE on Windows (like VH1's video page and every WMA-based online music store), and that's excluding a whopping 10% of the market.

      --
      What sound do people on rollercoasters make? Hint: it's not Xbox 360.
    6. Re:Users.. by mpcooke3 · · Score: 2, Insightful

      The problem is that for various well known reasons "we" (the technical community) have decided that most applications will be deployed over the web these days. As new users come onto the internet for the first time they access these applications and they quite naturally expect them to behave like other applications. Whether an application was accessed via the "Blue E" or by the start button they expect them to behave in similar ways. Internet users in the old days used to be looking at research papers and the users got used to expecting websites to look like pages of static text.

      Like it or not since we've bastardised the web in this way with forms, cookies, javascript, DHTML, AJAX, Tagging, etc, we have changed users understanding of what the web is. It's a shame that a standardised technology for deploying applications over the internet never took off and that we ended up having to use the mass of hacks that has resulted today in AJAX.

      On an unrelated note, Categories and Tags are not really the same thing.

      Normally there are a fixed number of categories and/or hierarchy of categories and items belong to one low level category only, categories are normally but not always defined by the site.
      Tags are arbitrary user defined keywords that are applied to items to help users search through items. Tags are always defined by users.

      Also outside of the web2 community most people understand categories and do not understand tags. My mum for example.

    7. Re:Users.. by spyrral · · Score: 1

      How the hell are you a customer if you refuse to view the ads? We're supposed to spend time and money to makes sure that self-important leeches like you can see our content? For what? Where is the benefit to us?

      Let me clarify that we don't actively block our content from people who can't view the ads. That would be a waste of time and money. But to go out of our way so "just_another_sean" who's so frickin l33t that he's got his Firefox adblockers and flash and js disablers installed and is gleefully laughing at his free ride can get the full experience of our sites? Naw.

    8. Re:Users.. by cruachan · · Score: 2, Interesting

      Ho Ho Ho. Why would anyone want to turn Adblockers off? Personally I keep javascript on (why should I disable an extremely useful browser extension because some advertising scum abuse it?) but run the Adblocking at the highest level I can. I rarely see any adverts and it seems to me that the adblockers are winning the arms race - we can have our web 2.0 applications just fine without the dregs of humanity that are advertiser messing things up for us.

    9. Re:Users.. by moonbender · · Score: 1

      Good for you. Great to see you waving the losing flag with so much conviction.

      --
      Switch back to Slashdot's D1 system.
    10. Re:Users.. by spyrral · · Score: 1

      Please explain to me how not expending time and money on users who do not bring in revenue is a losing strategy for a company.

    11. Re:Users.. by jonadab · · Score: 1

      > If the user doesn't have javascript turned on, then they can't see our ads. If they
      > can't see our ads, then ... we really don't care if the site doesn't work for them.

      Here's the thing: neither do they.

      If your site is broken, hey, there are tens of billions of other sites out there, tens of dozens of which can supply them with essentially the same thing your site provides, and like as not a dozen of them come up higher in their search results than your javascript adfarm, because, you know, they provide _useful content_ that other people _want_ to link to, and because their standard HTML is easily parsed by the search engines so that their relevance to the user's search criteria is evident.

      > For all of you who've got adblockers on and javascript and flash turned off, welcome to
      > the beginning of the end. I hope you enjoy cruising the crusty bowels of the Internet

      The irony here is simply stunning. I was pretty sure sites that say, "If your browser doesn't support Feature X, then our site is too good for you" *were* the crusty bowels of the internet, the state of the art of 1996. Welcome to the past.

      --
      Cut that out, or I will ship you to Norilsk in a box.
    12. Re:Users.. by Gulthek · · Score: 1

      Ha! Meet the Firefox extension: noscript.

      https://addons.mozilla.org/extensions/moreinfo.php ?id=722&application=firefox

      I can selectively enable javascript and every other web plugin for websites. If I need to see a site with javascript that I don't trust enough to add to my "always allow" list, I just temporarily grant access for the browser session.

      Combining that with adblock I enjoy (and pay to subscribe to) flickr and other sites, overly hyped web 2.0 apps, and such with no crappy javascript/flash ads.

      I'm happy to view ads from sites that I regularly enjoy (slashdot, penny arcade, etc) but there's no way I'm allowing random sites javascript access so tough luck.

      By the by, what do you do for disabled customers trying to access your site? It doesn't sound like you're standards compliant for accessability devices.

    13. Re:Users.. by Godeke · · Score: 1

      OK, since the original poster didn't bite, I will.

      If you make your site unusable without Javascript, Flash, Java and whatever else you want to impose, you *do* end up missing some customers. Making your site gracefully degrade means that people won't think that you are a failure as a programmer. See, when people go to a site and get broken links, partial page loads and other things like that, they think it is the sites fault, not their configuration (your Nemesis in the parent posts notwithstanding).

      That may mean simply saying up front "Javascript is required for this site and is not currently available in your configuration" along with some instructions based on the browser detected. That's what we do, and it works well enough. Those who refuse to use Javascript, as you point out, are not your customer anyway. But more importantly, those who just had it switched off, had a security setting or some other configuration issue know that your site isn't just some loserweb that failed to work. Which is important because some of them will turn it on, and even those who won't can't badmouth your company for failing to make the requirements clear.

      Likewise, in the case of advertisements (we are subscription based, so it isn't an issue for us), you can detect if the ads load and give a polite notice to unblock *your specific* ad server. Instead of just failing to operate, which makes your site look like a slipshod operation and again creates a negative customer experience. Never underestimate the power of a negative experience with an user to impact *other potential customers*. Any site that doesn't take that in consideration isn't doing their shareholders/investors any favors.

      --
      Sig under construction since 1998.
    14. Re:Users.. by ObsessiveMathsFreak · · Score: 1

      Between 7% and 10% of web users have JavaScript turned off either implicitly or due to their IE security level. Surely if you're creating an AJAX application then you must realise the application is already unavailable to 7% of users even when your server is up and running?

      Those users aren't cool enough to count. Not for AJAX man!

      --
      May the Maths Be with you!
    15. Re:Users.. by just_another_sean · · Score: 1

      Hmmm... I am probably risking some fingers by feeding the troll here but I guess I started it so here goes...

      How the hell are you a customer if you refuse to view the ads?
      Ok, first what are you selling? Just because I don't see your ads does not mean I'm not a customer. Tigerdirect sends me flyers (at home and work) and email all the time that go in the garbage the minute I get them. But guess who I buy 90% of my and my company's computers from? All the Dell, Newegg and IBM popups in the world don't change that and if Tigerdirect stopped sending me ads tomorrow I would still buy my stuff from them...

      We're supposed to spend time and money to makes sure that self-important leeches like you can see our content?
      How am I leech? I turn the ads off on /., but I contribute to discussions, have submitted a few stories and even got a geeky kind of thrill asking Cmdr Taco about features on the site through email. I don't see any notices on the front page saying "please don't turn off our ads!" or notices that my JS is turned off and could I please turn it back on so the site can track me better... Again just because I don't spend time looking at ads does not mean I don't buy things. Ad relevance is getting better but most ads on the net are no better then Tampon commercials during a football game.

      Let me clarify that we don't actively block our content from people who can't view the ads.
      That's great. That's how you're *supposed* to do it.

      But to go out of our way so "just_another_sean" who's so frickin l33t that he's got his Firefox adblockers and flash and js disablers installed and is gleefully laughing at his free ride can get the full experience of our sites?
      What again am I missing? This last statement seems to contradict your earlier statement that you don't actively break anything if people can't see the ads.

      My ride is certainly not free, I pay for my connection. I don't know what you pay to put ads on sites but what you are getting from me *is* free. You are placing an ad on a site that I desire to view. I do not desire to view the page so I can see your ad, I want the content in which that ad has been placed. When I connect to a site and your ad is downloaded without my consent you are getting, for free, the bandwidth it takes for me to download your ad.

      But hey, thanks for noticing how 1337 I am... :-)

      --
      Creationist Textbook Stickers Declared Unconstitutional by CowboyNeal
    16. Re:Users.. by AuMatar · · Score: 1

      Funny- I think being able to avoid sites like Flickr and ad based monstrosities like your site are a bonus, not a negative.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    17. Re:Users.. by WilliamCotton · · Score: 1

      Do you really think we can live in a world without commercials? If you're in the tech industry or a fan of computers in general, you've got to love advertising... it's the fluff that keeps all of this media going strong! We're not out in a field gathering food to barter with for clothing or anything else directly related to keeping us alive. We're engaging in a social and economic world based on the charade of commerce. It's just ones and zeros bouncing around, and something has got to keep up the illusion of a connection to the real world of water, food, clothing, warmth, and shelter. And those illusions are Subaru commercials and Whack-a-bin-Laden games. I know, it doesn't make sense, but just watch them already! Believe!

      --
      I've always prefered a command line interface. GUIs are such a cursory way to interact with a computer.
    18. Re:Users.. by oni · · Score: 1

      be sure to have it degrade nicely for browsers that are not ajax aware and then also for browsers that are not handling javascript.

      I am a big proponent of this way of thinking, and I design *all* my apps to degrade gracefully. Nobody has ever asked me to code this way and nobody seems to care that I do it, but for me it is a point of personal pride.

      And you know what, it really isn't all that hard to do this. For starters, you check your input params on the server. Many people think they don't have to do this because they have fancy javascript doing it. They don't realize that they are writing insecure apps most likely. Secondly, you should use javascript to write javascript-only controls. In other words, if you have a button that does some nifty javascript function, use document.write() to create that button. That way, people without javascript wont even see it.

      You'd be amazed at how many people scoff at the suggestion that they do simple things like those described above. Most programmers, it seems to me, just slop things together. They take no pride at all in their work. They don't love the code. And I think they are just lazy.

    19. Re:Users.. by outsider007 · · Score: 1

      AJAX relies on JavaScript. Between 7% and 10% of web users have JavaScript turned off either implicitly or due to their IE security level

      That's got to be the most made-up stat I've seen in a long while. The actual number is much closer to .0001%

      --
      If you mod me down the terrorists will have won
    20. Re:Users.. by NutscrapeSucks · · Score: 1

      Right.

      0.0001% might be exaggerating, but from what I've seen JavaScript Disabled is certain down in the noise level with "Opera" and "OS/2" and the random junk that's probably from crawlers. (Site doesn't use script for any major functionality.)

      A bigger issue for us would be the ~2% of users that use legacy stuff like Nutscrape 4.x, IE5.0/Windows and IE5.x/Mac.

      --
      Whenever I hear the word 'Innovation', I reach for my pistol.
    21. Re:Users.. by shadwstalkr · · Score: 1

      we can have our web 2.0 applications just fine without the dregs of humanity that are advertiser messing things up for us.

      Who do you think is footing the bill for those applications and the infrastructure to support them?

  13. Unfortunately... by everphilski · · Score: 4, Interesting

    In this day and age a lot of us are asked to program who are not by nature computer programmers. In a perfect world all the programmers would be CS majors. For example, I am an Aerospace Engineer, however I spend 6 hours a day writing code in c++. It isn't pretty but it works. Why? The company I work for could either:

    (a) Hire engineers who know engineering and are crappy programmers, and make them learn programming, or
    (b) Hire CS majors who don't know engineering, and spend 4 years to teach them engineering

    (a) makes more sense to me. A lot of my code looks like crap, and I know my CS friends could do better quicker, but they don't know the engineering principles I do. Long story short, I didn't have CS101, CS102, etc. There are a lot of us out here who are asked to code, who weren't brought up to be coders, who have to be taught some principles that aren't immediately apparent :P

    1. Re:Unfortunately... by AuMatar · · Score: 5, Insightful

      The correct answer is c

      c)Have the people who understand the engineering write pseudocode algorithms and work hand in hand with real programmers.

      The advantages you get from this- code that doesn't look like shit and have major architectural short commings, and much easier/cheaper maintenance. While I'm sure an Aero can learn to do basic programming in a month or so, it does take a few years to write good, well designed code. Whereas an experienced programmer can write equivalent functionality in 1/10 the time. By working together, you end up with higher quality software for much cheaper. This is the same way you see EEs and MechEs working with programmers in the embedded world.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    2. Re:Unfortunately... by Quarters · · Score: 2, Insightful

      Except that c) doubles the costs (at least) the company will incur. While it is the right answer from a technical standpoint, from a business standpoint it isn't optimal.

    3. Re:Unfortunately... by Anonymous Coward · · Score: 0

      This still requires the company to spend money hiring programmers for programming.

      It all comes down to what is cheaper. 1 professional which can do 1 job and another side job passibly, or 2 professionals who can do 1 job each.

      If you need a lot of code, then it might be more cost effective to hire programers. If you only need to code part of the day, then its probably not worth it.

    4. Re:Unfortunately... by Radres · · Score: 4, Insightful

      But c) will also half the maintenance costs of your crappy code.

    5. Re:Unfortunately... by Anonymous Coward · · Score: 0

      Except that c) doubles the costs (at least) the company will incur. While it is the right answer from a technical standpoint, from a business standpoint it isn't optimal.

      Not really true, since your engineer now has 4 times as much time to do engineering. So for every two engineers, replace one with a programmer and your output doubles while cost is relatively same. Otherwise you might as well let the engineer clean the office and deliver mail as well...

    6. Re:Unfortunately... by Anonymous Coward · · Score: 0

      Please tell me you're not writing code that helps run the planes in flight. If you are, please name the company so I can be sure to try and not catch any flights using their planes...

    7. Re:Unfortunately... by AuMatar · · Score: 4, Insightful

      Not in the medium to long term. The improved maintainability (and very likely, quicker turn around time) of the programmer's code will very quickly make up the cost and more. If a good programmer can turn an algorithm from an aero to code in 1/4 the time (which is not, by any means, an unreasonable assumption) you end up saving money very quickly- you can hire 4 aero engineers to code, or you can hir 1 programmer and 1 aero engineer. And the aero might have free bandwidth to do more aero based stuff as well.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    8. Re:Unfortunately... by John+Whitley · · Score: 1

      a) Hire engineers who know engineering and are crappy programmers, and make them learn programming

      I disagree that this is preferable. It takes more than that same "4 years to teach them engineering" to get an untrained programmer writing code to the same standard of the hypothetical trained and experienced CS major.

      This may be acceptable for some applications, esp. small, useful mathematical tools. The more sophisticated the project scope starts at (or grows to), the greater the benefit in having folks around who actually understand production software development. You really want your engineers able to focus on their engineering, and the software folks to focus on the software. Given that many engineers can code to some extent, a good developer can often write frameworks that allow the engineers to do some coding, concentrating on their problems without getting mired in aspects of software design that really aren't their specialty. In some sense, this very idea speaks directly to the success of tools popular in engineering and the sciences, such as MATLAB and Mathematica.

    9. Re:Unfortunately... by khendron · · Score: 2, Interesting

      I also graduated with a Masters in Aerodynamics, and I worked for an engineering company that required us to program. They adopted choice (a), and I will tell you (a) just doesn't work.

      Our code was crap and our applications extremely fragile. Nothing we produced was scalable or easily transferable from one client to another. Oh, everything worked after a fashion, but the architecture was comparable to a house of cards.

      I agree that our engineering background was essential, but what they should have done is hire an *experienced* CS major to be the system architect (a task that requires CS knowledge), and let us engineers work on the specific pieces that required engineering knowledge.

      --
      Life is like a web application. Sometime you need cookies just to get by.
    10. Re:Unfortunately... by Anonymous Coward · · Score: 0

      No, the correct answer is to use Model Based design.

      Let the tool write the C code for you. All you need to do is lay out the algorithm. The advantages are:
      1. You get a sophisticated simulation environment to test your algorithm.
      2. You don't need to know a word of C.
      3. You can rely on bug-free code automatically generated for you. (and even if you think that a human programmer can produce more optimal code, it is only a matter of time when the tool will evolve and get so good at writing code that the error prone human coder cannot justify the need to code).
      4. You can verify the code and in some case (such as in DO-178 implementations) even certify the code for safety critical tasks.

      Ever checked out Simulink and Real Time Workshop from the MathWorks?

      It's the only way to code!

    11. Re:Unfortunately... by everphilski · · Score: 1

      *shudder* simulink.... C++ all the way :P

    12. Re:Unfortunately... by richdun · · Score: 1

      Or even d)Have your engineers know how to develop good programs. I remember when my mother taught typing to high school students just ten to fifteen years ago - now everyone is expected to know how to use a keyboard, whether you do it "properly" or not.

      I don't think it's too much of a stretch to think that in the near future, everyone in technical fields will have to know how to build good software, not just know how to make a "hello world". It may not be the best software, and there will still be plenty of opportunities for professional programmers to develop much better software. But just like I can't type as fast as some secretarial professionals can, everyone will need software development skills.

    13. Re:Unfortunately... by AuMatar · · Score: 1

      Except that it isn't practical, for several reasons

      1)Not everyone has the mindset to be a good programmer. I'm not saying that the average engineer can't learn basic programming- they probably can. But I know some damn good engineers, and even some good math majors, who failed all their programming classes. They had no interest, and really didn't have the ability to break down problems the right way.

      2)Time. An engineer already has a shitload to learn. Even bachelor degrees are inching twoards 5 years now for many engineering majors. Adding programming on top of that is an unreasonable burden. Lets not even talk about adding it onto the decade a phd needs.

      3)Economics. Yes, you *can* have them learn programming. But its a waste of their time and effort, when there's people who specialize in that area. Engineering time is valuable, its far better to have them spend time doing what they specialize in rather than doing a half assed job in other fields.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    14. Re:Unfortunately... by goofballs · · Score: 1

      pffffftttt... i'm actually an AE that does a lot of coding as well, and we've tried it that way. you need to write *ridiculously* detailed specs on everything for a non-engineer to understand the problem your trying to solve and get it right. it's quicker, easier, and cheaper to do it ourselves.

    15. Re:Unfortunately... by nate+nice · · Score: 1

      I seriously hope you don't write any software that could affect a humans life. Not to mention you could potentially be writing code that projects rather expensive (and heavy for that matter) things into space...and since you're not an expert in software design, practices or memory management for that matter, this could pose a problem.

      Software is not to be taken lightly. The fact they have you programming in C++ scares me a bit. C++, as you probably know, is a rather low level programming languages with lots of little nuances and an incredible amount of ways to have things go wrong when you thought it was going right.

      Learning some syntax and basic semantics is not that hard. I used to write C++ programs well before I received my CS degree. But after taking courses, many which were not raw programming courses, I could identify many flaws in the design of my code, the management of my code and very importantly the testing and testing methods of my code. I thought my programs were good...I mean they worked after all... But I think you quickly learn this is the base requirement for any program and hardly substantial when you've actually studied the complex science of software design (as well as the other tangent requirements).

      I hope your company (sounds like NASA project management) really knows what they're getting into. Software design isn't engineering, but understanding every facet of software programming is critical, especially when human lives are at stake or expensive equipment for that matter.

      As an above poster mentioned, it would be wise to have you describe an algorithm and then have someone who actually knows what they're doing (trust me, you don't) actually put it through the process of becoming a piece of the engineered system.

      --
      "If you are a dreamer, a wisher, a liar, A hope-er, a pray-er, a magic bean buyer ..."
    16. Re:Unfortunately... by pyrrho · · Score: 1

      make up the cost? I don't think you understand the idea of cost entirely, no insult intended.

      the better code will not nec. make any more money for people, so even if the code is "worth" 2x, that doesn't mean they'll get 2x, also, in research you don't always have the money, you literally have to do the best with the resources you have, and that might not likely include a pseudocode engineer.

      add to that the fact that hiring software engineers is often a crap shoot and you get people that are not that great and just expenses...

      imo

      --

      -pyrrho

    17. Re:Unfortunately... by nate+nice · · Score: 1

      Yeah, requirements.....those are a real bumber. Imagine that...you have to have a consistent process to develop something very complicated.

      Most people with a CS degree should have more than enough understanding of Physics and Mathematics that they should be able to interpret what you're doing. Couple that with the fact that once they've been in your system a bit and understand the lingo and systems, they can really start to flow.

      It's quicker right now....maybe. It's easier right now...maybe. It's cheaper right now...maybe. Things have a tendency to catch up when you don't actually know what you're doing. I could design a rocket to go anywhere. I know the math and the physics and there is plenty of good books on it to reference but I would hardly trust myself with this task minus any software elements of it.

      --
      "If you are a dreamer, a wisher, a liar, A hope-er, a pray-er, a magic bean buyer ..."
    18. Re:Unfortunately... by TheJorge · · Score: 1

      Unfortunately, I don't think this is the case.

      I have both engineering and cs degrees, so I come from both sides of the issue, but unfortunately, my managerial and business experience is next to nil, which is what this is really about.

      IANAAE (aerospace engineer), but the give-the-nonprogrammer-a-programming-task is not unfamiliar to me. Colleagues have spent days on things that take minutes if you use the proper tools. Those of you who have written your own regex-like language to parse an XML document know what I'm talking about. The reason this happens is simple. Many of the solutions the engineers are coding will go no further than their code. Of the 10 coded apps engineers kludge together, only 1 is ever used, and therefore needs to be maintained or updated. Is it more cost effective to coordinate pseudo-code and program specs to a programmer for all 10 tasks or to have him rewrite the one we're acutally going to use?

      Though this strays a bit from the topic of the article, I don't necessarily see this system as flawed. Messy, yes. Very, very messy. But not flawed.

    19. Re:Unfortunately... by Cyno · · Score: 1

      I bet cheap companies spend a lot of wasted time learning things they should already know. You get what you pay for, but in some cases you get a lot more by doing a google/wikipedia search or reading a book. All I know is I would run things differently. But then I tend to disagree with most styles of business management these days.

    20. Re:Unfortunately... by AuMatar · · Score: 1

      You don't understand the idea of software cost. The majority of software cost occurs in the maintenance stage- fixing bugs, adding features, etc. The latter that a bug or design flaw is found, the more it costs to fix. This is due to needing to rerun regression tests and QA cycles. Design flaws found here are especially painful, as large portions of already written code may need to be partly or completely recoded (and then retested and reverified as well). If your code is low quality and hard to maintain, the costs of bug fixes and feature additions goes up exponentially due to this. And code written by non-programmers is going to be horribly likely to have design flaws- they don't know or understand the consequences of their design decisions. They don't have the background or experience to. Pick up The Mythical Man Month for a more thorough explanation of the idea.

      Hiring anyone for any position is a crap shoot. But hiring aero's and hoping to find ones who are capable of doing both their aeronautical work and their programming work well isn't even a good crap shoot- its like betting on snake eyes.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    21. Re:Unfortunately... by Anonymous Coward · · Score: 0

      Reread his post.

      CS people can probably develop better code, but they also produce it faster. There are a lot of studies out there that point out a 10 fold speed / quality increases between talented coders and people with similar backgrounds that are somewhat *lacking*. Chances are they can be 4x as fast AND produce cleaner code.

      A quick example back in college I was given an x86 assembler project that represented 1/2 the semesters grade. I spent 3 or 4 hours thinking about it an hour reading documentation and around 4 hours coding plus about an hour for testing and documentation and showed up with a 4 1/2 page program (6 with documentation) that worked fine and met spec. (There might have been a bug of some kind but I could not find any.) However less than 1/2 the class was anywhere near done and most of them had a huge ugly mess that had taken them 80+ hours. One guy had 40 pages of code which worked most of the time but had a *few* bugs.

      Granted the professor was nice and gave them an extra week, but I just handed it in. Now long term things only get worse when the specifications change it's easy to adapt 4 pages of code to do something new, but god help you when you start hacking an ever growing pile of code. In my professional life I often add functionality to old code and I often end up with a smaller and cleaner code base. Now most of these people where not on the CS track so I can understand them having some problems but I shudder to think of what their code would look like in the work force.

      PS: I agree with your " crap shoot" concept but if your building a team it you can go though a few programmers until you find someone that knows what their doing. IMO it's not that hard to find and maintain a few quality people vs. a huge project that is morphing into ever-larger monstrosity over time.

    22. Re:Unfortunately... by kibbled_bits · · Score: 2, Insightful

      It surely sounds like these aren't software projects at all. Kludge would be a very good word to describe that. There must be some development process (IE: Agile, RUP, etc). Problem is that people want the results of crappy code (quick), but not the side effects (bad quality). Unless as programmers we push back and educate our audience then we will never overcome this and plug the offshoring hole.

    23. Re:Unfortunately... by goofballs · · Score: 1

      1 and 2- if i had an engineer working with / for me that couldn't learn to be a passable programmer, i'd not want them to work with / for me. programming (at the level most engineers would be doing it- we're not talking huge codes here (typically)) mostly involves relatively simple math and control structures that any vaguely competant engineer should be able to pick up quickly. 3- engineering time is typically cheaper than (good) programmers' time. not to mention the engineer would still have to spend time writing specs and working w/ the programmer to tell them what to do. we've been in this situation many times, and it's much better / quicker / cheaper to get a engineer w/ passable programming abilities to do the coding for you. for many engineering problems, the coding is often relatively trivial compared to the engineering knowledge required. it's easier to get an engineer up to a passable level of programming skill than it is to get a programmer up to a passable level of engineering knowledge where not every single thing needs to be spelled out to them ('cause at that point it's cheaper to do it yourself anyways rather than produce such a detailed spec(costing you time and money) THEN pay the programmer). and getting that engineer the programming knowledge is more or less a one-time investment, whereas producing detailed specs is something that needs to be done everytime for a programmer.

    24. Re:Unfortunately... by pushf+popf · · Score: 0

      Except that c) doubles the costs (at least) the company will incur. While it is the right answer from a technical standpoint, from a business standpoint it isn't optimal.

      Doubles the cost of what?

      If an engineer costs $150K/year (including bennies) and a CS geek costs the same, the impact on profits for anything that would actually require that level of geekiness would be minimal.

      If you take into account support costs and potential failures for having crappy code in an embedded system, the costs is truly insignificant.

      How would you like to pay for a recall of 100,000 television sets because it would crash if you cycled though the channels then hit "volume up"? How about recalling thousands of SCUBA diving computers because there were certain combinations of conditions that would cause it to lock up while in use (under water) - actually happened. How does the cost of an extra engineer compare to the cost of a wronful death lawsuit?

    25. Re:Unfortunately... by straybullets · · Score: 1

      nope. you say this because you are a coder but what i see from real life ain't that pretty. coding contractors with high turnover provide no maintanability and in the end our hierarchy almost always decide to hand over the project to an inhouse ingeneer, and there are no full time coders on our team.

      --
      With that aggravating beauty, Lulu Walls.
    26. Re:Unfortunately... by deaddrunk · · Score: 1

      The majority of software cost occurs in the maintenance stage- fixing bugs, adding features, etc

      Until management learn this basic fact, IT will always suck as a job.

      --
      Does a Christian soccer team even need a goalkeeper?
    27. Re:Unfortunately... by TheJorge · · Score: 1

      Very well put. If I only had the mod points...

      Seems I only get them when "BSD vs. Linux, Round 485,546,880" is the only article.

    28. Re:Unfortunately... by Hosiah · · Score: 1
      Thank you! I am about as far from an Aerospace Engineer as you can get, but even those of us in mundane jobs like banking ended up doing some coding when we never had that in our job description. In fact, I think a large percentage of on-site development is done this way. If I were the boss, I, too, would take the engineer I already have who can write me some module that solves our problem and does what he needs rather than bring in Waldo the Visual Basic Wonder Boy at $15/hr to hose the whole system for a week.

      Too bad the rest of the world still believes programming is voodoo and fairy dust.

    29. Re:Unfortunately... by sp3d2orbit · · Score: 1

      It doesn't double the cost. The workload is spread out over two people who each can do their job in less than 1/2 the time it would take one of them to do both. Division of labor and specialization saves money overall.

      My manager uses the same argument (cost) to justify using his C++ programmers as SQL DBAs.

    30. Re:Unfortunately... by Breakfast+Pants · · Score: 1

      If you are saying "all your points are right, except that c) doubles the costs..." I don't see how you can make that claim given the "Whereas an experienced programmer can write equivalent functionality in 1/10 the time." Now, if you aren't accepting that as true, at least say so.

      --

      --

      WHO ATE MY BREAKFAST PANTS?
    31. Re:Unfortunately... by goofballs · · Score: 1

      Yeah, requirements.....those are a real bumber. Imagine that...you have to have a consistent process to develop something very complicated.

      yeah, that's the thing- most of the things that engineers are going to knock out aren't that complicated programatically. and yes, requirements CAN be a real bummer when you have to essentially spell it out line by line to someone because they just don't get the basic concepts.

      Most people with a CS degree should have more than enough understanding of Physics and Mathematics that they should be able to interpret what you're doing. Couple that with the fact that once they've been in your system a bit and understand the lingo and systems, they can really start to flow.

      yeah, not so much. it's not that you have to explain the physics to them, you have to do crap like give them all the equations you need to solve a problem, etc. the math is simple enough to dump into code, so it's easier and quicker to to tell an engineer that you need a code to solve for the pressure distribution on the upper surface of a wing given basic geometry, mach, and alpha then to explain to a cs major all the equations and how to use them. by the time you get it all down, you couldda typed up half the equations into the program yourself. and the cs major isn't gonna have any idea what to poke and tweak to see if his code is robust.

      It's quicker right now....maybe. It's easier right now...maybe. It's cheaper right now...maybe. Things have a tendency to catch up when you don't actually know what you're doing.

      no maybes, it's quicker, easier, cheaper. and you don't have someone who doesn't know what they're doing do it- they LEARN (once) how to do the basic coding, then they do it. engineering equations are easy to program.

      I could design a rocket to go anywhere.

      you could design one, but it probably wouldn't actually go anywhere. if i have an engineer program something, it's going to run; the code may not be as pretty, but it'll do the job, and likely alot better than one done by a cs major that i hand specs to, because as the engineer codes the program up, he'll draw on his past experiences about how engineers really work and incorporate that into the program. that's the big difference.

      and that's not just how we work in-house. that's how a LOT of the commercial software houses that develop engineering software do- they have cs guys to be sure, but they also have a lot of engineers that have some programming background, or have learned on the job. i PERSONALLY know this is the case at altair, dassault, msc, and ptc.

    32. Re:Unfortunately... by nate+nice · · Score: 1

      Then who's going to write the game that's an Easter egg found by only the most savvy pilots?

      --
      "If you are a dreamer, a wisher, a liar, A hope-er, a pray-er, a magic bean buyer ..."
    33. Re:Unfortunately... by Tooky · · Score: 2, Insightful

      Have the people who understand the engineering write pseudocode algorithms and work hand in hand with real programmers.

      Even better, get them to pair-program. I heard a talk at XPDay London recently by a guy from a company who build gear boxes. They had similar problems where either developers didn't understand the engineering well enough or the engineers produced poor code.

      They began to implement XP (which we don't need to go into) and had developers and engineers pair-program on the tasks. This was a huge benefit for them as not only did they get well developed code that worked in terms of the engineering, but they also began to spread the domain knowledge around the team. The engineers started to get a better appreciation of development, and the developers were starting to pick up some of the domain knowledge from the engineers.

    34. Re:Unfortunately... by Anonymous Coward · · Score: 0

      Those of you who have written your own regex-like language to parse an XML document know what I'm talking about

      I see "real" programmers doing this all the time. I had an argument with a guy at work doing this exact same thing last week, and he is a CS major. He just hates XML.

  14. Re:AJAX? by Anonymous Coward · · Score: 0

    See AJAX

  15. Re:AJAX? by Anonymous Coward · · Score: 0

    Um, no. That first "A" stands for Asynchronous. There's more to it than just some javascript and server-side scripting. Just for fun, rtfa?

  16. Re:AJAX? by RightSaidFred99 · · Score: 1

    Wow. Usually I would make sure I know what I'm talking about before referring to people as morons or PHB's. You really have no idea what an AJAX page is, do you? You seriously think it's related to PHP and server side scripting? Maybe you're trolling, if so - good one.

  17. Pretty sparse by Gopal.V · · Score: 3, Informative
    The document is pretty much ranks in the category of 30 second ajax tutorials. It would have been better if the document has explained how you were supposed to handle concurrent XmlHttpRequests - a problem I am faced with. Yesterday, I noticed the new Y! libs released had - transaction ids for Ajax requests. I've been using closures in javascript to maintain the context info, but this way sounds much better.

    Any decent webdev entering the field should know about http status codes, HEAD requests and all that. Also it should be noted that article didn't even mention how many times state 3 is hit for a particular request - I got caught by that one once.

    1. Re:Pretty sparse by makomk · · Score: 1

      Hmmm... I wonder. You could probably just create a JavaScript object to store information about each request, and use a method reference as the onreadystatechange callback function, though I'm not sure how portable/reliable that is.

  18. Wow... by Ixne · · Score: 1
    "The Web is no longer a place where simple applications are tolerated; 'users have become more advanced, customers expect robustness and advanced error reporting, and managers are fired because an application goes down 1 percent of the time. It's your job then, to go beyond a simple Ajax application that requires a more thorough understanding of XMLHttpRequest.'

    For a moment there I thought I was reading propaganda from the back of the latest video game...
  19. Corrected URL by RealProgrammer · · Score: 4, Informative
    The download link in TFA has an error. To get the code from the article, use:

    http://download.boulder.ibm.com/ibmdl/pub/software /dw/web/wa-ajaxintro3_ajax-xhr_adv.zip

    Taking the "%20" away from the final "/" made it work.

    (There should be no spaces in the URL.)

    --
    sigs, as if you care.
    1. Re:Corrected URL by Emetophobe · · Score: 1

      The download link in TFA has an error

      It's not the TFA that had the error, it's IBM's website. Go here and click the Accept License button at the bottom, it will lead you to the broken url.

  20. Re:AJAX? by Anonymous Coward · · Score: 0
    Hey, at least they are up front about it.

    Or would you rather they posted AC with a "d00ds look at this cool link I just found"?

    (Probably would have worked better for 'em ;-)

  21. frameworks reduce need for low level details by DeveloperAdvantage · · Score: 2, Interesting

    Every Ajax application uses the XMLHttpRequest object, so you'll want to be intimately familiar with it to make your Ajax applications perform and perform well.

    I think this is true right now, at least to some extent, but as frameworks solidify and become proven, there will be less benefit to being "intimately familiar" with the XMLHttpRequest object. Of course, knowing more about the underlying technology can't hurt, and you will need to know them if you are the one writing a framework.

    For a very good source on frameworks, take a look at http://ajaxpatterns.org/Ajax_Frameworks

    --
    FREE - Java, J2EE and Ajax Audiobooks for Software Developers - www.DeveloperAdvantage.com
    1. Re:frameworks reduce need for low level details by Anonymous Coward · · Score: 0

      Real quality developers. It looks like they can't even get a simple "text-to-HTML" (converting " to ", & to &, etc.) algorithm right. On the page, for everything that should be in quotes, I'm seeing:

      "Ajax&amp ;quot;

  22. the web IS such a place! by tjr · · Score: 3, Insightful
    The Web is no longer a place where simple applications are tolerated;

    Sure it is. Most web applications that I use, whether if they make use of AJAX or not, could certainly be plenty usable and valuable without AJAX.

    AJAX makes some things possible that aren't possible using plain HTML, but it doesn't make ALL plain HTML so much better that it would be impossible to imagine the site without it.

  23. Better Blocking by Anonymous Coward · · Score: 0

    This will merely lead to better javascript filters.

    Your adds will continue to be blocked.

  24. simple != intolerable by blue_adept · · Score: 5, Insightful

    The Web is no longer a place where simple applications are tolerated

    Not so. Simple = GOOD, just look at the success of google; no fancy front end required. AJAX, like good special effects in a movie, can enhance the end-user experience when applied selectively and intelligently. They are NOT an end in themselves.

    The truth is, the web is a place were only USEFUL applications are tolerated, whether or not they use AJAX.

    --

    "Is this just useless, or is it expensive as well?"
    1. Re:simple != intolerable by jetxee · · Score: 2, Insightful

      I agree with you. Content and usefulness matter. And Simple = BEAUTIFUL.

      Yet, Simple != Easy to create. And Simple != Low Tech. Simple = Nothing excessive.

      And as far as AJAX helps to save some mouse clicks and page reloads, it may be used to weave really simple web.

  25. The Web is no longer... by jetxee · · Score: 2, Funny

    The Web is no longer a place for information exchange. It is a place to invest your money, to hire more and more coders/artists/testers/managers, to maintain all this eye-candy. There is a reason: It looks just like a real application inside your web browser!

    We don't have anything special to say. But now instead of looking for a `Back' button, you may drag-n-drop our whole corporate site directly to your Recycled Bin!

    1. Re:The Web is no longer... by SixDimensionalArray · · Score: 2, Insightful

      You know, this comment is not just funny, I find it rather ironic. Why do we try and force a "real application" through a web browser? The way we are treating browsers these days, it seems like they are less about information presentation/sharing and more about actual application-type functionality. I thought that was what all the GUI libraries that come with your OS were meant for!

      Rather than taking an incremental approach and altering the core purpose of "web browsing", why don't we get all of the major technology companies that exist today to agree to support ONE standard for the remote binding of locally displayed user interface components. That way, every company can make their own components and their own code, but everybody knows a standard way to bind network-based logic to an interface. I'm pretty sure this is what Bill Gates was after when he envisioned .NET, what Sun hoped Java would be, what Macromedia hoped Flash would be. It's clear that no plugin, no single method is dominant. All we have is a [slowly] improving mess of HTML, CSS and Javascript. AJAX makes a difference, but only so far as it accomplishes the goal of ONE standard for fat-client, desktop application type functionality.

      Seriously, are all the big players so greedy that they can't ALL band together, for the good of humanity and advancement of technology, to agree on ONE standard? ONLY ONE? Take some time, flesh out a good model, agree to standardize, build new products, free and proprietary, and let's make the shift to these well-defined products.

      I guess I'm biased... I've been developing web applications for years, and I recently was speaking with a long-time desktop GUI developer. This developer hasn't suffered nearly as many of the injustices that we web developers have, trying to shoehorn something into a "web browser". Of course, his application doesn't work on every OS and every type of system (terrible in and of itself), but hey, if we had ONE standard for UI binding to network-enabled logic (web-services, remote components, anything at all), maybe it could.

      SixD

    2. Re:The Web is no longer... by Baricom · · Score: 1

      Why do we try and force a "real application" through a web browser? The way we are treating browsers these days, it seems like they are less about information presentation/sharing and more about actual application-type functionality.
      Web applications have a number of good qualities, from the user's perspective. They allow ubiquitous access, work on essentially any modern computer (Firefox will run apps on Windows, Mac, and Linux with no problem), and can be kept updated automatically. I don't know where you draw the line between "presentation/sharing" and "application-type functionality," but remember - Microsoft was worried enough about Netscape achieiving the exact effect that you're talking about that they started giving away a web browser to cut off Netscape's revenue stream.

      I thought that was what all the GUI libraries that come with your OS were meant for!
      GUI libraries pre-date the Internet. I think that today, they're mostly there for legacy purposes. From a developer's perspective, a single code base that runs everywhere is much more appealing.

      Rather than taking an incremental approach and altering the core purpose of "web browsing", why don't we get all of the major technology companies that exist today to agree to support ONE standard for the remote binding of locally displayed user interface components.
      Do you really think we could get W3C, Sun, Apple, Mozilla, Adobe, and Microsoft to sit at a table and agree on anything?

      I'm pretty sure this is what Bill Gates was after when he envisioned .NET, what Sun hoped Java would be, what Macromedia hoped Flash would be.
      Yes, but each of those companies also envisioned that their platform would become the market leader and choke out the competition. Cooperation doesn't last for long when everybody is intent in killing their competitors off.

      All we have is a [slowly] improving mess of HTML, CSS and Javascript. AJAX makes a difference, but only so far as it accomplishes the goal of ONE standard for fat-client, desktop application type functionality.
      It has a long way to go, but I'm still excited by how these languages are able to play off each other's strengths. It's a powerful platform that continues to grow in its abilities as more browsers implement more of the specs.

      Seriously, are all the big players so greedy that they can't ALL band together, for the good of humanity and advancement of technology, to agree on ONE standard? ONLY ONE?
      Now you're catching on.

      Take some time, flesh out a good model, agree to standardize, build new products, free and proprietary, and let's make the shift to these well-defined products.
      It's a nice idea. So is the W3C. I don't think it's likely that we're ever going to see a world where the standards are followed by all the major players.

      Of course, his application doesn't work on every OS and every type of system (terrible in and of itself), but hey, if we had ONE standard for UI binding to network-enabled logic (web-services, remote components, anything at all), maybe it could.
      I think the one, standard, network-enabled binding is the collective W3C specs. It's the closest thing we have to a world where everything of value is accessible anywhere. It's not here yet, but when it gets here, it'll be amazing.

    3. Re:The Web is no longer... by SixDimensionalArray · · Score: 1

      I thought that was what all the GUI libraries that come with your OS were meant for!
      GUI libraries pre-date the Internet. I think that today, they're mostly there for legacy purposes. From a developer's perspective, a single code base that runs everywhere is much more appealing.

      While I will agree that SOME GUI libraries predate the net.. I feel like many GUI libraries had so much of the functionality that we are trying to emulate now with AJAX in the browser, that it's kind of silly that we can't use native OS components. For example, have you ever tried to code an extremely flexible data grid control in the browser (not using any plugins)? I mean, a control that somewhat mimics MS Excel or OpenOffice Calc functionality? Yes, we can approximate that today with tables, or, if you're feeling lucky, with divs, and use lots of nice Ajax functionality to load data, make it seem more dynamic, etc. However, MS has had a GUI data grid that handles 99% of this easily in normal fat client apps. Cross platform widget frameworks like WxWidgets, Qt, Gtk, etc all have much more dynamic control sets. And in the end, web browsers end up rendering their input boxes, buttons, etc. using these widget frameworks or GUI libraries.

      I admit I may sound a bit redundant considering the W3C is, in THEORY, interested in building such a framework. I only think they have been considering this kind of in-depth application framework for a very short time, and sometimes, I admit, I get tired of waiting around when good solutions could already exist. I'd like to see the OS and major tech companies get behind the push and this time understand why open standards/open source are important to innovation, and don't necessarily hinder competition. Yes, I know, radical thinking..

      Perhaps the W3C should peruse what desktop/GUI application developers have used for controls for years, and use that as a starting point (of course, innovation helps too!). I truly wonder if Tim Berners-Lee had what the Internet is today in mind when he started it so long ago.

      SixD

    4. Re:The Web is no longer... by Baricom · · Score: 1

      You're right about not having native widgets exposed in the web browser. Sorry about that. When I wrote my earlier response, I didn't quite understand the point you were getting at.

      Perhaps what we need is as simple as exposing these additional controls through HTML's <input> element or XForms.

      I think very few people truly understood the potential of what the web could become...Sir Berners-Lee certainly didn't. One of the few who did might have been Microsoft. In an ironic way, Microsoft's sudden about-face in embracing the Internet and releasing Internet Explorer may have been the smartest decision they ever made, because if they had missed the chance, they would be irrelevant today, and everybody would be running their apps on Netscape servers.

      By the way, I don't mean to negate your good points, but TrimPath and Active Widgets both have decent data grid widgets, if you're looking at using them for a particular project.

    5. Re:The Web is no longer... by The+OPTiCIAN · · Score: 1

      > Why do we try and force a "real application" through a web browser? The way we
      > are treating browsers these days, it seems like they are less about information
      > presentation/sharing and more about actual application-type functionality.

      Spot on on this point. Programming practice for even basic html and form-based web applications is still nowhere near mature. You only need to look at the number of people who jump up and down over ruby on rails to see that - in spite of the fact it offers limited business-logic/model/presentation separation and a far-from-cutting-edge

      I've been doing amazing things in an application platform I've been writing - having workflows that users can freeze and stack (complete with in-progress data transactions), a 'dock' (to allow you to dock and use objects to a sidebar in the LAF on a context-sensitive basis), and a few other cool things I haven't seen done in applications anywhere else. All this is operating on the backend. And since I'm no genius and have done it all myself, something makes me feel that there is far far more room to evolve in this direction.

      This whole ajax phase is business-as-usual in that every couple of years a new fad comes along that tries to turn our browser into a desktop app despite the fact that it doesn't actually add that much to the user experience and costs far far too much to develop elegantly. These movements are a mirage - the technology doesn't translate into better webpages because they miss the point of the web: it's a simple and stable means of deploying applications with a consistent interface without the user having to download a specific client.

      If anything, html is too powerful and complicated, and we'd benefit from a simpler standard that was easier to template and there'd be no such thing as site-specific styling (or else it would be very limited). Ajax can be cool for preemptive data validation and cute searches, but it's not revolutionary or particularly signficant.

      I don't agree with you about GUI components - I don't think they're so significant that it would be worth the enormous work it would take to make it happen. Most applications are better served by being web-based anyway. The only things you should need to do on your desktop are terminal; browser (which is actually just a different type of terminal); hardware-intensive apps (image editors, games, etc). Everything else is better served by being simple and server-side (with all the advantages that allows - ccentralised backups, redundancy options, straightforward remote access, etc, etc).

      --


      Believe with me, my saplings.
    6. Re:The Web is no longer... by SixDimensionalArray · · Score: 1

      I don't agree with you about GUI components - I don't think they're so significant that it would be worth the enormous work it would take to make it happen. Most applications are better served by being web-based anyway. The only things you should need to do on your desktop are terminal; browser (which is actually just a different type of terminal); hardware-intensive apps (image editors, games, etc). Everything else is better served by being simple and server-side (with all the advantages that allows - ccentralised backups, redundancy options, straightforward remote access, etc, etc).

      Of course, I see your point. I'm curious, what is your opinion on the "thin-client" approach that many companies have tried, a la Citrix, VNC, network-based X desktop, RDP, terminal services, etc? I have often thought that serving up an actual screen scraped image of an application running on a server platform would be a much better method of distributing fully featured web applications.

      I suppose what I have considered many times is a remote desktop kind of philosophy (somehow, simpler and lower level than those mentioned earlier), where the GUI rendering framework itself is actually hosted on the server, and the fully rendered page is just passed through as an image or much more simplistic display/markup, which can also be compressed. It's not a revolutionary idea by itself, but perhaps a refactoring of an older idea with a slight twist.

      Thanks for your comments fellow Slashdotters!

      SixD

    7. Re:The Web is no longer... by jetxee · · Score: 1
      Rather than taking an incremental approach and altering the core purpose of "web browsing", why don't we get all of the major technology companies that exist today to agree to support ONE standard for the remote binding of locally displayed user interface components

      Isn't HTML that ONE standard for remote binding of locally displayed user interface components. There is plenty of [text] widgets: links, divs, tables, buttons, input areas...

      And finally, if one needs more widgets and better interface declaration, isn't XForms that one standard to follow? (I am not proficient with XForms, that is how I understand them)

  26. Doesn't seem to be that thorough by MikeRT · · Score: 1

    Truly implementing good error handling in web pages is something that would take a lot more effort for most people than with Swing or Windows Forms. You need to not just alert the user, but highlight their mistake which means good page layout and cooperation with your JavaScript. Highlight the field that is invalid and provide a well-designed error message explaining what went wrong.

    One of the biggest problems out there is that web development is not taught in CS. Like most CS geeks, I picked up what I've learned through my own studies, few of which included how to integrate CS concepts into web page development. You either tend to see material and classes that teach web development from a page designer's perspective, or from the perspective of an enterprise architect. None of the formal classes I took in any of the different majors that touch on web development taught how to do something as simple as this for separating the JavaScript from the HTML.

    1. Re:Doesn't seem to be that thorough by Anonymous Coward · · Score: 0

      None of the formal classes I took in any of the different majors that touch on web development taught how to do something as simple as this [blindmindseye.com] for separating the JavaScript from the HTML.

      That kind of thing is fairly well documented with the rest of JavaScript. You don't need someone to teach that. I guess you could pay someone to read the JavaScript specification to you if you wanted.

  27. V&V by everphilski · · Score: 1

    What Quarters said, plus you have problems with verification and validation. You need the engineers to do the actual verification and validation of the codes with the algorithms, how can they do that if they didn't write and are not compotent with the code? I think the better compromise is to hire engineers with some level of programming experiance and tolerate the fact that they will spend a few hours a week educating themselves.

    1. Re:V&V by ncmusic · · Score: 1

      You need the engineers to do the actual verification and validation of the codes with the algorithms, how can they do that if they didn't write and are not compotent with the code?

      You can do it via unit testing or black box testing.

    2. Re:V&V by AuMatar · · Score: 1

      Umm, and who do you think is more qualified to verify and validate a software program- an aero or a CS major? Again, the aero will have to work with the testing/QA team, but instead of spending all of his time writing crappy code that will have huge maintenance costs over time, he spends a small amount of his time working with other team, then spends most of his time doing the aero based stuff like engine design (or whatever his real job is).

      Like I said, this is what is normally done in the embedded industry. Its an economic concept called comparative advantage- THe aero is better than the CS grad at doing aero work. The aero might even be better than the CS grad at doing the programming, given this specific domain (in the extreme short term, when you ignore maintenance, design issues, and debugging). But its still not cost effective to have the aero doing the programming, because the pure aero based work needs to be done and he's the more qualified. Penny wise and pund foolish. And very questionably penny wise.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    3. Re:V&V by everphilski · · Score: 1

      By validating, we aren't validating the application as a whole. We are talking about validating the algorithms

      (1) as implemented in the code
      (2) as they interact with the rest of the system (other algorithms)

      You can't ask someone who doesn't understand the physics behind the problem (IE: a CS) to do that. You need the AE to do that. And you can't ask the AE to do that if he doesn't know the language well enough to jump in and mess around with it. I'm not saying throwing a CS or two in the mix is unwise, I'm just saying that you can't remove the engineers from the programming for what I do; I will always spend 4-6 hours working in c++ at my current job even though I didn't take a single college course in c++. 100% self-taught; my buddy who was a CS would write elegant code, and gets a good chuckle when I tell him some of the stuff I do (he's nice enough to take the time to tell me how to fix it and the proper approach to take next time...).

    4. Re:V&V by AuMatar · · Score: 1

      ANd thats what software testing and QA are all about. I've written scanner firmware before, do you think I have a PHD in physics and understand optics? I've written motor control code before, but I'm not a mechE either. Thats what testing is all about. Aero isn't any different. You do black box testing to ensure that for whatever inputs you have, the algorithm outputs the expected value(s). I'd be one hell of a lot more scared to use software tested by the aero's to be honest- no aero will have any understanding of software testing methods. The CS guy would.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    5. Re:V&V by Radres · · Score: 1

      All engineers and scientists, regardless of field, speak math. If you hire a CS person with a background in mathematical methods, he will be able to translate your equations into computer language.

    6. Re:V&V by nate+nice · · Score: 1

      Doesn't understand the physics? What kind of CS's are you dealing with? I had to take plenty of physics and math and I'm sure I could handle anything you have to.

      I'm happy your friend gets a good chuckle. Hopefully he's a passenger on one of the craft you programmed for.

      --
      "If you are a dreamer, a wisher, a liar, A hope-er, a pray-er, a magic bean buyer ..."
    7. Re:V&V by everphilski · · Score: 1

      I've written scanner firmware before, do you think I have a PHD in physics and understand optics?

      Motor feedback circuits are easy. Lego's Robotic Invention System 2.0 contains enough parts to build a rudiamentary scanner, many grade school and high school kids have built scanners with them (google it). Not trying to belittle your accomplishment.

      I disagree with your opinions but I can't really go into more detail on the public forum. Sorry. Bio may clue you in as to why.

  28. Re:AJAX? by Serapth · · Score: 4, Funny

    ... and a bleach!

  29. huh? by Anonymous Coward · · Score: 0

    Is this a joke? Thats just the usual crap that has been around for ages, and real(TM) programmers have been using this anyway.

  30. Well in MY OPINION by Anonymous Coward · · Score: 0

    The web went to shit back in 1996 back when Mosaic was released.
    Putting the internet into the hands of the stupid undeserving proles ...and from there, browsers only got more and more bloated as time went on.

    I'm typing this in Links and as a True Command-Line-Only Unix user you should too!

    1. Re:Well in MY OPINION by Anonymous Coward · · Score: 0

      Hang in there! Eventually the grubby masses will tire of the web, and it will be restored to us worthy Liynkxs users. Then our years of experience will be worth mega $$$$

  31. 'users have become more advanced'?? LOL by v3xt0r · · Score: 0

    Simply using firefox does not make users 'more advanced'.

    Just because you prefer DIV over TABLE does not make you a 'more advanced' HTML/CSS Programmer, it actually proves your lack of experience in the real-world.

    Introducing asynchronous functionality into your web page does not make it 'more advanced', it is just an 'alternative' design pattern.

    AJAX is simply a design pattern people.

    Whoever made the site 'AJAXDesignPatterns.com', has no clue what they are talking about.

    --
    the only permanence in existence, is the impermanence of existence.
  32. Re:AJAX? by DeveloperAdvantage · · Score: 3, Informative

    Thanks. Sometimes I really don't understand the censoring, I mean mod system here. Our audiobooks are currently freely downloadable, we have no advertising on our side, and it seems reasonable and on topic that if someone asks about Ajax to point them to our material. After all, this whole thread is about an article from a huge, profitable corporation. Maybe instead of audiobooks, I should call them "audicles", and then it will be ok to mention them when people are looking for information.

    Anyway, thanks again.

    --
    FREE - Java, J2EE and Ajax Audiobooks for Software Developers - www.DeveloperAdvantage.com
  33. Nice, but not useful. by pkulak · · Score: 1

    All this low-level stuff was nice to know a year ago, but I don't really think it's apropriate anymore to start from the bottom up like this. You should really be using one of the great AJAX frameworks out there for stuff like this. Dojo is great for any application, and if you're using .NET, you can't beat Atlas. Actually, I'm not sure that anything can beat Atlas. :D

  34. Re:AJAX? by slamb · · Score: 2, Informative
    It's what most web people have been doing for years now anyways. using html, javascript and a server side scripting like PHP together to make a website. in a way you could call slashdot a AJAX type of site.

    You'd be wrong. I don't believe slashdot uses any Javascript, except maybe some ad stuff. And even if it did, that's not a good definition. The point of Ajax is updating the client's display with new data from the server without reloading the entire page. This is why Ajax is so trendy - these pages are more pleasant to use because they respond more quickly, and without unrelated parts of the display going away and coming back or causing everything to scroll away from what you were looking at.

    Ajax accomplishes this with the XMLHttpRequest() object. (It's a misnomer - XML doesn't have to be involved at all.) It's just a way to issue a request and execute some code when it completes (by success, failure, or timeout). That code can update a status bar, add some text to the page, or do something more sophisticated.

  35. I seem to recall... by GReaToaK_2000 · · Score: 1

    AJAX was in Flash Gordon!!!

    Flash!!!
    AAahhhh!!!

    He saved everyone of us!!! :-D G

    1. Re:I seem to recall... by Anonymous Coward · · Score: 0

      Laughed my ass off. Whats next, the Ming browser?

    2. Re:I seem to recall... by GReaToaK_2000 · · Score: 1

      Yeah, it has a button (like the one in the movie) to destroy the web site you visit. :-D

  36. Re:AJAX? by PsychicX · · Score: 2, Insightful

    So have they figured out how to have the back button not wreak havoc on the page yet?

  37. Re:CS101 - Why manual XMLHTTP? by Primal+Fear · · Score: 1

    I know of an AJAX RAD framework (http://www.javeline.org/ that has implicit error handling through 'SmartBindings' it works by automatically keeping the client side data consistent using a transaction manager, independant of server architecture. Transactions can fail at a higher level than plain communication also (serverside validation failed or user logged out or things like that). Its works a bit like an 'undo stack' on the client, purely XML based. Its written by the developer of the vcXMLRPC library, one of first opensource ajax libraries.

  38. one of the funnier things i've seen all day :) by Anonymous Coward · · Score: 0

    'users have become more advanced'

    try some usability testing and see how advanced typical users are

    "where's the any key?"

  39. Ajax was one bad mothah by CrazedWalrus · · Score: 0, Offtopic

    Next to General Agamemmnon, he was the most ruthless of the Titans during the Butlerian Jihad.

  40. I would prefer the JSON way by moria · · Score: 4, Informative

    Using JSON, JavaScript can load data from any address, when XMLHttpRequest requires you to stay in the same domain. Besides, JSON is JavaScript native and is therefore much easier to consume, for example, using MochiKit. As for the generator, it is trivial to convert native data to JSON data in a wide range of programming languages, including all the major server side scripting languages, like Python and Java. Yahoo has released a lot of their APIs on JSON and some excellent Python WebApp Framework has built-in support to speak to the client scripts in JSON.

    1. Re:I would prefer the JSON way by aztracker1 · · Score: 2, Interesting

      There's always Anthem.Net for those that like C# as well... ;) I think JSON is much lighter for data than using xml... since the syntax can be *much* lighter with json, especially for somewhat complex relationships, and data.

      --
      Michael J. Ryan - tracker1.info
    2. Re:I would prefer the JSON way by Sithgunner · · Score: 1

      Apparently, the JSON web lacks any good explanation what it's good for, how to use it and where to find other information. Just too bad.

      Lack of any real example puts me away, or are they silently suggesting me to go google myself?

    3. Re:I would prefer the JSON way by brpr · · Score: 2, Informative

      There's nothing to it, it's just a subset of the Javascript literal syntax which happens to have a lot of library/community support (i.e. you don't have to roll your own Perl parser/generator library, or whatever).

      --
      Freedom is not increased by mere diminuation of government. Anarchy is freedom for the strong and slavery for the weak.
    4. Re:I would prefer the JSON way by sivadnitsuj · · Score: 2, Interesting

      While AJAX is limited to acquiring data from within the same basedomain, it's trivial to use something on a local server like cURL wrapped with PHP/Perl to get & parse remote content. You can then do sanity & security checks on the acquired content before passing it along to your AJAX application.

      (Silly, but it reminds me of my first few Perl scripts, and how I would get around "taint" checking by passing all input through a 's/(.)/$1/' regular expression)

  41. 1 percent is a lot by Kristoffer+Lunden · · Score: 1

    You know, a downtime of 1 percent is almost 4 whole days a year. That is a lot of "sorry we're closed" (or "building is gone") if you are supposed to have a 24/7 business. I don't think it's unreasonable to have slightly higher demands than that.

  42. well... by solidtransient · · Score: 1

    I still think AJAX is ok in a minimal use, but I've written plenty of ajax-free web apps that work great with no complaints from users. I'm all for the ipod approach -> Give them something that works and isn't hard to use, even if it does make the page refresh.

    --
    firestream.net
  43. Re:AJAX? by Biffa · · Score: 2, Informative

    The core concept of AJAX is to use Javascript in the browser to make requests to the server and then update the browser without having to load a new web page. This is accomplished by using the XMLHTTPRequest object which is available in one form or another in the lastest major browsers. This concept isn't particularly new (I worked on a project in 1999 that used a Java Applet to do the work that XMLHTTPRequest now does). However, what is new is that the technology is available natively in the major browsers, and can be used to make web-based applications more interactive and user friendly, without requiring any additional plug-ins. However, AJAX is currently a hot buzzword and way over-hyped. Anyone who already has solid Javascript skills and knows a server side scripting language should be able to pick up AJAX in a couple of hours. Eventually, there will be a nice OSS AJAX library available that will hide the details, but for right now, there's nothing better than an intimate understanding of the XMLHTTPRequest object.

  44. Re:AJAX? by Civil_Disobedient · · Score: 1

    In a nutshell, AJAX allows the client (your web browser) to talk to the server (whatever site you're browsing) without requiring you to reload the page. It uses JavaScript's XMLHttpRequest object to open a connection, send, and receive data. Generally you either recieve data in a long string of text, or you can use the browser's built-in ability to parse and XML sent over the wire.

  45. No longer tolerating what?? by ben_1432 · · Score: 3, Interesting

    Where's the ajax on slashdot? Are we supposed to be rebelling because it uses the traditional get/post methods instead of the (new name, old technology) "ajax" version?

    Where's the ajax on msn & yahoo .com's? Or on mainstream news sites?

    Ajax is a "web two point oh" buzzword, and 99% of "web two point oh" services/systems aren't going to be a success just because they utilize it.

    I'm not disputing it can be useful and add something to an application, but the hype outweighs the benefit.

    One thing I fear about ajax is the poor standards many developers work to - how long before we see phpbb/phpnuke/et al tearing servers apart because each visitor is suddenly making an extra 10 database queries a minute while previously they'd alt-tab back and hit refresh every few minutes?

    1. Re:No longer tolerating what?? by Run4yourlives · · Score: 1, Informative

      Where's the ajax on slashdot?

      Click on the word "Sections" in the menu....

    2. Re:No longer tolerating what?? by ben_1432 · · Score: 1

      Well I'll be damned. That's the first time I've ever clicked that. I don't think that's enough to qualify this as an "ajax site", though it obviously answers "where's the ajax" heh.

      To really ajax this site web two point oh style you'd have to have it automatically checking for new comments, new posts, alerts or notifications that someone's replied to you, modded a comment etc.

    3. Re:No longer tolerating what?? by Run4yourlives · · Score: 2, Insightful

      To really ajax this site web two point oh style you'd have to have it automatically checking for new comments, new posts, alerts or notifications that someone's replied to you, modded a comment etc.

      No, those things would be useless... AJAX is about improving the user experience, not loading as much crap onto a page that you can, just 'cause.

    4. Re:No longer tolerating what?? by Senzei · · Score: 1
      No, those things would be useless... AJAX is about improving the user experience, not loading as much crap onto a page that you can, just 'cause.

      You obviously do not understand the concept behind web 2.0. It is really intended to take the DoS power away from slashdot and put it more firmly in the hands of a sites' popularity.

      --
      Slashdot: Where anecdotes and generalizations can be freely substituted for facts, logic, or intelligence
  46. Idiots by Anonymous Coward · · Score: 0

    The parent is not funny. Except to people with no life.

  47. Re:AJAX? by Anonymous Coward · · Score: 1, Funny

    Call them "podcasts" for Web 2.0 compliance.

  48. Yuck by Anonymous Coward · · Score: 0

    There just couldn't be room left in the summary for any more marketing hype. Blarf.

    "users have become more advanced"

    Uh, no. Sorry. Please don't try again.

    AC

  49. c++ and javascript? by clsc · · Score: 1
    however I spend 6 hours a day writing code in c++. It isn't pretty but it works.
    I fail to see how Javascript will help you with this, or even teach you "some principles that aren't immediately apparent" ?
  50. Re:AJAX? by PastAustin · · Score: 0
    Too bad it requires JavaScript!


    Yeah! Really! Too bad it uses a common technology most browsers implement!
    Go back to your <blink> tags...

    Ajax is a recent word used to describe a combination of a couple of elements JavaScript (specifically the xmlhttprequest call), XML (used to send organized data that can be easily parsed), and an html page.

    There are a couple of good examples mentioned above.
    --
    Firefox 2.0 - Spell Rightly.
  51. Confused even more by Anonymous Coward · · Score: 0

    I Think ill stick with basic post pages.... this article gave me a headache... Does anyone know/care what all that crap means

    1. Re:Confused even more by Anonymous Coward · · Score: 0

      Yes, some people care.

  52. AJAX Privacy and Security? by WebCowboy · · Score: 4, Interesting

    Forget about the back button...that is an annoyance I've grown to tolerate (for almost a decade we've had to deal with "sticky" web pages). MY biggest concerns centre on SECURITY and PRIVACY.

    One thing about Javascript is that it is very aware of the client's environment--we can use it to determine screen size, colour depth, browser type, browser history and so forth. Until the introduction of the XMLHTTPRequest object, developers were limited in how they could bring this information into the server. It wasn't impossible (you could do stuff with traditional javascript and server-side programming involving hidden input tags, cookies, automatic page submits/reloads, etc), however the user would usually have a visual cue (IE would produce an audible "click" during page submits and redirects by default, the page would blink, the "throbber" icon and status bar would indicate an HTTP request was happening, etc). Furthermore, such schemes were more easily breakable (disablihng cookies, etc).

    Now with AJAX, a coder could write client side script that (for example) enumerates your browser's history and ships it back using the XMLHTTPRequest object. The page does not need to use cookies, install special software like IE "browser helper objects" or need to expose itself through the use of hidden input tags. It's the greatest thing since sliced bread for spyware developers (multi-platform, lightweight, not yet easy to detect). I think javascript is generally better contained than, say, VBS, from a security standpoint, but I still have my concerns.

    Worse yet, there isn't much in the way of user control--a person can disable Javascript entirely but then the whole app breaks. Browsers like Firefox can limit the use of javascript to do popo-up ads, alter toolbars and such, but I see nothing regarding security control of the XMLHTTPRequest object. As far as I can tell, if Javascript is enabled at all, a script can make full use of that object, and it'd be REALLY easy to use it to report my browsing history on a constant basis, without me knowing about it unless I do a lot of sleuthing in source files and cache.

    In any case, I have some questions for "seasoned" AJAX coders (I am well-versed in Javascript but am a neophyte with ful-blown AJAX apps): What do you do to make sure your app is secure from client-side shenanigans (perhaps an AJAX-equivalent to SQL-injection), what can a user do to manage security within your AJAX app, and have you used AJAX techniques for potentially intrusive purposes (sniffing a client's environment in particular)? You can post anonymously if you've had to "do evil" as part of your job if you want ;-)

    (BTW, a competent AJAX developer would at least take measures to disable the back button's functionality, and there are measures that can be taken to handle the back button gracefully. It is mostly a matter of sound design...)

    1. Re:AJAX Privacy and Security? by AKAImBatman · · Score: 2, Informative

      One thing about Javascript is that it is very aware of the client's environment--we can use it to determine screen size, colour depth, browser type, browser history and so forth.

      The browser history is not available for security reasons. Off the top of my head, I don't remember if anything more than the screen resolution can be obtained. Really, you're not getting back anything useful. Just a lot of statistics that the Javascript uses to do its job.

      Until the introduction of the XMLHTTPRequest object, developers were limited in how they could bring this information into the server.

      Hidden IFrames have all the power of XMLHTTPRequest. There is a "click" in Internet Explorer, but all other cues are missing.

      Browsers like Firefox can limit the use of javascript to do popo-up ads, alter toolbars and such, but I see nothing regarding security control of the XMLHTTPRequest object.

      Depends on the browser, but many browsers chose the path provided by Java Applets. i.e. An AJAX application can only ship back data to the server it was downloaded from. That means that the server needs to act as a proxy if it wants to send calls elsewhere on the Internet.

    2. Re:AJAX Privacy and Security? by WebCowboy · · Score: 2, Interesting

      The browser history is not available for security reasons. Off the top of my head, I don't remember if anything more than the screen resolution can be obtained.

      I guess you are right about the history. However you can get more than just the resolution via Javascript. For example, you can still access the history in a limited fashion by using Javascript to create invisible tags with various URLs, then checking their "visited" property and using XMLHTTPRequest to send this back to your server. You can also sniff for browser, OS and IP Address, and do so more reliably than with server-side techniques (parsing the HTTP request). For example, you could under some circumstances get the REAL IP address of a machine (vs. the proxy address reported on the server side).

      Hidden IFrames have all the power of XMLHTTPRequest.

      There is a reason they are deprecated (the iframe tag is not valid strict XHTML). I suspect becasue they are very evil--an even worse kludge than XMLHTTPRequest, and the source of some very serious security holes in IE (and even the source of some grief in Firefox). As you mention, in IE even invisible iframes trigger clicks when they submit data in IE, and furthermore iframes can be disabled by the client user independently of Javascript (that is generally standard practice for me with IE anyways).

      AJAX does have an important redeeming feature in comparison to VBscript in that it is contained within a Javascript "sandbox", however the implementation is inconsistent. Remember that in IE AJAX relies on an ActiveX control, and if there is a security bug in that control it can be exploited via AJAX. How the sandbox is defined is also inconsistent...IE actually (at one point at least) exposed information about LOCAL HARD DRIVES to Javascript!

      The concept behind AJAX is very cool, however I am less than impressed by the implementation. A very important component of AJAX--the XMLHTTPRequest object--is NOT A STANDARD IMPLEMENTATION! It is an idea conceived by the Mozilla team and picked up by others as a de-facto standard..and of course, MS had to be all screwy and come up with their own kludgy way of doing things, naming their object differently and implementing a slightly different model just to be difficult. I think the whole thing should be dropped in favour of the ACTUAL standard (DOM Level 3 "Load and Save" -- a standard released by the W3C nearly two years ago). The W3C standard might look a bit more cumbersome (hey, it fits in with the rest of Javascript and the DOM then) but at least there'd be consistency and some method to the madness.

    3. Re:AJAX Privacy and Security? by larry+bagina · · Score: 1
      There is a "click" in Internet Explorer

      If you have a autostart bgsound which points to a silent wav file, IE will not make the click noise. I wish more people knew this, especially people writing pages which auto reload.

      I was using gmail with IE last week, and it kept reloading/reclicking like twice a minute. I'm thinking, what is this, email or a metronome?

      --
      Do you even lift?

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

    4. Re:AJAX Privacy and Security? by larry+bagina · · Score: 1
      The concept behind AJAX is very cool, however I am less than impressed by the implementation. A very important component of AJAX--the XMLHTTPRequest object--is NOT A STANDARD IMPLEMENTATION! It is an idea conceived by the Mozilla team and picked up by others as a de-facto standard..and of course, MS had to be all screwy and come up with their own kludgy way of doing things, naming their object differently and implementing a slightly different model just to be difficult.

      You need to check your timeline again.

      • Spring 1999: IE 5.0 released. Supports the XMLHTTP Active X Object.
      • Spring 2002: Mozilla 1.0 released. Supports the XMLHTTPRequest Javascript Object, copied from XMLHTTP.
      --
      Do you even lift?

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

    5. Re:AJAX Privacy and Security? by Anonymous Coward · · Score: 0

      There is a reason they are deprecated (the iframe tag is not valid strict XHTML). I suspect becasue they are very evil
      I suspect that it's because the entire frame component was removed from XHTML 1.0-strict to be replaced in XHTML 2.0 with XFrames.

      It is an idea conceived by the Mozilla team and picked up by others as a de-facto standard..and of course, MS had to be all screwy and come up with their own kludgy way of doing things, naming their object differently and implementing a slightly different model just to be difficult.
      MS created it first. Everyone else refused to implement it as an ActiveX object and the Mozilla team developed XMLHTTPRequest to implement the same functionality.

      If you're going to bitch and whine, at least get your facts right.

    6. Re:AJAX Privacy and Security? by aztracker1 · · Score: 1

      The concept behind AJAX is very cool, however I am less than impressed by the implementation. A very important component of AJAX--the XMLHTTPRequest object--is NOT A STANDARD IMPLEMENTATION! It is an idea conceived by the Mozilla team and picked up by others as a de-facto standard..and of course, MS had to be all screwy and come up with their own kludgy way of doing things, naming their object differently and implementing a slightly different model just to be difficult.

      Not sure what you are smoking, but iirc the XmlHttpRequest active-x control was included as far back as IE4 in 1998, long, long, long before the Mozilla Team added it to Gecko/Spidermonkey... Having it as a *native* object is nice, and afaik, MS will have IE7 include it internal to the JS object space.

      As for other security issues, they are *FAR* less dangerous than Flash, or Java (or Active-X in general, though in IE it is using Active-X)... I do think the benefits in this case outweigh the risks.. with the use of XmlHttpRequest, you are limited to the same domain the original page came from. With AJAX techniques + SVG, you get all that flash offers, and probably better performance at some point (not in terms of download size, but in application performance).

      Though, I think that flash is in general over-used, and Java in the browser is all but dead, I would rather have an AJAX interface requiring only my browser, than a billion and one plugins.

      --
      Michael J. Ryan - tracker1.info
  53. Re:AJAX? by twistedcain · · Score: 1

    Does AJAX do anything that Flash can't?

  54. Confusion About Customers by Anonymous Coward · · Score: 0

    There is a common misconception in this thread that needs to be cleared up.

    The website visitors are not customers. The customer is the company buying the ads. The website visitors are the product being sold to the advertisers.

    1. Re:Confusion About Customers by Godeke · · Score: 1

      Since I said that my company is *subscription* based, in what way are they not my customers again? Likewise, treating users as product being sold is probably going to give the wrong focus: if you fail to provide for your users, no matter what you call them, they won't be back, meaning no ad impressions anyway.

      --
      Sig under construction since 1998.
    2. Re:Confusion About Customers by Anonymous Coward · · Score: 0

      The previous AC comment wasn't directed at you in particular, it just placed at the end of the existing discussion thread.

      However, in your case, the customers are your viewers since you don't have advertising. On most sites that are not subscription based, the customers are the advertisers. The customer is the one paying the bills.

      But you do bring up a valid point, that without eyeballs on the site, it will not be in business long, regardless of the business model.

      I do think the point is valid though that if it is advertisement based site, and if the ads are blocked, then the site has no significant business reason to cater to those particular visitors, as they are not contributing the revenue flow. You have to take care of the paying customers first.

  55. Re:AJAX? by gforce811 · · Score: 1

    The acronym actually stands for Asynchronous Java-Script And XML

    ...and I'll recognize that as an honest answer, as long as you weren't trolling with that question.

  56. Echo2 by Mock · · Score: 1

    http://www.nextapp.com/platform/echo2/echo/

    If you want a proper application that handles user and error conditions gracefully, it helps to use a tool that aids good design.

    Echo2 lets you build AJAX applications as if you were writing a swing app.
    No messy html/javascript. You don't even need to know that XMLHttpRequest exists.

    I'm currently in the process of building an AJAX app for a large financial institution and all I can say is thank god I don't have to mess about in javascript to make a nice application.

  57. Re:AJAX? by Kuciwalker · · Score: 0

    It actually works pretty well in Gmail.

  58. Re:AJAX? by Anonymous Coward · · Score: 0

    It won't break your "rich web application" every time they decide to ship a new version or player?

  59. Re:New breed of software crashes ahead by Anonymous Coward · · Score: 0

    sounds like a personal problem!

  60. Re:AJAX? by Anonymous Coward · · Score: 1

    Ajax is also Ontario's First ISO 9001 Quality Community.

    It has a beautiful waterfront.

  61. Re:AJAX? by Anonymous Coward · · Score: 0

    Thanks for the downloads. I'll listen to them later this week.

  62. Re:AJAX? by Compulsion · · Score: 1

    It runs on browsers that don't have the Flash plugin installed.
    No, I'm not being a smartass. It situations where the plugin may not be installed, such as a public terminal, AJAX would work as long as JavaScript was enabled.

    There's a lot of stuff that Flash can do that AJAX can't right now. Animation, specificaly. However, there's been some work put into the CANVAS tag (inc. having one available for IE) that can handle some pretty cool animation stuff without requiring a plugin.

  63. Bunk! by jabber · · Score: 1

    If this line of reasoning, there would be no need for medical malpractice insurance either, because doctors would learn to do things exactly right each and every time early in medical school.

    Fact is, the world is a complicated place. Not only do people, even highly trained professionals, make mistakes from time to time - situations change, often unpredictably, and even the most reasonable and appropriate strategies suddenly become grossly inadequate.

    Software solutions are developed with budgets and schedules in mind, for problem domains that are vastly more complex than those of the toys we write in college. We interface with systems over which we have little or no control. Design specifications, even if they were clear at some point, are often exceeded. Honestly, it's amazing that we do manage a 99% uptime.

    This is of course not an excuse for when things fail. We need to prevent failure, anticipate it and avoid it when possible. We need to handle it gracefully when unavoidable, so that we could learn from the failure and avoid it the next time.

    But the cavalier attitude of saying that writing perfect, flawless and error-free software is something we learn in CS-101 is naive, and condescending to the hundreds of thousands (millions?) of professional software developers all over the world. It's like saying that just because we learned how to make a paper airplane in introductory Physics, we should be expected to design and build jumbo-jets that never crash, use air for fuel, and provide plenty of over-head storage and leg-room for everyone on-board.

    --

    -- What you do today will cost you a day of your life.
  64. What's the difference? by CrazedWalrus · · Score: 1

    I've heard this line of thought more times than I care to remember, and the standard response is that it's possible to write good or bad code in any language.

    I've seen (in school) C++ programs where the "programmer" had named all of their variables after fruits (strawberry, kiwi...), and all of their methods after greek letters (theta, alpha...). Style is style is style. You can't put a bad programmer in front of a c++ compiler and expect their code to be any better than it would have been in perl or python.

    On the other hand, any good programmer can sit down with any language *that they know well* and write beautiful code. The learning process certainly impacts style in the short term, which is why I emphasize this.

    I don't understand this insistence that a compiler somehow makes code better. After all, even the more complex "scripting" languages are basically JIT compiled to some fashion of bytecode these days (read: perl, python, and, I think, ruby, among others). They'll barf at compile-time, as opposed to running until they hit a syntax error, like shell or the old BASICs.

    So, I call "strawman" on the compiler argument, and say that the real problem is bad programmers.

    The whole issue is a lot like this recent hot topic of "free speech." Just because you *can* say something doesn't mean you *should* say it at the first opportunity. A certain consideration must be made. The analogy is a direct one. Human language to computer language. You've been given more power with a scripting language. Use it responsibly. A good programmer will do this, just as a gentleman will consider his words carefully.

    Gentleman == Good programmer

    It's easy.

    1. Re:What's the difference? by AuMatar · · Score: 1

      I agree with your points, except you missed one major difference of compiled languages vs scripting ones- typing. Most compiled languages are typed, most scripting languages are not. This allows some bugs and performance issues to be found at compile time for compiled languages, rather than at run time. This can be both bugs (oops, this function only works on integer input) and performance issues (I had a python program take 12 hours on my box vs 2 on a coworkers. Turns out, he had twice the ram and was able to run in memory, where I was hitting swap because python was treating some fields as strings, rather than integers).

      --
      I still have more fans than freaks. WTF is wrong with you people?
  65. Next Marketing Tool by kibbled_bits · · Score: 1

    There are many applications that could make good use of AJAX, it will just likely become a way to create intrusive advertisements when marketing departments get a hold of it (IE: Popup Windows, Flash, Gifs, etc).

    The other half will consist of developers who just want to put AJAX on their resume and so they over complicate Hello World! apps.

    YAY! :-|
  66. grasping at straws by pyrrho · · Score: 1

    blaming bad links on ajax is sort of desperate.

    --

    -pyrrho

    1. Re:grasping at straws by Anonymous Coward · · Score: 0

      Is Ajax the new hype java was suppose to be?

  67. Been there done that by SmallFurryCreature · · Score: 1
    Well, it works on linux too, with Firefox and IE but not opera.

    It is simple really,

    function Test() {
    while(true)
    setTimeout('Test()', 100);
    }

    The attempt was to get a sleep function going because I wanted to load a very big picture but not have the user wonder why nothing was happening so I wanted to check if the image had loaded (img.complete) and if not display a loading message. Normally you would use a while loop with a sleep() call to just check every so often but javascript does not have such a function.

    Oh just running an empty while loop causes firefox to popup a warning after a second or 2 about the script taking to many resources.

    I figured out how to do it properly but not after first having to killall firefox-bin and shutdown explorer.exe processes. Opera, the one true king, ofcourse had no problem with it.

    Relevant? Maybe, I needed the code because people can't be bothered anymore to just look at the spinning whatever or the status bar to see if a page is still loading you got to put it in the page itself so they do not hit the same request a hundred times thinking this is going to speed up the download.

    Useless javascript but needed if you want your site to be accepted in this day and age.

    --

    MMO Quests are like orgasms:

    You may solo them, I prefer them in a group.

    1. Re:Been there done that by netsharc · · Score: 1
      Actually you can do this with images:
      imgObj = new Image();
      imgObj.onload = imageLoaded;
       
      function imageLoaded() { ... };
      The onload-handler will also be called if you change the SRC. It's practical, but unfortunately the onload event does not fire in Opera.
      --
      What time is it/will be over there? Check with my iPhone app!
    2. Re:Been there done that by NickFitz · · Score: 1

      function Test() {
      while(true)
      setTimeout('Test()', 100);
      }
      The attempt was to get a sleep function going...

      Creating a non-terminating loop is not the way to get a sleep function going in JavaScript. What your code is doing is going round in a loop which never terminates (while(true)), setting timeouts. As JavaScript interpreters are single-threaded, and your loop never exits, the timeouts are never handled - although if they had been, they would have just done the same thing.

      (This single-threading thing seems to catch out a lot of people, for some reason.)

      Just test your condition, and if it's not satisfied, set the timeout and exit. In this case, as the previous poster has pointed out, you would be better off using the image onload event anyway. As a general rule, event-driven code beats timer-based polling every time.

      --
      Using HTML in email is like putting sound effects on your phone calls. Just say <strong>no</strong>.
  68. I'm sorry but... by mumrah · · Score: 1

    Didn't i read all of that when i first learn about XmlHttpRequests from http://developer.apple.com/internet/webcontent/xml httpreq.html The stuff talked about in that article is stuff we've been doing with AJAX here at my office for well over a year. I wonder who's sleeping with the /. mods to get this sort of dated material up here. -David

  69. Bah! by Anonymous Coward · · Score: 0

    This push to create "enterprise applications" in AJAX is non-starter. You simply cannot create a robust application that can handle errors gracefully, is cross-platform, and scales well when you base it on HTTP, run it in an untrusted-browser environment, require client-side polling, and all within a language that lacks a reasonable standard library.
    There are reasons CORBA quietly died, agent-based computing hasn't made any progress in industry, and open RPC-systems quickly disappeared; and it wasn't because they lacked twelve months of blogger hype.

  70. Re:AJAX? by pete6677 · · Score: 2, Funny

    It's that stuff you clean your bathtub with.

  71. Re:AJAX? by Anonymous Coward · · Score: 0

    I was born and raised there and lived mere steps from the waterfront. Let me tell you: it was not beautiful. It was mostly a construction dumping ground populated by gulls and garbage. It's only redeeming value is that it provided at least one direction to look which was not interupted by Ajax's only other distinguishing feature: an abundance of coffee shops, strip malls, and seniors' homes. Seriously, if there isn't a coffee shop on a street corner, there's a seniors' home. I remember one strip mall that had two drivethru coffee shops in the parking lot alone. Another coffee shop or two inside the mall, with one across the street in the another strip mall.

  72. ObRoR by Trejkaz · · Score: 1

    At times like these, it's nice to know that Ruby on Rails' AJAX helper functions already handle neat things like scripting actions on errors or sending errors to a different DOM element.

    --
    Karma: It's all a bunch of tree-huggin' hippy crap!
  73. 1% is a lot - unless 2% or more is acceptable by Foolicious · · Score: 1

    It depends on the business. If you're selling trailer hitches to people in the US and Canada, you can get away with having "downtime" in the middle of the night because -- as much as everyone says, "you'd be surprised at how many people buy trailer hitches at 3 AM" -- the core of your business is most definitely done between 6:00 AM and 10:00 PM. This raises the question then -- what specifically is downtime. Planned? Unplanned? Etc. etc.

    --
    Please don't use "umm" or "err" or "erm".
  74. Re:AJAX? by Anonymous Coward · · Score: 0

    Well-formed (X)HTML would be considered a subset of XML.

  75. That does it! AJAX officially==bullshit! by Hosiah · · Score: 1
    Nothing that was ever worth anything to anybody was ever covered with every single stinking article about it starting off: "The web is no longer a place..." | "Programmers no longer have to..." | "Computer applications used to..." | "In the old days of the web, applications..." | "The old way of managing interactive content..." | "Now there's a new way to..." | "Is everything we know about web programming about to become..." | "Computer scientists the world over have voluntarily turned themselves in for deactivation due to the overwhealming outdatedness of..." | "Everything you thought you knew about the Universe just changed because of..." God, where's the dopey techno-newage music and the third-world natives in jumpsuits dancing around with scarves on a breezy hilltop? Where's the voice-over: "What can a peanut-butter enema teach us about portfolio investment?" Where's the tagline at the end "...and the company who will bring it to you; AT&T" over glossy images of astronauts in freefall playing zero-G roller-derby? Where's the radioactive butterfly going in people's bedroom windows with the voice-over "Ask you doctor if AJAX is right for you!" The first five times I heard it, it was interresting. The next ten times I heard it, it got irritating. It's been another fifty times I've heard it and now I think there's an inherent security risk in it, because my AAAAIIIIIEEEE my AJAX buffer just overflowed!

    *pant* *pant* *heave*

    1. Re:That does it! AJAX officially==bullshit! by adamruck · · Score: 1

      Nothing that was ever worth anything to anybody was ever ...

      written without using the enter key?

      --
      Selling software wont make you money, selling a service will.
    2. Re:That does it! AJAX officially==bullshit! by Hosiah · · Score: 1
      written without using the enter key?

      It enhances the single-volley rant effect, as if the entire paragraph were barked in a single breath. Hence the panting afterwards.

  76. Re:AJAX? by Anonymous Coward · · Score: 0

    prevent back button havoc : document.request.replace('empty.html')

  77. Re:AJAX? by Anonymous Coward · · Score: 0

    xhtml IS html presented as xml... and you can still use AJAX without touching XML.

  78. because today's capitalism blows by Anonymous Coward · · Score: 0

    "from a business standpoint it isn't optimal"

    That's only because business is built on greed instead of honest exchange of value. In the long run it is much better to build your business to be sustainable, but hardly any big corp now does this, they rely on being pirates and crooks more, ie, "greed".. Quick and dirty leads to quick and dirty results, which always in hindsight look retarded, because they are. What's wrong with learning from past mistakes in economics?

    Oh wait, we can't, we have a greed based economy! Not fair exchange and honest effort, it's how much you can squeeze out SHORT TERM.

    Mostly because most businesses are tied to two incredibly stupid functions. They must show increases every quarter or they are doing something "wrong". A simple maintenance of a reasonable profit level isn't enough, it must always *increase*. Do the math big business, this isn't possible, it's called market saturation. The second is shareholder pressure, which is tied to the "something for nothing" principle of wealth accumulation. Again, not possible in the long run, it leads to overly speculative markets,based on the lie, the con, the dodge, the shill and the bribe, leading to severe and prolonged crashes, after the inevitable bubble build up, from more or less totally insane stock prices that have no basis in any conceivable reality as to true worth. When a business or market is about to crash, you see a few things, cuts in R&D,it becomes top heavy in management and sales,and then you'll see legislative pressure for "relief". In the software world you will keep seeing this, precisely because they demanded and got all the perqs, including *patents*, with no corresponding check/balance, which is normal warranties. IF the company had to provide a warranty,legally, you WOULD see more attention made to a longer term view and better coding practices. And IF we had a more regulated market that helped eliminate speculation, such as time limits for holding shares before sales, eliminating bundling and most hedging, and increasing thresholds for divestiture, etc, along similar lines, you wouldn't see as much pressure for "this quarter's profits".

  79. Have they fixed the back button? by Spy+Hunter · · Score: 1

    Yes. As a bonus it also fixes bookmarking and deep linking, automatically. The key is to store any changing page state data in the URL itself using the hash portion, which you can change without causing a page reload.

    --
    main(c,r){for(r=32;r;) printf(++c>31?c=!r--,"\n":c<r?" ":~c&r?" `":" #");}
  80. Unproven statement by magerquark.de · · Score: 1

    I really do hate it when people try to convince me with their opinion by creating random, totally unproven statements like:

    "The Web is no longer a place where simple applications are tolerated"

    And omitting any example or proof about why they think that they are right.

    --
    -- Watch me working: www.magerquark.de
  81. Pretty much what you would expect by Anonymous Coward · · Score: 0

    Unfortunately my answers are pretty boring, but...

    What can a user do to manage security within your AJAX app?

    The browser gets an encrypted authentication cookie that contains your login credentials and an expiration time. When your credential expires, you are prompted to log in again. Such a system is vulnerable to sniffing, in which case you would be exposed until the credential expires. (If we were being good, we would only communicate over HTTPS, but we don't.)

    What do you do to make sure your app is secure from client-side shenanigans (perhaps an AJAX-equivalent to SQL-injection)?

    It's pretty straightforward: never trust any data the server receives; always assume it could be malicious, malformatted, corrupt, etc. Sanity-check and escape all values, whether received via POST, XML post, or query string. If anything is fishy, blow an exception. If you forget to check or escape a value, it's a potential security hole (yeah... we frequently forget to check them. Perl has a concept of 'taint' flags for data... ISAPI doesn't though, that I know of. We should probably roll our own!)

    Have you used AJAX techniques for potentially intrusive purposes?

    No, that would be gauche. Our users pay us, we don't want to risk annoying them! :)

  82. IBM and the Dojo-Toolkit by wysiwia · · Score: 0

    Does nobody know that IBM also uses the Dojo-Toolkit, see http://www-03.ibm.com/press/us/en/pressrelease/191 87.wss?

    --
    See http://wyoguide.sf.net/papers/Cross-platform.html
  83. Get in touch with frameworks.. by robertosmix · · Score: 1

    It is hard to handle all these important points by just writing JavaScript manually.. For big projects, i recommend not to use AJAX or use a safety and stabilitiy proven AJAX framework.

    After all you won't get angry with yourself.. :)

  84. Re:AJAX? by soliptic · · Score: 1

    Degrades gracefully.

  85. Frameworks are useless client-side by Nurgled · · Score: 1

    JavaScript lacks a good mechanism for dealing with libraries. This means that these so-called frameworks are really just a big mass of .js files which must be included into the source HTML document. Everyone ends up making their own local copies of these libraries because there is no secure way to transparently install these components in browsers for several sites to share. Consequently what you get from using one of these "frameworks" is a lot of extra cruft in your application or, if you're being conservative, your own home-rolled subset of the framework containing just the bits you're using.

    So what do I want? I want some way to load, in the script itself rather than in the HTML document, a library written by someone else. I want to reference this library from its developer without having to mirror it. I want a mechanism where the browser can go off and fetch the library if it doesn't already exist, and the ability to import that module into any JavaScript object I want rather than polluting the global namespace. For all this to work without causing major problems, JavaScript's security model needs to be overhauled so that including someone else's library doesn't surrender my entire site to the library author.

    Sure, I'm asking for a lot, but until something resembling the above is available we're not going to see many good "frameworks" for doing this kind of stuff, and lots of web developers will resist using them even where they do exist purely because it's far more efficient to just re-implement the little bits of framework you want than to pull in a gargantuan set of libraries just to call one function.

    1. Re:Frameworks are useless client-side by NutscrapeSucks · · Score: 1

      So, you want to use someone's library, but you want no responsiblity for how it works, and you don't even want to host it. Why stop there? Why not demand that someone provide an entire application for you that you can pull under your domain name?

      FWIW, there is a way to write JS libraries that are automatically fetched and stay in their own namespace, but it's specific to IE & Windows.

      --
      Whenever I hear the word 'Innovation', I reach for my pistol.
    2. Re:Frameworks are useless client-side by Nurgled · · Score: 1

      I don't have to host the XMLHttpRequest library, so clearly it's okay for some libraries to be kept resident in the browser. Another alternative that would make things nicer is to precompile and link the scripts on the server so that only the required elements from the framework need to be sent to the client and the client browser just sees an opaque hunk of code that all appears to be one script. Of course, once you go down that road you might as well compile to a lower-level representation on the server, since there's no point in doing the parse and compile step both on the server and the client.

  86. what you say in theory by pyrrho · · Score: 1

    I do get your point (I've read the Mythical Man Month a couple time... excellent recommendation).

    What I think you are forgeting in practice is that what people usually do with software flaws is live with them...

    And this the hard reality of a lot of coding, they are not committing to top notch software. They don't incur those costs they just put up with the crap... and if was delivered "working" (aka "running") in the first place, it'll still be running.

    people don't have the fund up front and then don't have them later either.

    --

    -pyrrho