Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of jQuery #53

Closed
rugk opened this issue Jan 20, 2019 · 3 comments
Closed

Get rid of jQuery #53

rugk opened this issue Jan 20, 2019 · 3 comments

Comments

@rugk
Copy link
Contributor

rugk commented Jan 20, 2019

Modern browsers do not need it anymore, and you really can get rid of it…

See https://plainjs.com/

@ar2rsawseen
Copy link
Collaborator

I am sorry, but I completely don't see this as an issue.

  1. This does not add any value. If we remove the jquery, it all works the same at best. Or breaks some backwards compatibility at worst. Yes, the source code you load will be smaller. But here we are not talking about some high end SEO optimized speedy loading website. We are talking about docs that other developers will use.

  2. This requires work. Some one actually has to spend time and to that. If it ain't broken, don't fix it. If you start a new project, you might consider that option, if you are 100% sure there is no need to support quite old systems.

  3. Unfortunately jquery still has a place as backwards compatibility tool. You can't even imagine how many of big companies (banks mostly) are tied to their old internal systems, that run on IE7. So they prefer all other websites they use would run on same.

  4. There are so many libraries out there, depending on jquery. By removing it, you basically strip yourself of an option to add quickly some requested feature, that existing lib provides. Adding jquery plugin could take couple of minutes. Finding pure vanila solution or programming it yourself, will take much more.

  5. Removing jquery for the sake of removing jquery is the worst reason to remove jquery.

@rugk
Copy link
Contributor Author

rugk commented Jan 21, 2019

This does not add any value.

You are approaching this issue from the wrong side. The question is: What value does jQuery add, so we have to use it?

Guides such as plainjs, answer this:

Why choosing plain JS over jQuery?
Writing common and rather simple JavaScript functions for a website can nowadays be easily done in plain JS. There's no real gain from jQuery, although syntax is typically slightly shorter. However, that comes with the price of downloading and parsing a huge library. Yet, when writing complex JavaScript tools, such as image editors or charting libraries, both the dependency upon and the lower speed of jQuery are real drawbacks. Therefore, such code is mostly written in pure JavaScript. Again, no need for jQuery.

Or breaks some backwards compatibility at worst.

Plainjs again:

All functions work properly in IE 9 and above - most of them are compatible with IE 8. Common pitfalls are mentioned alongside concerned functions. Available plugins have no dependencies and are tested in IE 9+, some work properly in IE 8 and below.

IE 8! So to take your argument: This is a dev doc, so I really hope no dev is using <IE 8/9 for reading jsdoc...

This requires work. Some one actually has to spend time and to that.

True. But it seems this project does not use that much front-end facing JS code, so I am totally willing to look into it.

Unfortunately jquery still has a place as backwards compatibility tool.

See above, no IE7 is no excuse for that. Generally IE7 usage is so low you can forget them, and as for devs I'd argue it is even lower.

Then just manually embed jQuery. Do devs actually modify JSDOC templates?

Finding pure vanila solution or programming it yourself, will take much more.

Not true. Most JS libs nowadays already got rid of jQuery and so you can just embed them in the same way. Even Bootstrap is not using it anymore! And that is a real template for many websites!
Also you remeber you are using GitHub right now? AFAIK they've dropped support for whole IE some time ago, already.

@ar2rsawseen
Copy link
Collaborator

I am not a fan of IE, don't get me wrong 😄

My main perspective was, it is already there, so removing it requires work, and what would be the point of it? Only because we can? I don't see it as improvement.

But if you are willing to invest your time in this, sure. PR is welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants