Hacker News new | past | comments | ask | show | jobs | submit login

> The browser is so comprehensive in functionality and APIs

Not really. If you limit your scope by saying that you're building a hypertext document viewer, it suddenly becomes approachable. A lot of the functionality is all that PWA stuff no one asked for and no one is using for anything good anyway.

WebSQL? IndexedDB? Service workers? WebGL? WebGPU? WebBluetooth? WebRTC? Just act like it all doesn't exist. 99% of actual websites — not web "apps" — would not lose any functionality.




I asked for it, and a lot of other ppl did too. These are great features and removing them would cause more than 1% of websites to lose some functionality.

But, importantly, they shouldn't lose their core functionality (if they're written well) because that's the "Progressive" part of PWA. If you don't use the feature or your browser doesn't support it, the website should still have basic functionality. One of the big ideas behind PWAs is "progressive enhancement", where you layer on features that may not be supported everywhere but add value when they are supported.

And a progressively built browser that doesn't implement every spec goes hand-in-hand with that. I think having more under-featured browsers like that would push webdevs into caring more about progressive enhancement.


In a world where UNIX-inspired systems run most software, I like to imagine that it’s possible for a UNIX-like browser to become dominant.

Recall that UNIX (and C) were built (and adopted) in response to perceived over-complexities in contemporary systems.

Maybe in 20 years we’ll recall + interact with Chrome like how people in the 80s recall + interacted with Multics or OS/360.

To complete the analogy, I guess you’d expect to see this browser come out of former Safari interns/engineers at Apple.


> To complete the analogy, I guess you’d expect to see this browser come out of former Safari interns/engineers at Apple.

Sounds like Andreas Kling: https://www.techgamingreport.com/new-ladybird-web-browser-wh...


People interested in building browsers should look into WebKit. You can use that for HTML/CSS/JS rendering and save a lot of time/effort.


But the thing is that if I were to build a browser, I'd start from the requirement that websites should be treated like malware that can't be trusted. Applying my ideas to a preexisting enormous codebase feels troublesome.


"A lot of the functionality is all that PWA stuff no one asked for and no one is using for anything good anyway"

It is really hard to engage with your comment in a constructive way, if you start by insulting everthing on the web, that is not a simple document (with comments).

So I get it, you don't like the web as a plattform for apps. And it surely is not perfect. But do you have a better plattform independent alternative to offer?


I despise cross-platform GUIs as a concept, but if you must make one, there's plenty of options usable from most languages. Java has Swing, C++ has Qt, there's things like Flutter and WxWidgets and a dozen different GUI libraries for Rust. Heck, you can even build GUIs in Python with tkinter. Every single one of these options is much better suited for an app than the web stack.

My main gripe with using the web stack for building apps is that, unlike proper GUI framework, your platform is not made out of the same kind of code that you're writing. For example, there's a number of predefined layout algorithms that you can choose from and then control some of their parameters, but you can't write your own layout algorithm. You can kinda draw your custom controls, but both <canvas> and SVG are not without their own shortcomings compared to real GUI frameworks. A web browser is a glorified scriptable word processor so it's not surprising that it acts like one.

Yes, there are "paint worklets" and "layout worklets" as proposals. That kinda makes it better but still feels like an ugly workaround. The declarativeness of HTML and CSS, extremely awkward for building app-like UIs with, is also never going anywhere.


"but you can't write your own layout algorithm."

Of course you can - in javascript. What is stopping you? (except that you don't like it)

You can also ditch the DOM alltogether and only use the canvas/webgl and maybe your language of choice via emscripten and wasm, if you really cannot stand js/ts.

The web as a plattform is very, very powerful. The app you make, you can ship by simply sending a link. And people can just try it out without installing something and all quite save in a sandbox.

So none of your solutions are better suited than the web stack, if you intend to target the maximum audience with the minimum hazzle. You have to beat that, if you want to overcome the web.

Also, can you give me one example of a nice looking app in swing? Websites are optimized for enabling good UI and UX. Because the moment a user is confused - he is gone very quickly. And people can also customize their experience. I use dark reader and ublock.

HTML and everything around it is often a ugly chaotic mess, but a incredibly powerful one.


> Of course you can - in javascript. What is stopping you? (except that you don't like it)

If you mean by setting `position: absolute` and then using left/top/right/bottom to position your element, that won't work. You can't plug your code into the browser's layout dispatching mechanism to correctly react to size changes, reflows and all that. You can do that in any native UI framework.

> The app you make, you can ship by simply sending a link.

Depends on what it does. If it needs to store data locally and/or work with files for example, doing that on a website that runs in a browser is a pain in the ass both for the developer and the user. Last time I checked, if you want to generate a file for the user to save, you have to encode it into base64 and "open" it as a data: URI. Isn't that utterly bonkers?

> Also, can you give me one example of a nice looking app in swing?

IntelliJ IDEs.

> Websites are optimized for enabling good UI and UX.

Is that the reason there's so much whitespace everywhere these days? Is that also why all controls are so confusing that you sometimes have to try interacting with them to understand what they do?

> Because the moment a user is confused - he is gone very quickly.

Not everyone's goal is to simply have as many users as possible.


"If you mean by setting `position: absolute` and then using left/top/right/bottom to position your element, that won't work."

Erm, but it does? You can listen to resize events and you can get the exact width and height values of all the elements in the DOM. I am using that technic since I switched to the web (when box layout did not exist yet).

The only problem with this is, that you can create performance bottlenecks easily, as reading clientWidth might trigger a forced reflow. So it might not be easy at first to get everything right, but it is totally possible.

Also you can just use a different GUI framework or build your own.

"Not everyone's goal is to simply have as many users as possible."

Mine neither, but those who do (the majority) made sure, the web is suitable to be used by even the most tech illiterate people. My mother can surf the web to get mostly what she wants - but she cannot use a file browser, nor does she really know what a file is (and she does not want to know).

"> The app you make, you can ship by simply sending a link.

Depends on what it does."

Sure, if you want native file system access, you would be breaking the sandbox. And yes, this is my biggest pain point with the web as well - that it often cannot decide whether it serves untrusted websites or enables app developement where the user trust the app. For example there is no (easy) way to get the pixel data from html elements, because of security. Which makes sense for malicious add filled websites, but not when developing something real, where the user could give permission. Here the focus on the dumbest users who just all allow everything, so the browsers have to protect them and allow no one to use proper permissions is really annoying. Because yes, I also would just like to have file access and other things permissions don't allow.


Forget all of that. If you can run actual video games in a browser at 120fps, you can definitely achieve pretty much any UI/ux you can dream. Obviously, within resource constraints. But I don't think there's many UIs you can build that are reasonable and slow on the web but fast in Java swing (or whatever other UI framework you're using)


"PWA stuff no one asked for"

You don't speak for everybody.


I've yet to see someone take a PWA seriously.


Aren't you the developer of Smithereen (a fediverse server)? Nearly every other fediverse software has a web interface that can act as a PWA. I launch lemmy.ml and kbin.social as standalone PWAs from my homescreen. My pleroma instance also has some PWA features (though not standalone display mode). I don't use Mastodon, but @nolan@toot.cafe did some amazing work years ago to make it a really fast and responsive PWA (which has since been undone ).

It's ok if you don't like to use PWAs but that doesn't mean nobody does or that they're worthless.


> Aren't you the developer of Smithereen (a fediverse server)?

I am. But I'm biased because I'm primarily an Android developer who turned into a web and backend developer for some projects (I still do Android as well). So naturally, web app (not web site) development feels cumbersome to me. It's like trying to build a proper app UI with a souped up version of Word macros and layout engine. I much prefer native apps. Smithereen will have a client API eventually, when all features I deem necessary for version 1.0 will have been implemented. The large remaining ones are photo albums and discussion boards in groups. The yet-unreleased direct messages need some finishing touches as well.

> It's ok if you don't like to use PWAs but that doesn't mean nobody does or that they're worthless.

Well, that's my point — Chrome and Firefox and Safari, being "mainstream" browsers, try their best to satisfy everyone. They support PWAs, they have extensive accessibility support (that's scarily complex as well!), they implement all those APIs and standards that are complex but mostly unused, etc.

If I were to build my own web browser from scratch, it'd have a warning in the readme along the lines of "if you require accessibility and/or PWA functionality, this is not for you, use one of the more advanced browsers".


I’ve written many business process apps that are PWAs.

Install to homescreen is great for customers that don’t want to go through the app store yet still want their employees to have “an app” (something with an icon on the home screen).

Some are even offline-capable.


I've seen (many) people use and appreciate Google Maps, for one


You've never met anyone who's used Slack, WhatsApp or Airbnb?


As PWAs?


>99% of actual websites — not web "apps" — would not lose any functionality.

What percentage of user driven web traffic is done through 'web "apps"' and what percentage is 'actual websites'


IMO most of what people do on the web is either reading articles (these don't even need JS), watching videos (no advanced browser functionality needed either), or writing comments and messages (some rather simple JS if any).


No true websites use service workers, just like no true Scotsman puts sugar in his porridge.


Yes, if you arbitrarily define “Web site” to exclude most Web resources it is easy to declare victory. Maybe you can even have fun browsing some archived versions of Geocities pages.


> no one asked for and no one is using for anything good anyway

Speak for yourself. This is a crappy attitude honestly, you might want to keep an open mind on things you don’t have an interest in




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: