Re: pros and cons of Ajax
On 27-11-2010 11:48, Tom Anderson wrote:
On Sat, 27 Nov 2010, Arne Vajh?j wrote:
On 27-11-2010 11:02, Roedy Green wrote:
I detest javascript since so often web pages don't work in some
browsers because of JavaScript problems. It is like building your
house on sand.
Good dynamic sites provide a fallback to static HTML, so that even with
javascript switched off, they work. For example, if you use javascript
to submit a form when an option is picked from a select, then you leave
a submit button in there too, for the javascriptless to click. With a
touch of the right JS and CSS, you can then hide that submit button for
people who do have javascript if you like. Similarly, an AJAXy
add-to-cart button on a shopping site can have a normal form-submitting
action too, with javascript inhibiting it if it's able to handle the
operation via AJAX.
Browsers not supporting JS or users turning JS off are so rare
today that it is becoming less and less relevant to handle
non-JS situation.
However, there must be some offsetting benefits that make people put
up with that show stopper. What are they?
All modern browsers support JavaScript without having the users to
install a plugin.
And today it would be rather silly to write all JS from scratch. You
find a good JS framework and build on that. Then a good deal of the
browser specific problems are already covered.
If you've got any sense, yes. There are people with no sense. For
instance, try getting the 'show all plans' link to work in Chrome on
Linux here:
http://shop.vodafone.co.uk/shop/mobile-price-plans/all-plans?initialFilters=flt_18monthplans
The problem is with badly-done javascript (nonportable, lacking in
fallback behaviour, or just plain broken). The existence of bad
javascript is not a reason to ban javascript, but i can understand that
it is a source of resentment towards javascript for end users.
Especially, as on that site, where it adds no value - the link in
question there could be a perfectly normal HTML a element which sends a
perfectly normal HTTP request. Mind you, that site was evidently
implemented by people who can't even make the 'showing n plans' text get
the count right, so they're evidently a particularly special breed.
There are no technology that a sufficient incompetent programmer
can not use to create a mess.
Arne