Skip to content

Removed jQuery dependencies#503

Open
icetan wants to merge 6 commits into
morrisjs:masterfrom
icetan:no-jquery
Open

Removed jQuery dependencies#503
icetan wants to merge 6 commits into
morrisjs:masterfrom
icetan:no-jquery

Conversation

@icetan
Copy link
Copy Markdown

@icetan icetan commented Sep 28, 2014

I have removed jQuery to show how easily this library would not need to depend on the extra bloat of jQuery. I really like the minimal nature of Morris.js and thought it would be great if it had less dependencies.

Anyway please tell me what you think and if I can do anything to make the pull better. If you are interested at all that is :)

@JelteF
Copy link
Copy Markdown
Contributor

JelteF commented Sep 29, 2014

First of all, looking good. I like lean projects as well. However, jQuery also has quite a bit of advantages. First of all, browser compatibility. I like it that stuff just works for different platforms.

Secondly, jQuery can also remove bloat from a project. Most people already include it, especially if they use other javascript heavy libs, like this one. As you can see your commits actually added lines to the codebase, because stuff in jQuery needs to be emulated. This can be solved (like some other libs do) by building a version of the library that needs jquery and one that is stand alone. This is something that would have to be added for me to agree to these commits.

I would love to know what de other developers think of this.

@jaminellis
Copy link
Copy Markdown
Contributor

Reflecting back on this now, I see increasingly libs are decoupling from jQuery (e.g. recent Velocity.js changes) so making jQuery optional / only for older browser support is interesting.

@kazzkiq
Copy link
Copy Markdown

kazzkiq commented Jan 15, 2015

As far as I'm concerned, this code don't break compatibility with any browser currently supported, and don't create any new critical issues. In fact, all it does are improvements. Its always better to use vanilla JavaScript instead of third part libraries, its better for performance, it becomes more independent, it leaves to the user the choice to use or not other libraries, etc.

Of course its not that jQuery is bad, but if we can make a plugin work universally and be agnostic from most libraries (yeah Raphael.js still a must of course), why not do it?

I'm voting up for this and don't see any reasonable reason not to accept it. 👍

@icetan
Copy link
Copy Markdown
Author

icetan commented Jan 15, 2015

The changes should support IE8+ and jQuery 2.x only supports IE9+. So it is actually more browser compatible in some cases. The added code is also quite minimal.

@Tronix117
Copy link
Copy Markdown

👍

Totaly agree, on hybrid application, I do not want to include jQuery.
Only few functions of jQuery are used and do not justify including it.

Modifications by @icetan should be merged

pierresh pushed a commit to pierresh/morris.js that referenced this pull request Jan 7, 2018
Based on pull request morrisjs#503
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

Successfully merging this pull request may close these issues.

5 participants