Live data from Hacker News

Orb is a free and open source web desktop

gitlab.com

61–70 of 146 posts

Re: Orb is a free and open source web desktop

#61
post #53

Earlier quoted context omitted.

jQuery is completely unnecessary now, you can use the built in element selectors to do all the same stuff without pulling a huge lib in. The value in jQuery was acting as a shim to smooth over IE's deficiencies back in the day. Now, its a waste of bandwidth.

jQuery is a few kilobytes not some huge libruary. You can do it n pure js but jQuery allows you to do it in less lines of code and cleaner.

There are only a few cases where that's true today. Probably 90% of the functions that helped a lot before have been implemented by browsers natively today.

Re: Orb is a free and open source web desktop

#62

Earlier quoted context omitted.

What is so special about string templates that they should be have a different naming scheme? And $ really won't ease your life to search with regexp. Would it only depends on my own preferences, I would use only letters and dash for any identifier in code bases I work with.

> What is so special about string templates that they should be have a different naming scheme? The fact that you have to distinguish between literal strings and interpolated values

Maybe string interpolation is just a bad idea. Let strings be strings, use string formatting functions if you want to shove data in them.

Re: Orb is a free and open source web desktop

#63
post #53

Earlier quoted context omitted.

jQuery is completely unnecessary now, you can use the built in element selectors to do all the same stuff without pulling a huge lib in. The value in jQuery was acting as a shim to smooth over IE's deficiencies back in the day. Now, its a waste of bandwidth.

jQuery is a few kilobytes not some huge libruary. You can do it n pure js but jQuery allows you to do it in less lines of code and cleaner.

Made a mostly minimal status page app thing for some services based development and ripping out the jQuery used during prototyping cut the total load by almost half. There are some use cases where skipping even small but unnecessary inclusions can make a measurable difference.

Re: Orb is a free and open source web desktop

#64

Earlier quoted context omitted.

We are, indeed, in a world where Jquery is now the preferable choice. Frontend development is going through what video games went through in the 80s, so much new shovelware every day that people are eventually going to get tired of it.

jQuery is completely unnecessary now, you can use the built in element selectors to do all the same stuff without pulling a huge lib in. The value in jQuery was acting as a shim to smooth over IE's deficiencies back in the day. Now, its a waste of bandwidth.

jQuery was a browser normalization layer and one heck of an API for DOM manipulation.

The first is thankfully not needed anymore, the second hasn’t been matched in simplicity and power by the native one, unfortunately. Not by a long shot.

If you don’t believe me, check out one of the “You Might Not Need jQuery” sites. They read much like “you might not need firelighter, stones and sticks are all you need”.

Re: Orb is a free and open source web desktop

#65
post #62

Earlier quoted context omitted.

> What is so special about string templates that they should be have a different naming scheme? The fact that you have to distinguish between literal strings and interpolated values

Maybe string interpolation is just a bad idea. Let strings be strings, use string formatting functions if you want to shove data in them.

Or maybe they're a very nice convenience, which is why a lot of modern languages are implementing them.

String formatting functions use special strings themselves.

Re: Orb is a free and open source web desktop

#66

Earlier quoted context omitted.

but it's not as extensible. I know GTK uses JS and CSS but I'm not talking about that. I'm talking about something made purely in HTML + CSS + JS. Something like this: https://macos-web.app/ If only these could support native Linux apps somehow (through a WM).

chromeos?

Built in Flutter, I believe.

Re: Orb is a free and open source web desktop

#67

Earlier quoted context omitted.

jQuery is completely unnecessary now, you can use the built in element selectors to do all the same stuff without pulling a huge lib in. The value in jQuery was acting as a shim to smooth over IE's deficiencies back in the day. Now, its a waste of bandwidth.

yeah, I'm very glad that we have a dozen and a half Javascript libraries that aren't jQuery instead!

GP isn't saying you should use React, they're saying that if you don't need React you probably don't need jQuery either and you might as well just use pure Javascript. Most of the functions people used jQuery for are natively supported in every major browser that runs Javascript, and the few that aren't have decent polyfills.

I mean, let's be real; most of what people were using jQuery for was stuff like `querySelector`, `closest`, `classList`, etc... For those people, pure Javascript is JQuery now. If you don't want a framework and you don't want reactive/declarative interfaces, then you probably don't need a library.

I would say the same thing (maybe to a lesser degree) about "standard" libraries like Lodash. Native Javascript has a `reduce` function now, it's widely supported. And if you have to target any of the very few browsers that don't have it, then polyfilling is (usually) the better choice. See also Blueberry and promises; just use JS promises, they're fine.

Re: Orb is a free and open source web desktop

#68

General question: Is there an actual use for this kinds of projects, beyond showing what can be done? I have seen many different "web desktop" projects and while most of them were impressive in their own (technical) ways, I could never see the an actual use case for them.

We talk about have consistent desktop experience everywhere. This provides exactly that. Your desktop is everywhere you go.

What sucks is, you need a whole browser for it. What sucks is, I think that's the only way to do it. A full on VM to make it real.

I would use this if the browser stack had more promise of not changing for 50 years and not owned by Google. Unfortunately our last place of freedom is native execution.

Re: Orb is a free and open source web desktop

#69

Went to the demo, instinctively used `cmd-w` to close one of the "desktop" windows, and was quickly reminded of one of the limitations of building an application like this inside a browser. Note to developer: you may want to add an `onbeforeunload` handler

I heard you can fix that with Alt+F4. Seriously though, this is my biggest gripe with building for the web. You are limited in interactions to what the browser allows and at the end of the day it’s an app inside a sandbox-ish container with an app inside a shadow-dom. WASM full-screen, full-hardware, experiences have yet to take root. It’s getting there.

Re: Orb is a free and open source web desktop

#70

Earlier quoted context omitted.

We are, indeed, in a world where Jquery is now the preferable choice. Frontend development is going through what video games went through in the 80s, so much new shovelware every day that people are eventually going to get tired of it.

jQuery is completely unnecessary now, you can use the built in element selectors to do all the same stuff without pulling a huge lib in. The value in jQuery was acting as a shim to smooth over IE's deficiencies back in the day. Now, its a waste of bandwidth.

In my professional life, I use jQuery daily, in my personal projects, almost never. BUT that doesn't mean jQuery doesn't have certain niceties that plain-old javascript doesn't. But implementing them in modern javascript is only a few lines of code, so I end up with my own micro-jquery usually by the end of a project, because I will implement a feature from jQuery I like that doesn't exist (or at least, that I don't know about).

I usually do something like:

    const $ = function(selector) { };
at the start of every project, implement document.querySelectorAll, then return an object with a handful of functions like on(event, callback), off(event), one(event, callback), attr/data/prop(name[, value]).

All of them are basically just tiny

    $('.selector').one('submit', () => false)
is a lot nicer than

    document.querySelector('.selector).addEventListener('submit', () => false, {once:true}).
Post reply on HN