Contradiction of Advice?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Prisoner at War

    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??

  • David Dorward

    #2
    Re: Contradiction of Advice?

    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
    David Dorward's mostly neglected blog

    David Dorward's mostly neglected blog

    Comment

    • =?ISO-8859-1?Q?=22=C1lvaro_G=2E_Vicario=22?=

      #3
      Re: Contradiction of Advice?

      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
      --

      Comment

      • Matthias Watermann

        #4
        Re: Contradiction of Advice?

        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
        / \

        Comment

        • Jim Moe

          #5
          Re: Contradiction of Advice?

          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)

          Comment

          • Dr J R Stockton

            #6
            Re: Contradiction of Advice?

            In comp.lang.javas cript message <g0gm48$isd$2@r egistered.motza rella.org>
            , Thu, 15 May 2008 07:44:24, David Dorward <dorward@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)

            Comment

            • Prisoner at War

              #7
              Re: Contradiction of Advice?

              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/

              Comment

              • Prisoner at War

                #8
                Re: Contradiction of Advice?

                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
                / \

                Comment

                • David Dorward

                  #9
                  Re: Contradiction of Advice?

                  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
                  David Dorward's mostly neglected blog

                  David Dorward's mostly neglected blog

                  Comment

                  • Lasse Reichstein Nielsen

                    #10
                    Re: Contradiction of Advice?

                    VK <schools_ring@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:
                    Latest news coverage, email, free stock quotes, live scores and video are just the beginning. Discover more every day at Yahoo!

                    Latest news coverage, email, free stock quotes, live scores and video are just the beginning. Discover more every day at Yahoo!

                    Latest news coverage, email, free stock quotes, live scores and video are just the beginning. Discover more every day at Yahoo!

                    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 - lrn@hotpop.com
                    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
                    'Faith without judgement merely degrades the spirit divine.'

                    Comment

                    • Rich Grise

                      #11
                      Re: Contradiction of Advice?

                      On Thu, 15 May 2008 11:36:27 +0200, Matthias Watermann wrote:
                      ....
                      Only too often the behaviour
                      is more like infantilizing than helpful.
                      You're talking about Vista, right? ;-)

                      Cheers!
                      Rich

                      Comment

                      • Matthias Watermann

                        #12
                        Re: Contradiction of Advice?

                        On Wed, 21 May 2008 18:47:47 +0000, Rich Grise wrote:
                        On Thu, 15 May 2008 11:36:27 +0200, Matthias Watermann wrote:
                        ...
                        > Only too often the behaviour
                        >is more like infantilizing than helpful.
                        >
                        You're talking about Vista, right? ;-)
                        Well, I'm unable to confirm or deny that as I abandoned that family of
                        socalled operating systems about fifteen years ago. The real problem
                        with those software products is that meanwhile a lot of people grew up
                        under the impression that what they see and are forced to do with
                        WinDOS boxes is the true or natural thing to do. Just a tiny example:
                        Does anybody think about the TAB character nowadays? It's a character,
                        in fact, but over the years it became a navigational key instead (like
                        the arrow keys). - Hmm, that may be off-topic, but at least it's one
                        incarnation of the problem we were discussing in this thread: That
                        people should _think_ about what they're doing instead of just barking
                        with the pack.


                        --
                        Matthias
                        /"\
                        \ / ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
                        X - AGAINST M$ ATTACHMENTS
                        / \

                        Comment

                        • Lasse Reichstein Nielsen

                          #13
                          Re: Contradiction of Advice?

                          Matthias Watermann <lists@mwat.dew rites:
                          Just a tiny example:
                          Does anybody think about the TAB character nowadays? It's a character,
                          in fact, but over the years it became a navigational key instead (like
                          the arrow keys).
                          I really, really wish they would do away with the TAB "character"
                          completely. It never causes anything but problems anyway.
                          Langauges with significant whitespace, which I approve of on the
                          theoretical level, are darn near unusable in a generic editor
                          that might, or might not, use both tabs and spaces.

                          TAB isn't a character as such, it's a "control character", aka. a
                          control *code*, not really a character. A byte value sent to a line
                          printer that represented an action (like carrige return and line
                          feed).

                          We still have both carrige return and linefeed (although we only
                          really need one in practice: newline), and we still have tab,
                          which we don't need at all for text.

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

                          Comment

                          • Rich Grise

                            #14
                            Re: Contradiction of Advice?

                            On Thu, 22 May 2008 11:46:47 +0100, Dr J R Stockton wrote:
                            Therefore, your "contributi on" is devoid of value.
                            So, do you have a worthwhile replacement, or is bitching the best
                            that you can come up with?

                            And I still maintain that telling your customers "You have to change YOUR
                            equipment to see our site" is a really, really stupid thing to do, if your
                            intent is to attract customers.

                            Thanks,
                            Rich

                            Comment

                            • Dr J R Stockton

                              #15
                              Re: Contradiction of Advice?

                              In comp.lang.javas cript message <pan.2008.05.22 .19.45.00.68130 @example.n
                              et>, Thu, 22 May 2008 19:45:01, Rich Grise <rich@example.n etposted:
                              >On Thu, 22 May 2008 11:46:47 +0100, Dr J R Stockton wrote:
                              >
                              >Therefore, your "contributi on" is devoid of value.
                              >
                              >So, do you have a worthwhile replacement, or is bitching the best
                              >that you can come up with?
                              It seems to be the appropriate response for the foolish article that you
                              wrote. If you don't like to have your articles criticised, the minimum
                              requirement is to write sensible ones.
                              >And I still maintain that telling your customers "You have to change YOUR
                              >equipment to see our site" is a really, really stupid thing to do, if your
                              >intent is to attract customers.
                              That is, of course, not what I wrote.

                              As it happens, I was just reading the source of a NASA News Release. It
                              contains "Your browser or your browser's settings are not supported. To
                              get the best experience possible, please download a compatible browser.
                              If you know your browser is up to date, you should check to ensure that
                              javascript is enabled."



                              The page is <http://www.nasa.gov/home/hqnews/2008...8133_Shuttle_t
                              arget_dates.htm l>; it's amusing to read its code to see just what it
                              contains. It has 'CONTENT="2008-05-22"' indicating that even a USG
                              Agency sometimes used a sensible numeric date format. It uses
                              navigator.appNa me, navigator.appVe rsion, navigator.userA gent.

                              It's a good idea to read the newsgroup c.l.j and its FAQ. See below.

                              --
                              (c) John Stockton, nr London UK. ?@merlyn.demon. co.uk IE7 FF2 Op9 Sf3
                              news:comp.lang. javascript FAQ <URL:http://www.jibbering.c om/faq/index.html>.
                              <URL:http://www.merlyn.demo n.co.uk/js-index.htmjscr maths, dates, sources.
                              <URL:http://www.merlyn.demo n.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.

                              Comment

                              Working...