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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update jQuery to 3.5.1 or... Remove jQuery? Discuss! #2215

Closed
roblarsen opened this issue Apr 13, 2020 · 10 comments 路 Fixed by #2225
Closed

Update jQuery to 3.5.1 or... Remove jQuery? Discuss! #2215

roblarsen opened this issue Apr 13, 2020 · 10 comments 路 Fixed by #2225
Assignees
Milestone

Comments

@roblarsen
Copy link
Member

Removing jQuery from the project has been suggested to me before, and was suggested as a discussion point for the upcoming 8.0 release by @coliff

I'm open to discussing it. This ticket is the place for that discussion 馃 馃槧 馃槃 馃槩

I'm not going to lay out my thoughts just yet, but I'll share what I think are the two different ways to look at it.

On the one hand- Builtwith's jQuery Usage Statistics usage statistics indicate that it's in use on 76% of the top 1m sites. For many people it's still very much a thing.

On the other hand- For many people who active on GitHub and who stay on the cutting edge of front end development, jQuery is three or four generations old and doesn't have any place at all in their day-to-day development. It may live as a dependency somewhere in some projects, but doing a lot of $() stuff is something from the past.

@roblarsen roblarsen added this to the 8.0 milestone Apr 13, 2020
@roblarsen roblarsen self-assigned this Apr 13, 2020
@roblarsen
Copy link
Member Author

@coliff said

I made a PR to update to jQuery 3.5.0 today, but it looks like a quick patch release (jquery/jquery#4665) will be released very soon so we'll need to update again - OR we could consider removing jQuery altogether. The way websites are built has changed a lot of the last 10 years and jQuery is no longer an essential inclusion. If folks want to add it, it's easy for them to do it themselves without it being included by default for everyone.

@roblarsen
Copy link
Member Author

I'm also open to an option where you can optionally build the project with/without jQuery from the command line. I want to have a version that we're happy with that ships in the 8.0 zip, but I am also happy to push some optional stuff into the build-- using static properties in a config file to make it super easy. We could add things like the value for the lang attribute there as well.

@roblarsen roblarsen changed the title Update jQuery to 3.5.1/Remove jQuery (Discussion Prompt) Update jQuery to 3.5.1 or... Remove jQuery? Discuss! Apr 17, 2020
@perardi
Copy link

perardi commented Apr 17, 2020

UI designer here, frequent user of this project for prototyping website interactions and such.

My initial reaction was: oh no don't take my jQuery away. I am stuck in my ways, and I still use it, as it just "makes sense" for simple DOM traversal and manipulation stuff.

But after 2 minutes of consideration: bundling a third-party library is not a core competency of this project. It's trivial to add jQuery on your own. In fact, for reasons I don't recall right now, I ripped out the included version and added jQuery Slim in my most recent prototype.

Including jQuery is tremendously simple with their CDN (https://code.jquery.com), and it's easy to download, so, I say it's safe to remove.

@vltansky
Copy link
Member

vltansky commented Apr 18, 2020

I think that the trend now is to remove jQuery support, and it would be right to support this trend and jQuery shouldn't be included by default in web dev nowadays. Anyway if developer prefer to use jQuery it's very easy to add it, but when it won't be included by default I think it's more likely to make a developer concider is jQuery really needed in his project, when he basically need only to toggle class once..

Optional build the project with/without jQuery where jQuery is off by default seems like the best option to me.

@eshimischi
Copy link

eshimischi commented Apr 21, 2020

Remove it and remove it now! 馃挴

@jloosli
Copy link

jloosli commented Apr 23, 2020

To echo #2215 (comment) Removing jQuery gives people some flexibility in choosing how and what they may or may not add to enhance their site. At one point, it was a given that jQuery was a necessary part of any site and now it's just one of many tools that developers can use to accomplish a variety of front-end tasks.

@roblarsen
Copy link
Member Author

Going once.... Going twice...

@coliff
Copy link
Member

coliff commented Apr 24, 2020

Just wanted to chime in with my thoughts quickly. I'm a big fan of jQuery and use it in many projects but there are quite a few good reasons why we shouldn't include it by default in the template:

  • Sometimes users may want to use the smaller slim build
  • Self-hosting jQuery rather than using a third-party CDN has many advantages, including longer browser cache life (3rd party assets typically have shorter cache life) and potentially improved performance from not needing to do DNS resolution/TCP/TLS lookup. https://csswizardry.com/2019/05/self-host-your-static-assets/

roblarsen added a commit that referenced this issue Apr 28, 2020
Closes #2215

(I'll write up a super great commit message when I merge this in)

Additionally, this commit updates Modernizr (I was in the gulpfile and was reminded that they just released)
@roblarsen roblarsen mentioned this issue Apr 28, 2020
2 tasks
@coliff coliff added the has-pr label Apr 28, 2020
@nhalink
Copy link

nhalink commented Apr 30, 2020

On the one hand I'm in favor of removing jQuery, for a long time it was the go-to javascript library and it was used in almost every project, however things have changed with more powerful HTML & CSS and a broad variety of other javascript solutions.
But ... I do use javascript libraries within my projects, often from CDN's, so leaving in an example on how to implement one in your code the "best", "correct" or most efficient way is still beneficial. (Remember when we used to stuff almost everything in between the head-tags?)
To avoid the implication that jQuery should be a standard within every project, a fake library could be used or a smaller, single functionality library plus a comment stating it is an example on how to implement.

@thereaad
Copy link

thereaad commented May 1, 2020

Removing jQuery from the project has been suggested to me before, and was suggested as a discussion point for the upcoming 8.0 release by @coliff

I'm open to discussing it. This ticket is the place for that discussion 馃 馃槧 馃槃 馃槩

I'm not going to lay out my thoughts just yet, but I'll share what I think are the two different ways to look at it.

On the one hand- Builtwith's jQuery Usage Statistics usage statistics indicate that it's in use on 76% of the top 1m sites. For many people it's still very much a thing.

On the other hand- For many people who active on GitHub and who stay on the cutting edge of front end development, jQuery is three or four generations old and doesn't have any place at all in their day-to-day development. It may live as a dependency somewhere in some projects, but doing a lot of $() stuff is something from the past.

roblarsen added a commit that referenced this issue May 4, 2020
* Removing jQuery

Closes #2215

(I'll write up a super great commit message when I merge this in)

Additionally, this commit updates Modernizr (I was in the gulpfile and was reminded that they just released)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants