hound
hound copied to clipboard
Remove jQuery
In the project, jQuery is used only for Ajax requests and for merging objects. There is no need to load this whole library for these operations.
There are popular libraries that can be used specifically for those purposes (reqwest and merge-anything).
This makes the process of updating a library easier because no Go code is needed to be changed, only the version of the packages in the package.json should be updated.
This pull request assumes that this commit is already merged.
Do you have some statistics about performance improvement after this update?
Do you have some statistics about performance improvement after this update?
If there is an improvement in performance, it should not be huge (I have not measure it). The improvement here is more related to maintainability and upgrading, if one wants to update the library, instead of updating the jQuery
file, the ui/bindata.go
file, and the ui/content.go
file, one just needs to deal with the npm
packages.
NOTE: later on, I decided to remove the merge-anything
and create-react-class
packages because the components were rewritten in ES6
as functional components and I started to merge objects using the spread operator. So, at the end, one can say that jQuery
has been replaced only by reqwest
because the use of it is only for AJAX
requests.
hi @elchininet thanks for making this change. Since it's been a while I couldn't merge your request so I recreated it in this pull request and merged it. I'll continue from where you stopped on removing merge-anything
and create-react-class
.
Thanks for the update @twizzyyanki, As it has been a long time, I don‘t remember the order of the branches but I did a lot of improvements in my fork. If you dig a bit you can find some of them interesting. Regards