Live data from Hacker News

The Future of JQuery UI and JQuery Mobile

blog.jqueryui.com

61–70 of 97 posts

Re: The Future of JQuery UI and JQuery Mobile

#61

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 github thread was maddening to read. They actually got a lawyer to chime in with their explanation for why the new CLA is needed, and then we got this nonsense:

> Among other changes, the updated CLA gives the Foundation the ability to re-license contributions under Apache 2.0.

But they already said:

> There is no need to get new signatures for old contributions

So they're not planning on getting all old contributions to be updated to the new CLA, but they think the new CLA will let them relicense the entire code base under Apache 2.0. That's not how that works! But it gets worse, because when challenged the lawyer quotes the updated CLA language:

> You understand and agree that the JS Foundation projects and your Contributions are public and that a record of the Contributions (including all metadata and personal information you submit with them) is maintained indefinitely and may be redistributed consistent with the JS Foundation’s policies and the requirements of the Apache v2.0 license where they are relevant.

"You [...] agree that [...] your Contributions are public and that a record of the Contributions (including all metadata and personal information you submit with them) [...] may be redistributed consistent with [...] the requirements of the Apache v2.0 license where they are relevant."

That's clearly saying that they may need to provide people with the record of your contribution in order to prove that, eg, the Apache v2.0 license is being complied with. It is not an agreement that your actual contribution is licensed (or can be relicensed) under the Apache v2.0 license.

This is just magical thinking. You can't just mumble the words "Apache 2.0" somewhere in the general neighborhood of a legal document and have it magically relicense years of contributions. You certainly can't make people agree that metadata about your contribution can be shared with some people, and then expect that to magically change the license under which the contribution itself exists.

Re: The Future of JQuery UI and JQuery Mobile

#62
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 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?

Re: The Future of JQuery UI and JQuery Mobile

#63
When I used it many years back, both UI and Mobile, I found it kludgy and odd. The UI wasn't all that pretty compared to Bootstrap so I just started using that and actually forgot about this entirely. I think that's where the actual migration started, with Bootstrap. The other frameworks started popping up later when jQuery wasn't scaling for UI code such as Ember and using Mustache then later Angular, then React, Angular 2, Vue, etc so now, so now jQuery UI/Mobile is completely irrelevant. I would also throw in Sencha extjs as dead too and classify that as enterprise jquery UI.

Re: The Future of JQuery UI and JQuery Mobile

#64
post #30

Earlier quoted context omitted.

Right, and that still doesn't handle applying the action to all _all_ items of that class. It would need to be something like this, though it still doesn't automatically handle inline vs block: document.querySelectorAll('.my-elements').forEach(function(el){el.style.display = 'block'}) And apparently there are issues even with that: https://css-tricks.com/snippets/javascript/loop-queryselecto...

For reference, this is how you do this in jQuery: $('.my-elements').show()

[deleted]

Re: The Future of JQuery UI and JQuery Mobile

#66
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 tried to use jQuery Mobile for a project once many years ago. It was a disaster, I ended up rewriting the entire thing

I had the exact opposite experience. I found jQuery Mobile to be very cohesive and simple to use. And the documentation was pretty much on the spot.

Re: The Future of JQuery UI and JQuery Mobile

#67

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...

Right, and that still doesn't handle applying the action to all _all_ items of that class. It would need to be something like this, though it still doesn't automatically handle inline vs block: document.querySelectorAll('.my-elements').forEach(function(el){el.style.display = 'block'}) And apparently there are issues even with that: https://css-tricks.com/snippets/javascript/loop-queryselecto...

Ok, I kinda got sniped on this. Here's a first pass at a micro lib to do it using Proxy object:

    const $ = (() => {
        function listProxy(arr) {
            return new Proxy(arr, {
                set: (t, p, v, r) => {
                    for(let x of t) {
                        x[p] = v;
                    }
                },
                get: (t, p, r) => {
                    if(t.length > 0 && t[0][p] instanceof Function) {
                        return (...args) => { Array.prototype.map.call(t, (x) => x[p](args)) };
                    } else {
                        return listProxy( Array.prototype.map.call(t, (x) => x[p]) );
                    }
                }
            })
        }

        return (sel, root) => {
            if(root === undefined) root = document;
            return listProxy(root.querySelectorAll(sel));
        }
    })();

    // use like this:
    $('.my-elements').className = 'Important'; 
    $('.my-elements').style.color = 'Red';     
    $('.my-elements').classList.add('Another');
demo: https://codepen.io/anon/pen/RxGgNR

Re: The Future of JQuery UI and JQuery Mobile

#68
> In the past, when someone wanted to join the jQuery UI or jQuery Mobile teams we expected them to contribute to the library as a whole.

I'm not sure about the accuracy of that. I was a jQuery UI team member in the '09 - '11 period (I can't recall exact dates) and I only worked on certain components, though I did participate in discussion and planning for the platform as a whole. It was also common for contributors/team members to pitch new plugins that weren't worked on by the entire team.

So maybe this is just jQuery UI getting back to it's open source roots more so than anything. I'm sad to see that the project has fallen on hard times, but I'm not shocked given the direction most of front end webdev has moved towards these days. The amount and types of UI frameworks and component libs available today are myriad. And at jQuery UI's peak (and hell, jQuery as well) there were only a few.

I'd like to add a meta-note that Scott Gonzalez was always great to work with, and if you want to read some interesting, independent thoughts, he's a good follow on the twitters.

Re: The Future of JQuery UI and JQuery Mobile

#69
post #44

Earlier quoted context omitted.

The page I linked has a compatibility chart that says Edge 16 has it (no idea if that's a planned release, haven't ever used Edge).

You can use Array.prototype.forEach.call(nodelist, fn), or Arrays.from(nodelist).forEach

I don't use Windows so I can't test it, but would this work as a polyfill?

    NodeList.prototype.forEach = Array.prototype.forEach;
In Chrome this even returns true:

    NodeList.prototype.forEach === Array.prototype.forEach

Re: The Future of JQuery UI and JQuery Mobile

#70
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 definitely less necessary than it was a few years ago.

I find it useful when you just want to add a little bit of interactivity to a mostly static page, and you're not sure who's going to be maintaining the page in the future or trying to use it as a template.

A lot of people who know a decent amount of HTML and CSS but aren't that familiar with straight JS dom manipulation, or what functionality works cross-browser, can tweak jQuery-based code more easily. That's really a tribute to the jQuery project--the documentation is simple and a lot of the methods (e.g., show, hide and append) are very intuitive.

Post reply on HN