I'm heavily inclined to agree with this. In fact, only this weekend I was working on a very simple one page tool and from the get-go I decided to adopt this "vanilla" only approach, i.e no JS libraries really at all. Pretty quickly I found myself wishing I had just used jQuery or at least some other library to make stuff easier and get things done faster. When I finally got it completed in the end I wasn't sure why I…
Why I'm still using jQuery
51–60 of 246 posts
Re: Why I'm still using jQuery
#52I'm heavily inclined to agree with this. In fact, only this weekend I was working on a very simple one page tool and from the get-go I decided to adopt this "vanilla" only approach, i.e no JS libraries really at all. Pretty quickly I found myself wishing I had just used jQuery or at least some other library to make stuff easier and get things done faster. When I finally got it completed in the end I wasn't sure why I…
So what was the struggle with vanilla js? I'm just curious :) One of the first things I learned in web development was jquery but right now I never use it. Even if I create a vanilla html/css/js website.
Re: Why I'm still using jQuery
#53Earlier quoted context omitted.
You must be new here on HN, we usually like to discuss things instead of calling them names. Mind sharing your opinions instead of just saying it's shitty?
What? I think it's really good!! because it has a lot of good methods and such.
If you mean jQuery , then maybe the functions you don't use others use, give some examples , the most I use daily are attr,css, find, parent, wrap,unwrap,parents,each, filter,toArray, remove, append, after etc (my project gets a ton of possible broken html or html with garbage and I clean it up)
Re: Why I'm still using jQuery
#54I'm heavily inclined to agree with this. In fact, only this weekend I was working on a very simple one page tool and from the get-go I decided to adopt this "vanilla" only approach, i.e no JS libraries really at all. Pretty quickly I found myself wishing I had just used jQuery or at least some other library to make stuff easier and get things done faster. When I finally got it completed in the end I wasn't sure why I…
Struggle with vanilla JS is my inspiration for writing this, which was up voted 20 times: https://news.ycombinator.com/item?id=19946032
With abstraction there has to be a balance though. Sure, I concede that knowing how it works is actually important, hence why I've spent a lot of time doing things without libraries in the past, especially as I was learning. It actually enrages me when people who've only ever used ORMs make super basic mistakes when writing and executing SQL themselves for the first time, i.e selecting a bunch of relationships in a loop one by one, instead of getting them all in one query. Stuff like that is a good example of how only ever working with abstracted versions of your tech stack results in mistakes down the line that have costs, since the abstracted version doesn't explain these concepts to you.
However, when it comes to actually trying to get things done efficiently, abstraction can help a bunch. Writing a bunch of stuff from scratch every time is not particularly productive either.
Re: Why I'm still using jQuery
#55> In my experience server-side generated templates lightly sprinkled with “progressive enhancement”-style JavaScript are still the best way to do that. Those apps are easier to develop, tend to be faster, tend to have fewer bugs, and your laptop’s fan won’t wake the neighbours. Thanks for that part. Really. A heartfelt thank you. Every time I see another "hey, I only want to show you text, but for some reason I thoug…
There's a lot of crazy things in the world. Talk to a child about the economy or country borders and you'll realize how some things are just not straightforward to explain the advantages of.
Serverside rendering in JS is no different to SSR in classic frameworks. You generate HTML serverside. Except in this case, you do it using JavaScript, because as it turns out, people develop with JavaScript.
Putting aside how useful it is to only have one language to learn in a stack... Typescript is actually incredible to work with. Working on a typescript and react app is the most productive environment I have ever worked with my past 16 years of programming. The JavaScript world has an immense amount of tooling development behind it it's not even funny.
So when the author says that classic HTML with sprinkled js on top is "easier to develop", I smirk. Developers are flocking en masse towards the SPA model usually BECAUSE it's easier to develop (both with a single language, and in general having the entire app be self-contained). And it's monumentally easier to maintain at scale, too.
EDIT: Clarified that last paragraph.
Re: Why I'm still using jQuery
#56Earlier quoted context omitted.
So what was the struggle with vanilla js? I'm just curious :) One of the first things I learned in web development was jquery but right now I never use it. Even if I create a vanilla html/css/js website.
Not really a struggle, but why would you want to type ten lines when two will do?
Re: Why I'm still using jQuery
#57If JQuery is all you need to get the job done, go for it. It's still fast, simple and easy to develop. If you need state management, build a very complex app, etc. ... don't.
It depends what you do with jQuery. Maybe you use a nice , well tested and full featured plugin (calendar, grid view) then jQuery works. Or if you want to manipulate html (you grab an html from a page and you want to export it as epub but you want to remove some stuff before, cleanup some styles, jQuery is much better at DOM manipulation then pure JS) IMO what you should never do is put your application state inside…
Re: Why I'm still using jQuery
#58I'm heavily inclined to agree with this. In fact, only this weekend I was working on a very simple one page tool and from the get-go I decided to adopt this "vanilla" only approach, i.e no JS libraries really at all. Pretty quickly I found myself wishing I had just used jQuery or at least some other library to make stuff easier and get things done faster. When I finally got it completed in the end I wasn't sure why I…
your link above is https://youmightneedjquery.com" <--- quote was in the link.
Re: Why I'm still using jQuery
#59Earlier quoted context omitted.
So what was the struggle with vanilla js? I'm just curious :) One of the first things I learned in web development was jquery but right now I never use it. Even if I create a vanilla html/css/js website.
Not really a struggle, but why would you want to type ten lines when two will do?
Re: Why I'm still using jQuery
#60Earlier quoted context omitted.
You must be new here on HN, we usually like to discuss things instead of calling them names. Mind sharing your opinions instead of just saying it's shitty?
What? I think it's really good!! because it has a lot of good methods and such.