SitePoint Sponsor

User Tag List

Page 2 of 4 FirstFirst 1234 LastLast
Results 26 to 50 of 78
  1. #26
    SitePoint Wizard bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    1,244
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TehYoyo View Post
    No. DS is blaming jQuery because it is too big, tends to be over-used, and is poorly used by developers.
    Whether jQuery is over-used or poorly used should be criticism directed at developers. jQuery is not responsible for bad programmers writing bad code.

    As for whether it's too big... earlier in this thread, we actually measured jQuery's impact. Only 13ms were spent downloading the library.

  2. #27
    SitePoint Mentor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,804
    Mentioned
    73 Post(s)
    Tagged
    6 Thread(s)
    Does jQuery have a "checkbox selection utility" where the library size can be reduced to only use the required functionality?

  3. #28
    SitePoint Wizard bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    1,244
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by John_Betong View Post
    Does jQuery have a "checkbox selection utility" where the library size can be reduced to only use the required functionality?
    The UI components do, but the core library does not.

    Personally, I don't think this would be an important offering, for two reasons. First, real-world sites tend to use every component of the library. And two, because it takes only 13ms to download the library, even if its size was cut in half, you'd save only 7ms.

  4. #29
    SitePoint Mentor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,804
    Mentioned
    73 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by Jeff Mott View Post
    The UI components do, but the core library does not.

    Personally, I don't think this would be an important offering, for two reasons. First, real-world sites tend to use every component of the library. And two, because it takes only 13ms to download the library, even if its size was cut in half, you'd save only 7ms.
    No doubt jQuery at the moment has numerous functions which call other library functions.

    I was thinking more of a learning tool where it could be useful to have an isolated function/block of functions that could be safely modified.

  5. #30
    SitePoint Wizard bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    1,244
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by John_Betong View Post
    I was thinking more of a learning tool where it could be useful to have an isolated function/block of functions that could be safely modified.
    You could probably do that with the jQuery source files. https://github.com/jquery/jquery/tree/master/src

  6. #31
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Jeff Mott View Post
    Whether jQuery is over-used or poorly used should be criticism directed at developers. jQuery is not responsible for bad programmers writing bad code.

    As for whether it's too big... earlier in this thread, we actually measured jQuery's impact. Only 13ms were spent downloading the library.
    Surely, on your computer. But on mobile phones in remote areas, in (as DS mentioned) the countryside, or in remote areas where they don't have high-quality, fast wifi, that's not so. Since the web is about accessibility for all, we need to cater to these different people.

    ~TehYoyo

  7. #32
    SitePoint Mentor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,804
    Mentioned
    73 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by Jeff Mott View Post
    You could probably do that with the jQuery source files. https://github.com/jquery/jquery/tree/master/src
    Many thanks, the contents of the link appear to solve my problem. It is now on my daily increasing Todo List.

  8. #33
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jeff Mott View Post
    DS seems to want to blame jQuery for everything that's wrong on the Internet.
    No, that's stuffing words in my mouth -- I'm saying that jQuery is one of the many factors in recent development that's contributing to the decline. There are lots of rubbish sites built without jQuery; I've just never seen one built with it that was worth a flying purple fish or at the very least wouldn't be a dozen times more useful without it. It seems to exist to actively encourage people to write sloppy scripts, add scripted nonsense to websites that shouldn't even be on said pages in the first place, and contribute to this trend of telling people in places like the Dakota's, Oregon, Northern NH and western ME to basically go perform anatomically impossible acts upon themselves.

    Which you can see in half the "help me with my broken page" threads that fill up areas like the HTML and CSS help sections on forums like this one...

  9. #34
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jeff Mott View Post
    Only 13ms were spent downloading the library.
    which would be BS when I'm tethered at 128kbps.... since by definition 30k would be 2.3 seconds; would be BS when I'm at my neighbors house at 768kbs shared with four people, since then it would be anywhere from half a second to as much as 4 seconds... probably bull when at Panera bread sharing a 1.5mbps connection with 15 other people.

    ... and that's not counting the 150 to 500ms of real world handshaking for the extra file.

    13ms... right, MAYBE if you were hosted in chicagoland, on the same side of the backbone as the server, and the client is on a 3mbps connect. Well, let's do the math.

    13ms for 30k at 8 data bits and one stop bit works out to 2.596 mbps... just for the data transfer. Shame that in the states more than half the online population is below 1.5mbps, most mobile plans never hit that speed, in Australia many people are neutered down to 128kbps or slower the moment they use more than 5 gigs throughput a month, and of course our friends in canada who are facing metered connections and overage charges who I'm SO sure are happy with that extra 30k that's typically for nothing more than a goofy animation or redundant checks that have to be re-done server side anyways.

  10. #35
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,266
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by John
    Does jQuery have a "checkbox selection utility" where the library size can be reduced to only use the required functionality?
    JQUIP.

    http://www.readwriteweb.com/hack/201...-on-a-diet.php

    But on mobile phones in remote areas...
    (not directed at TehYoyo but using the quote to bring up the topic)
    Good lord, don't send a Javascript library to a mobile phone. I don't care if it's powered with a futuristic CPU ready to do calculations for CERN and NASA... those things still run on batteries and batteries are still little more than less-stinky Leyden Jars.

    You can build with minor (or no) JS for mobile (since you're doing that anyway, right?) and if you feel your site must have craploads of scripts then at least use an isMedia() or a matchMedia to check that the screen is large (still no guarantee that large screens don't have crappy internets or not sitting on a battery, but at least the battery is likely to be larger and the CPU more likely to be more powerful) before loading big libraries.

    Only 13ms were spent downloading the library.
    I think before a library makes a claim on how fast they load, they should be required to do the test in a small town with lots of trees (yeah people use satellite for internets), and not in a big city with fiber optic connections. That way, your numbers can only be *better* for those folks.
    I think I usually have a pretty good connection, but I still get sites loading slowly sometimes. Who knows what the cause is? The big pipe in Groningen coming in from the UK getting bogged down? The switching center in Rotterdam having some issues? My ISP having a retard moment? My router getting a blast from the neighbour's 40mhz appliance (we haven't figured out what it is yet)?

  11. #36
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    I've not heard of jQuip before. I think I'll look into it. It's true that jQuery has been bulking up a bit since it's initial releases. It'd be nice to see a modular approach. I've noticed that outside of the selectors, I use only a very very small portion of the jQuery library. I'd wager I use less than 10KB of it (uncompressed).

    13ms is a really small number, and probably unrealistic for most people. I'm smack dab in the middle of Silicon Valley and I can get those speeds, even on my phone. But even still, it's sometimes spotty (we have really good 4G in some places, but go walk a couple of blocks and you're lucky to have net at all). I know that not everyone has those kinds of speeds. They are improving, but we aren't there yet. Using "well it's fast" as an excuse for not keeping sites as small as responsibly possible is a weak excuse.

    (That said, I am still a big fan of jQuery and I think it's actually a space saver in many necessarily JS-heavy projects.)

  12. #37
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by samanime View Post
    13ms is a really small number, and probably unrealistic for most people. I'm smack dab in the middle of Silicon Valley and I can get those speeds, even on my phone. But even still, it's sometimes spotty (we have really good 4G in some places, but go walk a couple of blocks and you're lucky to have net at all). I know that not everyone has those kinds of speeds. They are improving, but we aren't there yet. Using "well it's fast" as an excuse for not keeping sites as small as responsibly possible is a weak excuse.
    Exactly. Just because you can doesn't mean you should. I think what we're all saying is that jQuery should be used effectively and sparingly, and always with good cause.

    ~TehYoyo

  13. #38
    Non-Member
    Join Date
    Feb 2012
    Posts
    892
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Some unrealistic thoughts in this thread, as far as jQuery is regarded.

    About resource demand
    Mobile use number one is media. As in movie clips, music, games. I think it's safe to say jQuery is far less demanding and it's better suited for mobile then those. For reluctant spirits, there are efforts to cater the mobile even further: http://jquerymobile.com/.

    About download size
    jQuery, as file size, is no bigger than a regular small image. There is no real gain in restraining this download.

    About bandwidth
    There are repositories, like Google's, that make caching jQuery a viable solution across the globe. Download once from a site and you're good to go for thousands more.


    It's in the hands of the developers, and in the minds of the potential adopters. It has nothing to do with ISPs, mobile devices, cables, malware (BTW Mallory, you should check for that). jQuery exists, it is used extensively, and it doesn't hurt anyone when used, human or electrical device. Unless you get a headache from a stubborn piece of code and you smash the device apart.

    DISCLAIMER No user will be hurt during your use of jQuery.


    PS There are those claiming jQuery is overkill: "I can make what you want w/o jQuery and in 2.6 lines of code". Who cares? Who needs your Norton Commander clone for DOS anymore? Everybody else is using Total Commander, xplorer2 and such. Efficient and productive code will always be codependent. It's not about reinventing the wheel each time you want to go for a ride.

  14. #39
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by itmitică View Post
    DISCLAIMER No user will be hurt during your use of jQuery.
    That's an absolute statement and highly inadvisable to use at any point in your life.

    I could hurt a user with my use of jQuery. What if I went jQuery crazy and started animating everything so that each word was actually an image in a slideshow? That would kill accessibility and usability.

    ~TehYoyo

  15. #40
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,135
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    jQuery is a tool just like HTML, CSS or plain JavaScript. Everything can be misused. Blaming worthless animation on jQuery is like bashing someones face with a hammer and blaming it all on the hammer. That is how ridiculous and misinformed that statement is!
    The only code I hate more than my own is everyone else's.

  16. #41
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TehYoyo View Post
    That's an absolute statement and highly inadvisable to use at any point in your life.

    I could hurt a user with my use of jQuery. What if I went jQuery crazy and started animating everything so that each word was actually an image in a slideshow? That would kill accessibility and usability.

    ~TehYoyo
    I don't know why the nitpick is occuring but it depends on what kind of "hurt" he meant. Physical harm over Jquery is impossible.
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  17. #42
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by RyanReese View Post
    I don't know why the nitpick is occuring but it depends on what kind of "hurt" he meant. Physical harm over Jquery is impossible.
    Maybe there's so much jQuery that your computer overheats and catches on fire!

    ~TehYoyo

  18. #43
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,135
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    So much jQuery… geesh you really need to have some experience with JS before commenting about how useless it and various libraries are…

    There a lot of problems with JavaScript in it's purest form. Just about all libraries help to close that gap and actually make it elegant to work with. Repeating the same normalization logic over and over and over is not an efficient way to program. Libraries make it so you don't have to do that. Yeah, they throw some extra bells and whistles but the advtanges far outweigh the disadvantages in my opinion and apparently a lot of other people agree…

    You'll understand once you need to deal with heavy AJAX, event driven, dom manipulation applications which yes – gracefully degrade.
    The only code I hate more than my own is everyone else's.

  19. #44
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TehYoyo View Post
    Maybe there's so much jQuery that your computer overheats and catches on fire!

    ~TehYoyo
    That's fire harming you. Not Jquery. Jquery is just pixels/binary code. Virtual.

    Oddz basically summed up what my reply to you was going to be though .
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  20. #45
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    I didn't want to get into a flame war :P I was just taking the side that was less defended for fun.

    ~TehYoyo

  21. #46
    Life is not a malfunction gold trophysilver trophybronze trophy
    TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    6,057
    Mentioned
    253 Post(s)
    Tagged
    5 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    Good lord, don't send a Javascript library to a mobile phone. I don't care if it's powered with a futuristic CPU ready to do calculations for CERN and NASA... those things still run on batteries and batteries are still little more than less-stinky Leyden Jars.

    You can build with minor (or no) JS for mobile (since you're doing that anyway, right?)...
    Especially important to bear in mind, given some (all?) lower-end mobile devices have no JavaScript support. You don't want to hack-off your visitors by making them download large scripts they can't use.

  22. #47
    Non-Member
    Join Date
    Feb 2012
    Posts
    892
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Hi T.B.

    Can I say that you actually mean to talk about mobile browsers that don't have JavaScript support? Ho many of those you think are still out there? I mean, in the hands of the people actually using mobile browsing, not the people that have a monthly 20MB quote attached to their "new&improved" voice plan, for the sole reason of being a more attractive plan than that of the competition?

    And how many do you think will go for a mobile data plan in areas covered with trees with horrible reception? Not that a satellite signal stops in trees. Maybe tunnels is what Mallory was looking for. I have a 4 yrs old GPS that has a decent signal even inside my house.

    I can't help but think that any kind of content beside plain markup is hack-off for those "visitors". Not that I expect more than a few of those. And the bar has been raised considerably. You can get a smartphone, w/o a plan attached, for 120$ or less. Nevermind tables.

    Mobile data plans with intentional purpose behind them usually means people with decent devices, that have decent browsers on them. I don't believe 100kB means anything to their mobile data plan. And certainly not large. Not even medium. Just small. And please consider caching too.

    And many will navigate to my site over free WiFi offered in shops, malls or over free WiFi out in the streets offered by the town halls.


    About the visitors wishes. Let's make a parallel. How many are still buying a game and playing it at a smaller video quality on devices that don't meet the Minimum System Requirements? Many. And many more are buying new devices for this reason: to be able to better enjoy the latest.

  23. #48
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    I partially agree wiith you.

    The part I agree with is there are very few mobile browsers that have Javascript disabled. There are some (since you can disable Javascript), but they are probably too few to really worry about (beyond typical progressive enhancement/graceful degradation). Thanks to the very common two-year upgrade plan, usually the majority of users have a phone that is at least within two years old at any given point.

    However, I disagree that 100KB means nothing to mobile plans.

    I'm not sure about elsewhere, but in the US there is only one major carrier that still has a true unlimited data plan (and they are the slowest network). The others all have a cap of a maximum of 10GB (though 2GB-5GB is much more typical).

    While 100KB is only 1/2000000th of that plan, if every site has one, in addition to lots of images... you could be maxing out your data plan pretty quickly. That's not including video, streaming, playing games which pull ads, etc.

    I'm not saying this should be a huge concern for you, but it is reason enough to keep things especially trimmed on mobile sites (though I try to keep even my normal sites as trim as possible).

  24. #49
    Non-Member
    Join Date
    Feb 2012
    Posts
    892
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    If every site had one... jQuery cache.

    That's why using repositories from Google, Microsoft and jQuey CDN makes the difference between jQuery and other libraries or your own library. You just can't beat that CDN.

    Nevermind the fact that it would take a long time to create the current jQuery code, developed over many years with the help of many programmers. It's unrealistic to think one programmer, no matter how good, will achieve the same.

    If there is one, I'd like to invite it to try. To handle the pert (Hi Jason!) demands and critics, to succeed in raising over a plethora of JS libraries, and to be able to finally offer a widely appreciated tool. Bashing from the sidelines is easier, but also unrealistic.

    Those painting jQuery bad colors are usually taking one single use in one single scenario and use it as "argument". But jQuery covers so many aspects. It's not just your Sunday hat you wear it to impress in a casual conversation, with no deadlines to worry about. It's your everyday boot you use it to get by from place to place, calluses free.

  25. #50
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,266
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    http://www.nytimes.com/2011/02/18/us...dband.htm?_r=1

    I just love watching web devs telling these poor stupid losers who don't live in freaking Boston or Chicago or New York City to go f*ck themselves because it's their fault that they suck. It's as bad as telling the disabled to "get with it". We're not talking about playing Mass Effect 3 on a mobile phone here. We're talking about normal internet access.

    Blaming the user is always easier though. Or claiming they don't exist. Or admitting they do exist but don't count.

    OH WAIT NO WHEN I SAID TREES I MEANT TUNNELS, YOU KNOW MORLOCKS GOTTA HAVE INTERNETS TOO


Bookmarks

Posting Permissions

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