Live data from Hacker News

The Future of JQuery UI and JQuery Mobile

blog.jqueryui.com

31–40 of 97 posts

Re: The Future of JQuery UI and JQuery Mobile

#31

jQuery is still quite relevant and helpful. Despite the hype with newer libraries, jQuery is used on 73% of _all_ websites. https://w3techs.com/technologies/overview/javascript_library... I often tell myself, ok, I'm going to just use vanilla JS for this one, but compared to jQuery, it's way too verbose. Try doing $('.my-elements').show() in vanilla js. The problem is the jQuery foundation has become too bureaucratic…

The biggest benefit that I've found for jQuery (and a lot of JS libraries) over vanilla is browser compatibility. I generally don't have time to check compatibility of every mildly complex piece of JS I write. Using a library often solves that issue

That was a relevant answer couple of years ago. These days you can achieve most with having a properly setup IDE-intellisense ( e.g. WebStorm ).

Re: The Future of JQuery UI and JQuery Mobile

#32
post #6
post #3

Earlier quoted context omitted.

Disagree with this somewhat. I think jQuery still has a place in web app development, especially when you need something done fast. You just need to be careful not to over-bloat your js. jQuery has helped my team get stuff done really fast more than a few times in the last couple of months.

> I think jQuery still has a place in web app development, especially when you need something done fast I never got this argument and am curious - what exactly does jQuery do faster? I've left it behind for CSS animations and native Dom selectors years ago and haven't looked back.

It's certainly easier to just include JQ on an existing site and get to work for simple stuff, but I just deal with Angular now. Easy enough to get up and running with ngcli, and a year down the road the codebase won't look like the abortion which is loads of jquery.

Re: The Future of JQuery UI and JQuery Mobile

#33
post #17

Seems like most of the comments on here pertain to the relevance of jQuery, rather than jQuery UI and jQuery Mobile. Sure most sites still use jQuery, but do very many use jQuery UI anymore? jQuery Mobile? I've never seen a project use jQuery Mobile.

I saw jQuery mobile projects for sites with insanely large expected user base.

For instance a gas comapny’s customer information site, and the goal was to have html that could be displayed on post wap phones or super old blackberries.

It’s really less to do super fancy stuff, and more to have forms that don’t break on super exotic browsers we didn’t even know existed.

Re: The Future of JQuery UI and JQuery Mobile

#34

jQuery is still quite relevant and helpful. Despite the hype with newer libraries, jQuery is used on 73% of _all_ websites. https://w3techs.com/technologies/overview/javascript_library... I often tell myself, ok, I'm going to just use vanilla JS for this one, but compared to jQuery, it's way too verbose. Try doing $('.my-elements').show() in vanilla js. The problem is the jQuery foundation has become too bureaucratic…

That's actually a good example. My gut feeling was simply to write the following. document.getElementsByClassName("my-class")[0].style.display = 'block'; The PlainJS site mentions that it's not quite that simple and suggests writing your own show() and hide() functions if you're avoiding jQuery. https://plainjs.com/javascript/effects/hide-or-show-an-eleme...

It's like a corollary to Greenspun's Tenth Rule [0], in that anytime I try to do something in vanilla JS, I just end up poorly re-inventing half of JQuery just to do it.

[0] https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule

Re: The Future of JQuery UI and JQuery Mobile

#35

Earlier quoted context omitted.

The biggest benefit that I've found for jQuery (and a lot of JS libraries) over vanilla is browser compatibility. I generally don't have time to check compatibility of every mildly complex piece of JS I write. Using a library often solves that issue

That was a relevant answer couple of years ago. These days you can achieve most with having a properly setup IDE-intellisense ( e.g. WebStorm ).

Does that really solve the issue though? All the IDE can tell you is that some browser version doesn't support what you're doing, it doesn't write the polyfill for you.

Re: The Future of JQuery UI and JQuery Mobile

#36

Considering current trends for creating complex applications for the client I do not believe jQuery has much of a future anyway. It had been good while it lasted, I used to like jQuery a lot until better tools came along. These days libraries for DOM manipulation seem not only obsolete but also standing in a way of focused and efficient development. Let jQuery rest in peace and be remembered for its past greatness.

This article is about JQuery UI and JQuery Mobile, which are not the same as JQuery.

Re: The Future of JQuery UI and JQuery Mobile

#37

Earlier quoted context omitted.

That's actually a good example. My gut feeling was simply to write the following. document.getElementsByClassName("my-class")[0].style.display = 'block'; The PlainJS site mentions that it's not quite that simple and suggests writing your own show() and hide() functions if you're avoiding jQuery. https://plainjs.com/javascript/effects/hide-or-show-an-eleme...

To make that work for all elements of that class, you could rewrite it as document.querySelectorAll('.myclass') .forEach(el => el.style.display = 'block') The jQuery is still shorter, but the vanilla js is definitely manageable.

Unfortunately, querySelectorAll returns a NodeList, not an Array. So you cannot use forEach() on it.

Re: The Future of JQuery UI and JQuery Mobile

#38

Earlier quoted context omitted.

That was a relevant answer couple of years ago. These days you can achieve most with having a properly setup IDE-intellisense ( e.g. WebStorm ).

Does that really solve the issue though? All the IDE can tell you is that some browser version doesn't support what you're doing, it doesn't write the polyfill for you.

Most of the polyfills these days are pretty much syntax sugar & ES6 transpiling. If you do your code in non ES6 plain JS way, I'm quite sure the IDE will give you the benefits that you receive with jQuery.

Re: The Future of JQuery UI and JQuery Mobile

#39

Earlier quoted context omitted.

To make that work for all elements of that class, you could rewrite it as document.querySelectorAll('.myclass') .forEach(el => el.style.display = 'block') The jQuery is still shorter, but the vanilla js is definitely manageable.

Unfortunately, querySelectorAll returns a NodeList, not an Array. So you cannot use forEach() on it.

NodeList also implements forEach:

https://developer.mozilla.org/en-US/docs/Web/API/NodeList/fo...

Re: The Future of JQuery UI and JQuery Mobile

#40
post #39

Earlier quoted context omitted.

Unfortunately, querySelectorAll returns a NodeList, not an Array. So you cannot use forEach() on it.

NodeList also implements forEach: https://developer.mozilla.org/en-US/docs/Web/API/NodeList/fo...

It's a very recent addition. IE11 doesn't have it for sure.
Post reply on HN