Advanced Requests and Responses in Ajax 209
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."
CS101 (Score:4, Insightful)
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.
nothing too new (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!
Good for Them (Score:3, Insightful)
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.
Users.. (Score:5, Insightful)
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
As for managers being fired for an application being unavailable 1% of the time
Re:Unfortunately... (Score:5, Insightful)
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.
Re:CS101 (Score:2, Insightful)
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.
Re:Unfortunately... (Score:3, Insightful)
the web IS such a place! (Score:3, Insightful)
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.
Re:Unfortunately... (Score:5, Insightful)
simple != intolerable (Score:5, Insightful)
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.
Re:Users.. (Score:3, Insightful)
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.
Re:simple != intolerable (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.
Re:AJAX? (Score:3, Insightful)
Re:Unfortunately... (Score:5, Insightful)
Re:CS101 (Score:4, Insightful)
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.
Re:The Web is no longer... (Score:3, Insightful)
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
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
Re:No longer tolerating what?? (Score:2, Insightful)
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.
Re:Unfortunately... (Score:2, Insightful)
Re:Unfortunately... (Score:3, Insightful)
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.