4 ms·
Is there some reason why browsers aren't split into a million pieces and worked on seperately? Most browser projects I see are tackled like giant monolithic pro
by SanderNL 3y ago
Is there some reason why browsers aren't split into a million pieces and worked on seperately? Most browser projects I see are tackled like giant monolithic projects.
For example, CSS seems like a constraint solver that has nothing to do with parsing HTTP requests. Even parsing CSS itself has nothing to do with laying it out. Rendering is another step altogether that also has very little to do with anything. I can see these things being split into standalone and testable libraries with limited scope. Maybe I'm wrong though. I often am.
A "browser" seems like an "operating system". There is so much going on and I can see how a "browser" could be made out of myriad existing components in various amounts. A bit like the various Linux distributions and their particular choices of underlying tools and frameworks. You don't do it all at once, you got a million separate small chunks working together (if you're a Unix kind of guy..)
Maybe we should all work on creating as much small composable components as possible and then let the other guys slap a nice UI on top of it and put a bow on it. This is probably not practical, but a guy can dream.
- hnarn 3y agoDepends on what you mean by "browsers". Take the V8 JavaScript engine for example, it's used in Chrome but can also run stand-alone (I think node.js uses it). I'm not involved in this space at all but I would guess that the main problem with writing browsers isn't that they're all obfuscated monoliths, but that the amount of work to create an entire browser composed of solidly interconnected parts is still a huge amount of work, because of exactly what you said, it's almost an operating system, at least when you look like fully featured browsers like Firefox and Chrome.
- SanderNL 3y agoBellard’s QuickJS is a good example. It’s 100kb vs V8’s 40mb and for open source purposes plenty fast for a web browser. We need more QuickJS and libcss and rendering backends, not “browsers”.
- Ono-Sendai 3y agoThey are split up. Take a lot at the chrome source, it pulls in dozens (hundreds maybe?) of c++ libraries.
- SanderNL 3y agoThat’s not the kind of split I mean.