Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 4 123 ... LastLast
Results 1 to 15 of 50
  1. #1
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,079
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts

    Philosophizing about the use of JavaScript on a website

    Quote Originally Posted by bullant View Post
    I'm glad you have finally come round to my and other peoples' way of thinking because in the past when I have suggested users do something server side to avoid a plan B for javascript disabled browsers you reply saying javascript is disabled in only a tiny minority of browsers and that your position is that javascript is a "must have" for web functionality nowadays (or words to that effect).
    In fact I quite often agree with you - although not necessarly without qualification. Your expertise as a coder is plain to see. But you often see fit to express yourself in a disagreeable, quarrelsome, snide, supercilious, self-satisfied and generally unpleasant manner, so your comments do not generate the respect they might otherwise deserve. You seem to delight in going out of your way to create friction and antagonism. As I have said before, you are not liked, so you are not respected, and as you are not respected your postings and opinions are not seen as valuable.

    The reason why it might well be better to do something server-side is not, in my opinion, anything to do with Javascript-disabled browsers. It is simply which method is most efficient and secure. In this situation you are right to say that server-side is to be preferred. But Javascript is much more than "bells and whistles" and these days is completely essential, not optional, for web functionality.

    As VIP Stephan has pointed out, the OP said "I didn't write this script and I'm not a JavaScript expert, so I don't know how to edit it properly. I want to change it's function from sorting to filtering, i.e. something along the lines of a slice function. " So there is no point in whickering on about your preference for server-side scripting. You might as well suggest that the OP writes it in Klingon.
    Last edited by Philip M; 06-22-2011 at 09:49 AM.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,700
    Thanks
    6
    Thanked 1,011 Times in 984 Posts
    Quote Originally Posted by Philip M View Post
    But Javascript is […] completely essential, not optional, for web functionality.
    I couldn’t disagree more with you here but let’s not get too off topic. From now on please help the OP or shut up (in this thread, I mean).

  • #3
    Banned
    Join Date
    Feb 2011
    Posts
    2,699
    Thanks
    13
    Thanked 395 Times in 395 Posts
    Quote Originally Posted by Philip M View Post
    But you often see fit to express yourself in a disagreeable, quarrelsome, snide, supercilious, self-satisfied and generally unpleasant manner, so your comments do not generate the respect they might otherwise deserve. You seem to delight in going out of your way to create friction and antagonism. As I have said before, you are not liked, so you are not respected, and as you are not respected your postings and opinions are not seen as valuable.
    In my experience including other websites I post on, the overwhelming majority of feedback I am getting is positive and totally contrary to yours.

    I guess with a 15.26% "thank you ratio" (338/2215) fwiw, I must be doing something right and I can't be all bad

  • #4
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,079
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    Quote Originally Posted by bullant View Post
    In my experience including other websites I post on, the overwhelming majority of feedback I am getting is positive and totally contrary to yours.

    I guess with a 15.26% "thank you ratio" (338/2215) fwiw, I must be doing something right and I can't be all bad
    As I said, "Your expertise as a coder is plain to see." It is your bad attitude which I and others detest. You ought to study Dale Carnegie.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #5
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,079
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    Quote Originally Posted by VIPStephan View Post
    I couldn’t disagree more with you here...
    Sorry, I just do not understand you. Many sites these days use not just plain Javascript but frameworks such as jQuery and mootools as well. How can a user experience these if he has disabled Javascript? Please explain your reasoning to me.......

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #6
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,373
    Thanks
    11
    Thanked 592 Times in 572 Posts
    site that don't use javascript tent to suck pretty bad UX wise.
    HTML form attribs and css animations help to some extent, but only scripts can do everything that html, css, and js can do.

    live search, suggestive form validation, form suggestions/deep auto-complete, enjoyable multi-image browsing, partial page refreshes, view state persistence, selection manipulation, 3rd-party api content, ARIA accessibility, and graceful video handling all require javascript.

    sure you can make page like it's 1999, and those pages will work, but people expect more.

    the bottom line is often budgetary: is it worth 50-100% more effort to support <1% of the market, or would your time be better spent making the "99s" version really awsome?
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/9/03) IE7:0.1, IE8:4.6, IE11:9.1, IE9:3.1, IE10:3.0, FF:17.2, CH:46, SF:11.4, NON-MOUSE:38%

  • #7
    Banned
    Join Date
    Feb 2011
    Posts
    2,699
    Thanks
    13
    Thanked 395 Times in 395 Posts
    I don't think anyone is disputing that javascript enables you to add functionality and other "pretty" bells and whistles to a website.

    But when a function can be done both server and client side then I see no reason at all to waste time doing it client side, unless of course it's a requirement in the website specs, because of the need then for a plan B to perform that function in javascript disabled browsers.

    So when a function can be done both client side and server side, I will always do it server side first and then client side only if required.

    If a function can only be done client side, then obviously I will use javascript.
    Last edited by bullant; 06-23-2011 at 08:39 AM.

  • #8
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,700
    Thanks
    6
    Thanked 1,011 Times in 984 Posts
    Quote Originally Posted by Philip M View Post
    Sorry, I just do not understand you. Many sites these days use not just plain Javascript but frameworks such as jQuery and mootools as well. How can a user experience these if he has disabled Javascript? Please explain your reasoning to me.......
    You see this from the wrong perspective: The point is not to make the users experience the same things you can do with JS without JS. The point is to make a website usable to all users (i. e. let users get the information they want and make, e. g., form submissions possible etc.), regardless of their browsing preferences or prerequisites. For those that have JS enabled/available you can still enhance the user experience.

    Quote Originally Posted by rnd me View Post
    site that don't use javascript tent to suck pretty bad UX wise.
    But that’s a design flaw, not a law of nature.

    Quote Originally Posted by rnd me View Post
    live search, suggestive form validation, form suggestions/deep auto-complete, enjoyable multi-image browsing, partial page refreshes, view state persistence, selection manipulation, 3rd-party api content, ARIA accessibility, and graceful video handling all require javascript.
    Of course but a properly designed and coded website doesn’t rely on these things in order to make the site usable. Sure, these are nice enhancements but who needs all this stuff in order to use a website? Facebook, for example, would work just as good if form submissions wouldn’t solely be handled by AJAX but in the classic manner (submit form, reload page with results).

    Quote Originally Posted by rnd me View Post
    sure you can make page like it's 1999, and those pages will work, but people expect more.
    How do you know what people expect? I’d say the first thing that people expect is a website that’s not broken in terms of layout and functionality. If I don’t have JS for whatever reason and a site is not working therefore then this is what I don’t expect. I expect that I can sign in to a website, for example. I don’t expect that the page reloads partially only (AJAX) when signing in. I don’t care how the site works as long as it works. And again: of course I’m happy about all the nice enhancements that make things easier. But these are just enhancements to the already working basic functionality.

    Quote Originally Posted by rnd me View Post
    the bottom line is often budgetary: is it worth 50-100% more effort to support <1% of the market, or would your time be better spent making the "99s" version really awsome?
    Here’s the thing: It’s not any more effort at all, let alone 50–100%, except maybe a little consideration and planning ahead. If you make a form submission with AJAX then you still need a server side programmer who does all the back-end work like database set-up and PHP processing and a front-end guy who takes care of the HTML, CSS, and JS. If they both do their job properly then this isn’t any substantial effort.

    And if you have one million visitors on your site and 1% of them can’t use it because it’s unusable without JS that would be 10.000 people you lose. Imagine what difference 10.000 (missed) customers can make if you’re selling something. Imagine how many users Facebook is missing/losing because their site isn’t usable at least in a basic form.
    Last edited by VIPStephan; 06-23-2011 at 01:40 PM.

  • #9
    Banned
    Join Date
    Feb 2011
    Posts
    2,699
    Thanks
    13
    Thanked 395 Times in 395 Posts
    Quote Originally Posted by Philip M View Post
    As I said, ..... It is your bad attitude which I and others detest. You ought to study Dale Carnegie.
    yep, you are now repeating yourself and given that in the past in these forums you have made unconditional statements about me that are not true and that you have also resorted to attempting to abuse members when your frustration has got the better of you, what you think of me carries no weight at all from my point of view and especially since, in my experience, the feedback I have received from the web sites I post on shows clearly that you and those who share your opinion of me are in a very tiny minority.

    So since you believe it is ok for you to repeat yourself I guess it is then ok for me to simply return the same reply as before.

    I guess with a 15.26% "thank you ratio" (338/2215) fwiw, I must be doing something right and I can't be all bad
    Last edited by bullant; 06-23-2011 at 02:37 PM.

  • #10
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,079
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    @VIP Stephan - I have thought carefully about what you say, but I have to say that although I understand your argument and greatly respect your experience I prefer the opinion of rndme. "Live search, suggestive form validation, form suggestions/deep auto-complete, enjoyable multi-image browsing, partial page refreshes, view state persistence, selection manipulation, 3rd-party api content, ARIA accessibility, and graceful video handling all require javascript."

    And you say "I don’t care how the site works as long as it works." Well, yes. I don't think you can dismiss sites which require Javascript as flawed. I prefer to say that the tiny minority who deliberately elect to disable Javascript in their browsers (why do they do that?) ought to accept and endure the consequences of that.

    Like rndme, I think that
    Sites that don't use javascript tend to suck pretty bad UX wise.
    I think that will have to agree to differ here. Hopefully still on good terms!

    This is as serious and important topic, so I would welcome the views of other senior and respected members of this forum (especially Javascript moderators and perhaps even WA) on this topic.
    Last edited by Philip M; 06-23-2011 at 03:31 PM.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #11
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,079
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    @bullant - As you so often say, everyone is entitled to their opinion. Perhaps your problem is that I tell it you without soda - and will continue to do so - repeatedly.
    Last edited by Philip M; 06-23-2011 at 03:22 PM.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #12
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,700
    Thanks
    6
    Thanked 1,011 Times in 984 Posts
    Quote Originally Posted by Philip M View Post
    I don't think you can dismiss sites which require Javascript as flawed.
    In fact, I do. I see so many “big” sites everyday where the developers have done more work than necessary, for example to fix cross-browser issues, when they wouldn’t have had any issues to fix if they had done their job right in the first place. Likewise, I’ve worked with people who apply JavaScript and effects way too early in the development process. And this is the flaw in the design or approach of many web sites/applications, including e-commerce systems (to get back to the original root of the discussion).

    Quote Originally Posted by Philip M View Post
    I prefer to say that the tiny minority who elect to disable Javascript in their browsers (why?) ought to accept and endure the consequences of that.
    First: not all users actively elect to disable JS. Some just can’t use/have it, be it restrictions of the company network, their hardware/software, or the bandwidth. But yes, I agree with you that they ought to accept and endure the consequences of sites not working for them sometimes. It’s just that often this isn’t even necessary.

    And for a reason why people might actively disable JS in their browser: There are so many tracking scripts nowadays, so many cookie scripts, so many advertising scripts, so many other distraction that you can avoid if you browse the web without JS. Plus, it increases loading speed and saves bandwidth if there aren’t numerous widgets trying to connect to some third party site to download additional content. There are still people that don’t have the latest DSL at home.

    Quote Originally Posted by Philip M View Post
    I think that will have to agree to differ here. Hopefully still on good terms!
    Was that aimed towards me? Because you used a quote of rnd_me. But don’t worry, I have nothing personal against you. I just love to prove my point. If you don’t agree with everything that’s OK. But I hope that there’s at least something left to ponder about.
    Last edited by VIPStephan; 06-23-2011 at 06:08 PM.

  • #13
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,079
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    As I say, I would welcome other considered views.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #14
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,373
    Thanks
    11
    Thanked 592 Times in 572 Posts
    Quote Originally Posted by VIPStephan View Post

    How do you know what people expect? I’d say the first thing that people expect is a website that’s not broken in terms of layout and functionality. If I don’t have JS for whatever reason and a site is not working therefore then this is what I don’t expect. I expect that I can sign in to a website, for example. I don’t expect that the page reloads partially only (AJAX) when signing in. I don’t care how the site works as long as it works.
    As professional web developer, It's my job to know what web users want, so i do a lot of research on the matter. This includes reviewing analytics, article pursuing, conference attending, and more than my fair share of direct user contact.


    Once upon i time, it was my express determination to support every visitor to the sites i built. I even went so far as to integrate a restful text-only (ascii, not css) view for the CMS i built for my last job. The point was for users in developing nations with miniscule bandwidth can read the info we published. Since one of the potential destination sites for the framework was the atlas of world hunger, this was a key consideration. Know your audience, ascii and lynx support is not always needed.


    When css first came out, a lot of well-respected "experts" advised to continue working with html3 tables, since not all browser supported CSS at the time. Eventually, developers became confident that 98%+ support was "enough" to remove unskinned views from the design iteration cycle.


    Another factor is cost. Despite some number thrown around about development, there are other costs associated with good javascript-less sites. Server-side scripting requires a host, which requires public registration, and usually credit-card payment for the plan. Those things are way out of reach for the meager among us. Scott McNealy said that "Half the world dies without making a phone call".

    Also, Lots of folks don't know server-side languages, and the penatly for back-end mistakes is MUCH higher than it is for annoying client-side script errors. Some people's hosting plans don't have server support; many hosted CMSs don't allow regular schmucks the ability to execute, other than pre-designed plugins. So, the only way for those folks to make a highly usable site is with javascript. Don't assume we can all run php.


    I actually agree with the Luddites here that there is little point to having javascript on a brochure-like informational site, other than for the bells and whistles i previously alluded to. But, pages aren't always documents anymore; increasingly they are apps. If you just build brochures, stick with document-central languages like html and css.

    But, if you are like the increasing number of developers creating HTML5 applications, i don't see a static fallback as possible or frankly, even desirable. Imagine google docs or maps without javascript...



    i don't think that VIPStephan is "wrong" about javascript reliance; the old way is undoubtedly 1% more reliable than the new for reaching users. It's a battlefield-tested way of getting content to the seething masses. But, if you want to travel beyond the document and into app land, you won't get very far without client processing, be it javascript, flash, or something else.
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/9/03) IE7:0.1, IE8:4.6, IE11:9.1, IE9:3.1, IE10:3.0, FF:17.2, CH:46, SF:11.4, NON-MOUSE:38%

  • Users who have thanked rnd me for this post:

    Philip M (06-23-2011)

  • #15
    Senior Coder
    Join Date
    Jul 2009
    Location
    South Yorkshire, England
    Posts
    2,318
    Thanks
    6
    Thanked 304 Times in 303 Posts
    I'm personally of the same opinion as Stephan. Adding functionality via JS is fine, but at least make sure the core system works without. If someone wishes to browse either with it without it enabled, they should be able to view the content and use the site regardless, in some way or form. Take this braindead site as an example:

    http://safeweb.norton.com/

    Give me one good reason why they do the redirect for non JS enabled browsers. It's a search on the landing page. Just about the simplest thing you can expect to do on an interactive page, yet they refuse point blank to allow non-JS clients. Why?

    As to why browse with JS disabled... Try using an old machine and browsing the web sometime. It's really amusing to have a machine practically stall on you because of all of the superfluous and totally unnecessary effects and other JS gubbins which one likely has no interest in. What about malicious JS code on hacked pages/sites? Plenty of reasons to browse without JS generally, IMHO.

    If JS is available, then by all means use the extra functionality. But please, just don't penalise those who browse without. There's neither reason nor excuse for doing so, other than saving oneself some minimal extra effort.
    Last edited by MattF; 06-23-2011 at 07:11 PM. Reason: Typo.


  •  
    Page 1 of 4 123 ... LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •