Live data from Hacker News

The Future of JQuery UI and JQuery Mobile

blog.jqueryui.com

91–97 of 97 posts

Re: The Future of JQuery UI and JQuery Mobile

#92
post #18

TL;DR they are both dying

Here is real TLDR; - Scott Gonzalez has lead the jQuery UI project for many years now and has helped to improve the quality tremendously. - However, we do hope to continue reducing the amount of duplicated code and widgets in the projects moving anything common to jQuery UI. - We think going forward this needs to change; we will now be looking for and accepting people that are just interested in maintaining a single…

They are just trying to give it a positive spin.

Re: The Future of JQuery UI and JQuery Mobile

#93
post #87

Could someone please tell me how modern DOM manipulation looks like these days? I understand jQuery is old, but do not have fresh information on what's used nowadays.

With native APIs, jQuery was only useful for providing an abstraction layer over browsers' differing implementations, but they are mostly standardised now.

Re: The Future of JQuery UI and JQuery Mobile

#94
jQuery certainly did a commendable job of lowering the bar for web developers!

So low that many people thought of jQuery as a way to avoid learning JavaScript. (Not that there's anything wrong with that, mind you.)

That's why there's such a huge demand for a free jQuery plugin that can add, subtract, multiply, divide and compare numbers.

http://www.doxdesk.com/img/updates/20091116-so-large.gif

"-1 not enough jQuery"

https://github.com/cbrandolino/jQuery-basic-arithmetic-plugi...

jQuery basic arithmetic plugin

$.add(arg1, arg2 [, args...]) adds two or more numbers;

$.subtract(arg1, arg2 [, args...]) subtracts two or more numbers, the leftmost being the first operand;

$.multiply(arg1, arg2 [, args...]) multiplies two or more numbers;

$.divide(arg1, arg2 [, args...]) divides two or more numbers, the leftmost being the first operand;

$.equals(arg1, arg2 [, args...]) checks two or more numbers for equality.

Re: The Future of JQuery UI and JQuery Mobile

#95
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 wrote a prototype of a questionnaire system using jQuery Mobile version 1.0, to see what it was like [1].

The problem I wanted to solve mapped pretty closely to exactly what jQuery Mobile was designed to do: page through a bunch of screens with controls on them. But the results were pretty "blah", and I needed a lot more control over the presentation and behavior than it provided.

Instead, I just used raw jQuery, which worked fine.

But I did use end up using one jQuery UI file "jquery.ui.widget.js" for its "$.widget" Widget Factory [2] and Widget Plugin Bridge [3], which provided some useful plumbing. But I didn't use any of jQuery UI's actual widgets. I also used $.widget for jQuery pie menus [4].

If there's a better alternative or idiom than $.widget, I'd love to know! But it worked fine for me, and I didn't need to drag in the rest of jQuery UI.

The weird thing about jQuery is: a "jQuery object", the result of querying a selector, is not an actual widget or DOM object -- it's the result of a query, which might contain any number of "objects", or none. It's ephemeral, not for storing persistent state like a widget.

So you need another way to represent and bridge messages from "jQuery objects" created by querying selectors, to actual stateful "widget" objects associated with concrete DOM objects, and that's what $.widget provides.

It creates a new "widget" object the first time you call it, and after that it updates and sends commands to the existing widget (or widgets).

Because of the way jQuery selectors work, you can actually create and configure a whole bunch of widgets at the same time with one $.widget command! Which is useful: "make each object with this class an instance of that widget with these parameters". And you can use $.widget with jQuery selectors to update parameters and broadcast messages to multiple widgets at once.

Suffice it to say, it's not how you'd design a user interface widget toolkit if you were you starting from Scratch [5]. But it is, if you were starting from jQuery.

[1] http://donhopkins.com/home/prototype/prototype.html

[2] http://api.jqueryui.com/jQuery.widget/

[3] http://api.jqueryui.com/jQuery.widget.bridge/

[4] https://github.com/SimHacker/jquery-pie/blob/master/javascri...

[5] https://wiki.scratch.mit.edu/wiki/Smalltalk

Re: The Future of JQuery UI and JQuery Mobile

#96

Earlier quoted context omitted.

Array.from(document.querySelectorAll('.myclass')) .forEach(el => el.style.display = 'block')

Though ie11 doesn't have Array.from()

I tend to polyfill older browsers, Array.from is a pretty small one. Sad thing is at a point where it's probably worth it to have 2-3 builds in place... 1 for legacy browsers, one for modern without modules, and one for modules/import/http2 support.

Just haven't taken the time... at least the main app I work on at work doesn't need to support IE11. Latest Edge,, Firefox, Safari and Chrome ... and Chrome is the primary target.

Re: The Future of JQuery UI and JQuery Mobile

#97
post #62

Earlier quoted context omitted.

I tried to use jQuery Mobile for a project once many years ago. It was a disaster, I ended up rewriting the entire thing

If you have to select a mobile framework today, what would you choose? I play with Framework 7 https://framework7.io/ and it looks very nice. Any other suggestions?

F7 is my favourite as well. Two of the featured apps on the home page are mine :D
Post reply on HN