Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
hell165968yI use it mainly because i don't know wtf I'm doing when it comes to front end 😂😂
-
This problem is for many. And though I not perfect at JS I do agree that it's a bad trend people follow , jQuery seems to be the wand for them , what they don't understand is it's a whole fucking library. So until it is something huge I would try to use JS first.
-
Anaeijon5148y@digli XMLHTTPRequest + parsing with JSON
It's not even harder than using the jQuery-Ajax-Methods.
http://w3schools.com/json/...
I'm not very good in frontend-stuff, so... -
Anaeijon5148y@EpIcInCoGnItO depends on what you want to do.
I usually use ajax to load some objects from a server.
Most backend languages feature some easy methods to convert objects to json and vice versa.
It's usually easier than using XML. -
Anaeijon5148y@EpIcInCoGnItO Thats exactly what I mean.
Starting Xmlhttprequest from client (JS).
Return JSON encoded Object from server.
JSON.parse on client.
Work with the object however you want.
That's all you need for ajax. -
alkuzad14718yNo, we use jquery because vanilla has so many pitfalls that I don't want to even try it (undefined as string + null as another thing for example)
-
@Anaeijon I am not good with words yet as not a pro in JS. Will check the xmlhttprequest thing.
-
flag020318yJSON is easy to handle mostly.
Reason is there are many devs who have learned jQuery but don't know shit about pure JavaScript. -
flag020318y@alkuzad I still don't know who thought that "undefined" as string was a good idea. is it a string or not!
and NaN != NaN probably but that's still is justified somewhat -
jquery wasn't needed when it was made, when it came out new kids started loading jquery and wrote
$("#id").html ("neat")
when they could have just did
document.getElementById ("id").innerHTML='neat';
and called it a day, jquery should only be used if you are working on effects other than that it's shorter to just use javascript even looping to find a class name in the old days was less bloat than using jquery. when it first came out I thought it was going to burn out but kids found it as a short cut and screwed us all -
620hun81908y@jckimble I don't think jQuery should ever be used. Except maybe where you have to manipulate tons of DOM elements at once. Even then you could still use querySelectorAll, but chaining can get tricky. jQuery is good for chaining.
-
nuts6818yI only use it when working on themes that already include it. Anyway most front-end stuff requires it, like fancy selectboxes, sliders, datatables... yes you could write them from scratch, but it's not worth the time
-
nuts6818yand it's useful to handle compatibility with old browsers, for example to attach a onclick event listener there are 3 different ways, depending on the browser
-
620hun81908yYeah, it deals well with prehistoric browsers. But if you develop for the modern Web you don't usually have to tinker much (except for CSS prefixes I guess).
@EpIcInCoGnItO Already more than what I was for
Related Rants
Please tell me I'm not the only one who gets really annoyed when someone uses jQuery to do stuff that would take the same amount of pure JS. I think these days many people only use jQuery out of laziness, not because it's necessary. Why load an entire library to set CSS attributes and innerHTML? Yes, there was a time when it was very useful to have jQuery, but today we have querySelectorAll and all that. You can save plenty of kBs, load time and improve performance.
Next time you're about to load jQuery ask yourself: do I really need it? Chances are the answer will be no.
undefined
javascript
jquery
rant