473,698 Members | 2,601 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Contradiction of Advice?


They say not to use JavaScript for important things, but doesn't that
mean relegating JavaScript usage to frivolous effects?

It's said to consider whether it's truly necessary to use JavaScript,
whether some non-script way is available for achieving the same
result. On the one hand, good practice dictates that a site degrade
gracefully where JavaScript is concerned...but on the other, that
means that JavaScript will be used only for non-critical effects.

And speaking of effects, isn't that what JavaScript is all about --
behavior, which means actions that produce certain effects??

Jun 27 '08 #1
16 1116
Prisoner at War wrote:
They say not to use JavaScript for important things, but doesn't that
mean relegating JavaScript usage to frivolous effects?
It would be better to say "Don't depend on JavaScript for essential things".

Create something that works without JavaScript (even if it is slow and
clumky), and then layer scripting on top to improve the usability (removing
the clunkyness for users who's client support the the JS).
--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/
Jun 27 '08 #2
Prisoner at War escribió:
They say not to use JavaScript for important things, but doesn't that
mean relegating JavaScript usage to frivolous effects?
I'd say the advice is: don't risk breaking basic functionality by using
superfluous JavaScript.

Example: I'm tired of sites that replace regular links with stuff like
<a href="javascrip t:makeLink('/pages/products.php?id =666')"></aand
manage to break:

- Search engines
- Open link in new tab
- Save target as
- Copy link location
- Bookmark link

.... while providing no new functionality at all. Not to mention forms
you can't submit because they have no submit button or URL and there's a
JavaScript error on the page.

--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor al baño María: http://www.demogracia.com
--
Jun 27 '08 #3
On Wed, 14 May 2008 19:21:01 -0700, Prisoner at War wrote:
[...]
On the one hand, good practice dictates that a site degrade
gracefully where JavaScript is concerned...but on the other, that
means that JavaScript will be used only for non-critical effects.
Exactly. At least if you care for your users (including screenreaders,
braille keyboards, firewalled browsers with filtered JS, and all those
people who intentionally disable JS for security reasons) you'll want
to use JS (if at all) only to _enhance_ the usuablity of your page(s).
And speaking of effects, isn't that what JavaScript is all about --
behavior, which means actions that produce certain effects??
Sure. But that's an "addon" not a replacement for something that works
very well w/o JS (like links or forms). And a nice behaviour (e.g.
for supporting form input and validating it) is definitely no ersatz
(replacement) for server side validation. Only too often the behaviour
is more like infantilizing than helpful.
--
Matthias
/"\
\ / ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
X - AGAINST M$ ATTACHMENTS
/ \
Jun 27 '08 #4
On 05/15/08 01:06 am, Álvaro G. Vicario wrote:
Prisoner at War escribió:
>They say not to use JavaScript for important things, but doesn't that
mean relegating JavaScript usage to frivolous effects?

I'd say the advice is: don't risk breaking basic functionality by using
superfluous JavaScript.

Example: I'm tired of sites that replace regular links with stuff like
<a href="javascrip t:makeLink('/pages/products.php?id =666')"></aand
manage to break:

- Search engines
- Open link in new tab
- Save target as
- Copy link location
- Bookmark link

... while providing no new functionality at all. Not to mention forms
you can't submit because they have no submit button or URL and there's a
JavaScript error on the page.
An example of such a problem is <www.instantssl .com>. Using Seamonkey
v1.1.9 I cannot log onto the site because the *required* Javascript
functions crash. I reported this a week ago; it is not fixed yet.
Think about how your visitors feel about your site with all the whizbang
JS effects that prevent them from doing anything useful. Like following
links, or logging in.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jun 27 '08 #5
In comp.lang.javas cript message <g0**********@r egistered.motza rella.org>
, Thu, 15 May 2008 07:44:24, David Dorward <do*****@yahoo. composted:
>Prisoner at War wrote:
>They say not to use JavaScript for important things, but doesn't that
mean relegating JavaScript usage to frivolous effects?

It would be better to say "Don't depend on JavaScript for essential things".

Create something that works without JavaScript (even if it is slow and
clumky), and then layer scripting on top to improve the usability (removing
the clunkyness for users who's client support the the JS).
Rather simplistic; perhaps your experience is limited to the commercial
world. & YGCIB.

A business wishing to attract as much trade as possible by the use of
the Web ought to ensure that the Web experience that they offer to those
who do not run JavaScript is good enough for their purpose, and free of
visible deficiency caused to script not running. If it is felt that
customers may be impressed by "decorative " features, then JavaScript is
one way of adding such; and it might also be used to add real value to
the web site. And that is, of course, the most common case.

But a business that wants some more trade but is limited in what it can
handle may not need to ensure that all visitors to the site receive the
full marketing blast.
Outside (and inside) commerce, JavaScript can also be used to provide
sandboxed computational facilities, and for the public derivation and
demonstration of algorithms.

There is no justification for limiting what is done with JavaScript
merely because some people, some of the time, do not run it.

If a site is significantly better with JavaScript, those without it
should be politely informed that they could do better by enabling it or
by going to a system which does have it.

--
(c) John Stockton, nr London, UK. ?@merlyn.demon. co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demo n.co.uk/- FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "" (SonOfRFC1036)
Jun 27 '08 #6
On May 15, 2:44 am, David Dorward <dorw...@yahoo. comwrote:
>

It would be better to say "Don't depend on JavaScript for essential things".
Yes, which suggests that JavaScript is relegated for non-essential
things...which seems a high cost-benefit ratio...said "cost" being the
time it takes to learn JavaScript...I mean, learning "programmin g
lite" to do non-essential things??
Create something that works without JavaScript (even if it is slow and
clumky), and then layer scripting on top to improve the usability (removing
the clunkyness for users who's client support the the JS).
Sorry, but to what "clunkiness " are you referring?? How does
JavaScript improve webpage clunkiness, whatever that is???
--
David Dorwardhttp://dorward.me.uk/http://blog.dorward.me .uk/
Jun 27 '08 #7
On May 15, 5:36 am, Matthias Watermann <li...@mwat.dew rote:
>

Exactly. At least if you care for your users (including screenreaders,
braille keyboards, firewalled browsers with filtered JS, and all those
people who intentionally disable JS for security reasons) you'll want
to use JS (if at all) only to _enhance_ the usuablity of your page(s).
So would this be an example of "enhanced usability"...a site that
sells bras...it can have a good old-fashioned size-chart, and it can
provide a JavaScript bra-size calculator for those whose JavaScript is
enabled...is that it? Is that what the role of JavaScript is: a
fancier way of doing something that's already possible and perfectly
fine??

Seems to me that there is a necessary tension between the "promise" of
a technology like JavaScript and the dictum to, practically speaking,
not use it too much too extensively....
Sure. But that's an "addon" not a replacement for something that works
very well w/o JS (like links or forms). And a nice behaviour (e.g.
for supporting form input and validating it) is definitely no ersatz
(replacement) for server side validation. Only too often the behaviour
is more like infantilizing than helpful.
Infantilizing?? I wonder what you mean. I'm not sure that I've ever
come across a site that used JavaScript to replace good old-fashioned
HTML links and forms....
--
Matthias
/"\
\ / ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
X - AGAINST M$ ATTACHMENTS
/ \
Jun 27 '08 #8
Prisoner at War wrote:
On May 15, 2:44 am, David Dorward <dorw...@yahoo. comwrote:
>Create something that works without JavaScript (even if it is slow and
clumky), and then layer scripting on top to improve the usability
(removing the clunkyness for users who's client support the the JS).

Sorry, but to what "clunkiness " are you referring?? How does
JavaScript improve webpage clunkiness, whatever that is???
For example.

A form allows the user to enter a number. The user enters a letter by
mistake, submits the form, the server side script catches the error, and
returns a page containing a prepopulated form to the user along with an
error message.

This takes some time.

Add JavaScript...

If the browser doesn't support the JS, then the above scenario still plays
out. If the browser does support it, the data is tested on the browser, and
the user is alerted to the problem without the round trip to the server.

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/
Jun 27 '08 #9
VK <sc**********@y ahoo.comwrites:
Just a few samples of well known Web 2.0 services that came first to
Please explain what "Web 2.0" means :)
It's marketing speech for "newer and better than the rest, but we
can't say how".

If Web 2.0 has any meaning, it's about user generated content.
Scripting is not necessary for that.
my mind and visited with Javascript disabled:
http://www.geocities.com/schools_ring/tmp/facebook.png
http://www.geocities.com/schools_ring/tmp/gmail.png
http://www.geocities.com/schools_rin...oogle_docs.png
http://www.geocities.com/schools_ring/tmp/youtube.png
Google Docs is an application more than it is a web-page.
It does need scripting to work, because it performs client-side
calculations. It would be incredibly awkward without scripting.

GMail uses scripting to immitate an application, but doesn't really
need it for anything but extra bells and whistles. It has a fallback
for script-disabled browsers, and works adequatly with Javascript
disabled (better than most other web-mails I have seen).

Youtube shouldn't need scripting at all for what it does (but it does
apparently use it to start the flash player). I wish it did use AJAX,
so I could page through comments without interrupting the movie.

I don't know what facebook does, but I guess most of its essential
features would work fine without scripting.

Of these, only YouTube and Facebook are what I would consider Web 2.0
applications (as much as it makes sense at all).

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.'
Jun 27 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

75
6161
by: Howard Nease | last post by:
Hello, everyone. I would appreciate any advice that someone could give me on my future career path. Here is my situation: I am a bright Junior in a very well-respected private high school, taking almost all AP and accelerated classes. I am HIGHLY interested in technology, more specifically the field of Computer Science and software engineering. I have heard a whole lot about the fact that the market for software engineers nowadays is...
1
1850
by: Abelardo Vacca | last post by:
Hello, I am currently in the process of switching our application to a N-Tier model with .NET. One of the aspects we want ot get right from the start not to worry about it after is the Exception management. I have read two MSDN documents that appear to be in contradiction, and I would like to know if someone can explain to me which of the two is the
11
4744
by: ma740988 | last post by:
I'm perusing a slide with roughly 12 bullets spread across 3 pages. Each bullet reflects 'advice'. I'm ok with all but 1 bullet, more specifically the bullet that states: " Avoid the STL unless absolutely necessary " Now, I'm not acclimated with much C++ history, but something tells me this is akin to trepidation that surrounded C++ during it's inception? IOW, is this 'old school' rhetoric or ..... How do you refute this argument?
6
1795
by: J Rieggle | last post by:
Hi there, I am stuck on a problem that relates to eCommerce sites, but isnt ASP.NET specific (sorry). The ecommerce site is working in the UK, and products will be sold in pounds stirling. However, should I be presenting the currency figure in the currency of the visitor? I want to keep the site simple to begin with, so if I choose to render localized currencies, I probably need to something similar with the content too. I was...
12
2112
by: Joe Abou Jaoude | last post by:
hi, I have a component that uses a database connection. In the finalizer I dispose the connection because I read in msdn the following: "A type must implement Finalize when it uses unmanaged resources such as file handles or database connections that must be released when the managed object that uses them is reclaimed."
13
3107
by: Alan Silver | last post by:
Hello, MSDN (amongst other places) is full of helpful advice on ways to do data access, but they all seem geared to wards enterprise applications. Maybe I'm in a minority, but I don't have those sorts of clients. Mine are all small businesses whose sites will never reach those sorts of scales. I deal with businesses whose sites get maybe a few hundred visitors per day (some not even that much) and get no more than ten orders per day....
7
2053
by: John Paul | last post by:
I'm thinking of building an e-commerce site in php. Anyone got any advice in building one? What is the best way to implement a payment system? Are any legal issues involved? Thanks,
3
1877
by: mesut | last post by:
Hi colleagues, I need your advice... I have approx 1,5 years experience with ASP.NET/VB.NET 2005 and I have to switch over into C# 2005 language. I don't have experience with C# 2005 language. (but 10 years experience in mainframe languagues). My question is: I need a good book can someone advice it? I'm only interested in ASP.NET not in windows pages.
3
2010
by: Scott M. | last post by:
Scenario: ASP .NET 2.0 Web "Site" All but one page is written using inline VB .NET code. One page is written using VB .NET code-behind. MSBuild options are set at the default (allow pages to be updateable) When I "publish" the site and take a look at the precompiled folder that is generated by this process, I see a /bin folder has been created with one file in it "App_Web_pccpykfu.dll".
0
8683
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8611
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9170
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8904
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7741
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6531
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5867
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.