Caveat: novice programmer here. Even Angular is still difficult for me to grok and sometimes I wonder if stuff that comes out of Google "suffers" (for me) from Google having unlimited resources and employing superior engineers? Would Google have a difficult time empathizing with "average" programmers with limited resources?
Stepping Backwards from AngularJS to JQuery – An Experiment
31–40 of 68 posts
Re: Stepping Backwards from AngularJS to JQuery – An Experiment
#32Next time, try dropping jQuery, too, and just using vanilla JavaScript. Just for fun. Simple DOM manipulation is now as simple in vanilla JavaScript as jQuery, with the only big advantage jQuery has now is if you're animating. You may find you're not missing much. You'd have to get used to slightly more involved Ajax syntax, unless you can target only new browsers, in which case the `fetch` API is just as convenient…
"Vanilla JS is a fast, lightweight, cross-platform framework for building incredible, powerful JavaScript applications."
"In fact, Vanilla JS is already used on more websites than jQuery, Prototype JS, MooTools, YUI, and Google Web Toolkit - combined."
Re: Stepping Backwards from AngularJS to JQuery – An Experiment
#33Earlier quoted context omitted.
I found that odd. I do worry that many people use technologies because other people working at a completely different scale or in a completely different domain have hit a ceiling which wouldn't really apply to most people. They are convinced to start with a more complex and more difficult technology that's solving problems they are unlikely to be facing any time soon. 1. NoSQL traditional RDMS because of scaling/shar…
My friend was brought in by a client after the previous contractor had spent 300+ hours coding a simple organizational website - here is who we are, here is our phone number - using node.js. I doubt the website will ever see more than 20 concurrent visitors.
Re: Stepping Backwards from AngularJS to JQuery – An Experiment
#34I think there's a better approach to handling the delete buttons that's pretty common when using jQuery. Instead of each button having it's own handler function I would specify an event handler on a single DOM element (e.g. a list container) with something like $('#itemlist').on('click', '.delete', deleteItem). When 'deleteItem' is called 'this' will be the clicked button element that could have an attribute like 'da…
yes, that is event delegation : https://learn.jquery.com/events/event-delegation/
Re: Stepping Backwards from AngularJS to JQuery – An Experiment
#35Earlier quoted context omitted.
I found that odd. I do worry that many people use technologies because other people working at a completely different scale or in a completely different domain have hit a ceiling which wouldn't really apply to most people. They are convinced to start with a more complex and more difficult technology that's solving problems they are unlikely to be facing any time soon. 1. NoSQL traditional RDMS because of scaling/shar…
My friend was brought in by a client after the previous contractor had spent 300+ hours coding a simple organizational website - here is who we are, here is our phone number - using node.js. I doubt the website will ever see more than 20 concurrent visitors.
Re: Stepping Backwards from AngularJS to JQuery – An Experiment
#36Next time, try dropping jQuery, too, and just using vanilla JavaScript. Just for fun. Simple DOM manipulation is now as simple in vanilla JavaScript as jQuery, with the only big advantage jQuery has now is if you're animating. You may find you're not missing much. You'd have to get used to slightly more involved Ajax syntax, unless you can target only new browsers, in which case the `fetch` API is just as convenient…
Re: Stepping Backwards from AngularJS to JQuery – An Experiment
#37I found this interesting because it seems to have been written by a person who learned Angular before jQuery. I haven't run into that before. Maybe I'm getting old.
After leaving my last job, I decided I needed to update my skills and Angular seemed like a good road to go down. It was only recently that I decided to return to the old jQuery well to see what I could do with it vs. Angular. I'm glad I did.
Re: Stepping Backwards from AngularJS to JQuery – An Experiment
#38Next time, try dropping jQuery, too, and just using vanilla JavaScript. Just for fun. Simple DOM manipulation is now as simple in vanilla JavaScript as jQuery, with the only big advantage jQuery has now is if you're animating. You may find you're not missing much. You'd have to get used to slightly more involved Ajax syntax, unless you can target only new browsers, in which case the `fetch` API is just as convenient…
What's the big advantage of jQuery with animating? Are you referring to the animation built into jQuery?
Re: Stepping Backwards from AngularJS to JQuery – An Experiment
#39JQuery encourages more fluent, purely functional reasoning, and one-way data binding of immutable data objects.
Re: Stepping Backwards from AngularJS to JQuery – An Experiment
#40Next time, try dropping jQuery, too, and just using vanilla JavaScript. Just for fun. Simple DOM manipulation is now as simple in vanilla JavaScript as jQuery, with the only big advantage jQuery has now is if you're animating. You may find you're not missing much. You'd have to get used to slightly more involved Ajax syntax, unless you can target only new browsers, in which case the `fetch` API is just as convenient…
> ...with the only big advantage jQuery has now is if you're animating. While you can probably get away with using $.animate for very simple animations, you'll run into jQuery's animation performance problems before too long. See: - http://wilsonpage.co.uk/preventing-layout-thrashing/ - http://velocityjs.org/