Skip to main content
Legend
April 10, 2018
Question

javascript v jQuery frameworks

  • April 10, 2018
  • 5 replies
  • 3328 views

I don't want to stir up a hornets nest here but if devs wants to make some sensible contibutions giving their opinions, without getting personal, please do so.

Materialise.css front end framework now uses pure javascript, rather than dependency on jQuery.

If you compare the current versions of the jQuery min js file and the Materiaise min js - jQuery is 90kb and Materialise is 180kb  the unminified files are 274kb and 369kb respectively.

My real question is this. I can understand a developer who says you should use javascript and not jQuery its crap, given they are writing bespoke javascript and not a javscript framework but when I hear developers say 'great Materialise now uses pure javascript and no need for that crap jQuery now' then proceed to hook up a js file which is twice as larger as the jQuery js file, I think that is a bit suspect.

Bot require initialisation of some kind but that file is only likely to be 10k maybe, so JQquery is still the lighter of the js frameworks.

Why is there a witch hunt in terms of JQuery in this circumstance. I can undertand the bespoke javascript workflow because obviously it is much better in terms of file size.

Hummmmm

Os

    This topic has been closed for replies.

    5 replies

    BenPleysier
    Community Expert
    Community Expert
    April 11, 2018

    First you write

    osgood_  wrote

    I don't want to stir up a hornets nest here but if devs wants to make some sensible contibutions giving their opinions, without getting personal, please do so.

    Hummmmm

    Os

    Then you say

    I defend myself, like yourself or Ben in particular

    Hummmmm

    Ben

    As far as jQuery/JavaScript is concerned, I like to compare it to Sass/CSS or Pascal/Assembly et al. where the former is a higher language to the latter.

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    BenPleysier
    Community Expert
    Community Expert
    April 11, 2018

    Come to think of it, HTML is interpreted by a program written in C++ (Firefox). The C++ program is bloated because it has to cope with many possible variants. Taking the argument of using vanilla JS in favour of jQuery, should we code our sites using C++ or even go back to Assembly?

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    pziecina
    Legend
    April 11, 2018

    BenPleysier  wrote

    Come to think of it, HTML is interpreted by a program written in C++ (Firefox). The C++ program is bloated because it has to cope with many possible variants. Taking the argument of using vanilla JS in favour of jQuery, should we code our sites using C++ or even go back to Assembly?

    Let's take everything to the final conclussion.

    To work on a computer everything comes down to binary code, which is then translated to electrical impulses going through, 'and, or, not, nor' gate constructs within the processor.

    ALsp
    Legend
    April 10, 2018

    jQuery is JavaScript. t's just a large file that allows non-programmers to use and reuse various generic functions. If you know how to write JavaScript then you simply decide if you want to take a direct path to a task (write your own) or you want to use a shortcut (jQuery). To an accomplished programmer, the only bright side for jQuery would be if browsers and the W3C adapted some core functions as default behaviors driven via CSS. Otherwise, to a programmer, the argument is kind of like your feelings about coders and CSS and extensions

    pziecina
    Legend
    April 10, 2018

    ALsp  wrote

    jQuery is JavaScript.

    That would be like saying that emmet is html.

    They both end up as being the same thing, and can make the coders life easier, but if jQuery was javascript it would be called javascript.

    ALsp
    Legend
    April 10, 2018

    I really can't respond to your question. I really can't. But I have a whole new vibe for this forum. This is extremely enlightening and allows me to understand a lot of the posts I've seen recently. But I have to ask just one, teeny, tiny question...

    In precise terms, what exactly is jQuery? And where would I find evidenced-based and definitive data that clearly makes it something other than JavaScript, and if so, precisely what is the "other" to be called?

    pziecina
    Legend
    April 10, 2018

    They are two different things, though I know why many developers do not see the difference.

    One is a framework written to support the use of javascript, the other (jQuery) is a javascript abstraction layer, meaning that one does not write javascript but uses a language that must first go through an interpretation process, (the jQuery file) to convert it to javascript, then the converted jQuery code, (now javascript) is run by the browsers javascript engine.

    Even though the javascript file for Materialise is bigger than the jQuery file, (so takes longer to download) the Materialise javascript once downloaded will be faster in execution time, providing it has been written correctly, though the same can be said of jQuery.

    The main problem with both though is in use. The user must ask themselves just how much of the javascript part of the Materialise framework, or the jQuery main code file is required.

    osgood_Author
    Legend
    April 10, 2018

    pziecina  wrote

    The main problem with both though is in use. The user must ask themselves just how much of the javascript part of the Materialise framework, or the jQuery main code file is required.

    I think that was my main confusion, both are harbouring excessive amounts of redundant stuff and to say one is better than the other just because it uses pure javascript rather than  jQuery seemed a bit disingenuous and more based on a dislike for jQuery, which is fine, rather than ok we have got rid of all the excessive crap which a framework carries with it. As for the execution time I guess it could be a minimal factor.

    ALsp
    Legend
    April 10, 2018

    LOL, so are you saying that jQuery is impure JavaScript? Before you bite my head off, think how snobby you sometimes treat people who don't share your love for "coding"

    Jon Fritz
    Community Expert
    Community Expert
    April 10, 2018

    This looks like an answer to a question nobody asked, there's lots of those online.

    May be more of a class/group project than a true development framework.

    Not too shabby for 4 college age guys, but that's about it.

    Jon Fritz
    Community Expert
    Community Expert
    April 11, 2018

    If there's any valid reason to reopen this cluster, let me know via PM.

    B i r n o u
    Legend
    April 10, 2018

    I agree with you and why not using jquery... those who needs and are used to... it's a nice library...

    anyway, it still worth nothing to have a look on You Might Not Need jQuery

    <just in case>it's not a polemic</just in case>

    osgood_Author
    Legend
    April 10, 2018

    https://forums.adobe.com/people/B+i+r+n+o+u  wrote

    I agree with you and why not using jquery... those who needs and are used to... it's a nice library...

    anyway, it still worth nothing to have a look on You Might Not Need jQuery

    <just in case>it's not a polemic</just in case>

    Ok, thanks for the clarification and your opinion. I just get a bit annoyed when a well followed dev suggests a workflow which is really no better, maybe even worse. Pure js and writing bespoke functions I can understand is better.....no dependency on any js framwork.

    Infact I should have provided a better answer to a post earlier by providing a pure javascript solution instead of hooking up the jQuery framework which is overkill to perform one or two tasks, but that's another story.