Skip to main content
Legend
April 10, 2018
Question

javascript v jQuery frameworks

  • April 10, 2018
  • 5 replies
  • 3367 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

    osgood_Author
    Legend
    April 10, 2018

    ALsp  wrote

    jQuery is JavaScript. t's just a large file that allows non-programmers to use and reuse various generic functions.

    I know that. I was comparing it to materialise.js which is also a large js framework file where the dev suggests its better than Jquery.js I understand writing pure javascript without the dependency on any framework is the optimum way to go, Ive always maintained that, even though I use jQuery for most tasks. Difference is I know which workflow is better, pure javascript, and am happy to admit it. I was just questioning this devs views about dumping jQuery.js and introducing Mmaterialise.js, which to me seem to be doing much the same, providing cookie cut functions in excess files.

    ALsp
    Legend
    April 10, 2018

    ALsp  wrote

    You're scary, sometimes. And now you mention my family and expect to be taken seriously. Do you not realize what a fool you are making of yourself. Deal with being corrected, like a grownup. I didn't attack you. I corrected you for the benefit of those non-coders you like to bully who might otherwise run off thinking that jQuery is something it is not. Deal, dude. And find someone else to insult. I could not care less what you say.

    Show me where I said jQuery is something its not?

    pure javascript is a common term used by developers to describe javascript without framework dependencies. You are putting words in my mouth by implying I said jQuery was 'impure' javascript, which was not what I said, its someting you wanted to read into it, like you do so many times - just introverted and blinded by desperately trying to inform us how good your products are (not) as opposed to any others, you're a true legend in your own lunchtime.

    Nope you certain didnt attack me, just called me a snob and now a bully, you really are something else...


    But you do bully non-coders, an you do insult people an you have a serious problem with extension developers. So, your diatribes tend to be of a personal-attack nature more often than not. I simply sought to clarify, did it in good nature, and you got defensive and belligerent, and quite personal. I realize that there are thousands of miles between us, and you don't even no me, but if you want some friendly advice, it would be very human of you not to involve peoples' families in your rants. It's not nice.

    Now feel free to get in the last word, if that's what makes you happy. Insult me all you want. I would expect nothing less.

    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.