> [leverages] WebKit on macOS, WebView2 on Windows and WebKitGTK on Linux.
So cross-platform compatibility isn't guaranteed, unlike Electron.
> [leverages] WebKit on macOS, WebView2 on Windows and WebKitGTK on Linux.
So cross-platform compatibility isn't guaranteed, unlike Electron.
With the usual compiler / transpiler stack, you'll have a nice, fast-to-market, non-esoteric development environment. All without the need to ship 100MB binaries.
Not that that would fix the situation, there are still rendering inconsistencies between browsers when using stuff like margins floats and tables.
Having web developers learn C++ and Qt instead would be much more unacceptable.
The platform changed significantly, improved significantly, in the past few years, some of these major advancements can't be ignored just because a browser doesn't implement them.
> The polyfill supports just a limited number of proxy 'traps'. It also works by calling seal on the object passed to Proxy. This means that the properties you want to proxy must be known at creation time.
i.e. that's not a polyfill for Proxy. It's a polyfill for a subset of the thing, maybe that's useful for somebody, but it's useless for the use cases I had for Proxy so far.
Shipping an entire regex engine with your app: right, that's the only way to do something like that. Not that that's actually the same thing though, I can't just load this and use lookarounds as normal, i.e. it's not a polyfill.
For all practical purposes these features are not polyfillable. If your idea of a polyfill includes not actually polyfilling the entire thing or shipping an entire engine with your app then sure, anything is polyfillable, you could even run Java in the browser.
You mean like shipping an entire 100+ MB browser and rendering engine with your app?
Less testing, less bugs. Whats not to like?
Contrast to Chrome first developers who often get caught by cross browsers incompatibilities just like they did back in the days when they were IE first developers : )
Writing for a standards compliant browser like Firefox makes your code more well defined today just as it did back then because you won't get away with the same sloppyness. (This also makes you catch and fix problems in early iterations over the problem instead of after QA calls to complain so it saves you time and context switching too and if you are good you might look like a cross browser superhero almost for free ;-)
Earlier on not every basic thing was supported everywhere, many people here will remember the ACID tests. Younger devs won't remember them as we stopped talking about them after every browser became compliant. Today every mainstream browser has comprehensive test suites to cover everything we need from CSS I think.
How?
> caniuse.com kinda works better for that as you get data about other browsers too.
caniuse.com is nice but unlike using a standards compliant browser it requires you to be mentally alert and aware of it.
Using a standards compliant browser means you'll see the result of sloppy css immediately on the screen.
Sorry I meant "Firefox" and "Chrome-only" there.
In general though it's not like Firefox is spec compliant and others aren't, pretty much every browser works a little different in some areas. Just for the sake of saying something verifiable: no browser is spec compliant because the spec mandates a precise maximum length for strings and each main browser has a different, arbitrary (= I have the RAM, they just won't let me use it), lower limit on that.
I'm not entirely sure how I feel about this statement (and comparison to IE). If anything, Safari is "the new IE" rather than Chrome.
MOST (hopefully the nitpickers pick up the caps lock) stuff in Chrome are drafts or standards.
Sure, Google pioneered/championed some of them, but that's kinda irrelevant if developers voted for those features. There's very little Chrome-specific stuff.
Also, other browsers have vendor specific stuff in them too, yet people rarely fling shit in their direction?
FWIW I also mostly use Firefox for dev because I prefer how some devtool features are designed/implemented.
Most of my cross browser issues in FF were "brief" in the senses that they were bugs that got fixed eventual.
Some people who either don't know history or willfully ignores it keeps claiming that Safari is the new IE, at one point one even made a webside out of it.
Don't fall for it.
Chrome is the new IE:
- technologically advanced? Check!
- implement a number of things without asking or waiting for consensus? Check!
- will be abandoned as soon as they have crushed every competitor? Well, it is produced by the worlds most famous company when it comes to killing its own software.
Next up, Microsoft is going to abandon Word. Also, Facebook is going to abandon Facebook. This is why no one takes these conversations seriously. All vitriol, no substance.
I doubt google would spend much on chrome if no other browser were popular.
Fork Chromium.
Love, Your Old Users
Sure, some piece of software will have that name, but it won’t be aggressively developed like MS abandoned IE a few times.
I also won’t be shocked if Word or Facebook are like Edge where it’s a new different thing with an old name.
There are plenty of gotchas in layout/rendering as well, where either the standard is under specified, or Firefox has some small bugs. Maybe Chrome has many-chrome only APIs, but the developer will always need to test in Chrome and iOS Safari 13 (or whatever your oldest supported iOS version is).
Chrome and iOS are where the users are, and a good website or app should be usable and beautiful for everyone.
1/5, would not recommend. (But sometimes there's no way around it.)
Just wondering where you're getting "30 years" from?
That asked, a Chrome-shaped monoculture doesn't help anybody. We need more competing implementations, not less. Anyone feel like collaborating on such?
But this it not for "web devs", but for general UI development on desktops. Given some conventions there are decades old 4-5 years does not sound very ancient in comparison. And for desktop you probably want to trade bleeding edge hotness for tested and tried methods anyway. 4-5 years on desktop is a very brief span of time.
No it's not. "Web dev" is one of the things in my toolbox and I still clicked on this well-knowing it was likely not truly cross-platform and keeping up with bleeding-edge features.
Truth is all development is about tradeoffs and Electron is one heck of a blob to ship to users... in a lot of applications a lighter weight artifact may be desirable where the trade off of the last 4-5 years of browser advancements may be perfectly OK.
Is it unacceptable? Sure - if your application needs features out of the last 4-5 years of browser advancements... but that's not most applications. If you need a bleeding-edge solution that's truly cross-platform then Electron clearly still is your choice as you're just shipping around a fancied up Chromium.
Render-wise, browsers are pretty uniform these days. I experience very few problems in this regard, and my app Pony runs out of the same web codebase on all platforms (iOS, Android, web). The worst offender is Safari, but it’s not that bad. The potential gains from something like Tauri (and I plan to try Tauri for Pony desktop) far exceed the compatibility concerns for me (which I’ve already had to address due to web).
- The performance you are going to get will be terrible compared to the native implementation.
- Oniguruma, which I think is Ruby's engine, weighs half a megabyte on its own, that's comparable to the core bundle of the app I'm working on. That's a lot to my eyes.
- If you need to use this engine in dependencies that just assume that lookarounds are available then you are going to need to fork every single dependency just to wire it with the regex engine you compiled, super messy.
.clearfix
However the only reason I ever used the clearfix hack was when using float to do layout. I haven’t done that for ages (i.e. since CSS grew to include flexbox and grid). And I only ever use float to—well—float images inside text where the inside display is always inline. So I haven’t ever seen a need for display flow-root in the wild... Although I’m sure it exists.
That said, I hate electron. I hate that I have to run 4-5 instances of chrome on my machine all day long for various different apps instead of the developer checking that their stuff works across the 3 main rendering engines.
The world has circled back to the bad practices around IE 6! History doesn't repeat, but it sure does rhyme!
[1]: https://developer.mozilla.org/en-US/docs/Web/Media/Formats/A...
Personally, I view Safari in 2022 the same way I viewed IE in 2012 - as a backwards browser holding back web development because the company developing it just doesn't care about the web. The compatibility issues aren't as bad, but I have to care about Safari because iOS still won't let any browser use anything other than WebKit, where there was a point where saying "Anyone choosing to use IE11 deserves a bad experience" made a certain amount of sense. No one gets a choice on their iPhone, so Apple makes things harder for web developers, probably because they want them all to be iOS app developers instead.
Safari development does seem to go through spurts, depending on who is working at Apple. Let's not forget that in the past, it's been a major driver of web innovation, particularly in the late 2000s to early 2010s.
If I'm building an electron app, it's because I need native code running in nodejs/V8 as native addons, often in the render process, or I'm using bleeding edge APIs not available on Safari.
This type of framework is simply not an option.
It isn't a problem that's so difficult it requires wrapping a 60Mb runtime around every individual app instance.
The world has more than 3 billion internet users
It's called accessibility, and it's a very good thing.
Also, on the web, firefox still exists.
Gecko comes from the heritage of Netscape. Blink comes from the chain of KHTML > WebKit WebCore. They don't share any points, while Blink probably wouldn't have existed without WebKit.
But yes, today there are differences between WebKit and Blink.
> Not sure how familiar you are with the history of browser engines, but Blink and WebKit are definitely more similar than Gecko and Blink.
I see we interpreted parent poster differently, he wasn't talking about the history of rendering engines, but rather compability with the various web specs. Since Chrome forked WebKit quite a long time ago now and Blink has been reworked quite a bit they have deviated from eachothers implementations. Since everyone is trying to follow an open spec it might be that in certain areas FF and Chrome implement more of the same API's than Safari, which doesn't have anything to do with codebase history.
You might and probably will feel more comfortable in the WebKit codebase if you're a Blink developer or vice versa in comparision to Gecko, but that is if you're writing the engine itself and not pressing the pedals (targeting it).
As someone who has been playing with some web dev in early 2000s, that sounds funny. Gecko, WebKit and Blink seem very consistent to me. I remember dealing incompatibilities between IE6 and "standards-compliant" browsers (mainly Firefox/Mozilla Suite back then). And don't get me started on dealing with "classic" Netscape!
`<layer>` tag anyone?
There are some significant differences between engines when it comes to things like local file access, but that’s what the native component of electron/tauri/etc is there for.
Web views are less standardized though and require more finesse.
Firefox and Safari are very much at parity. Chrome ships ~40-70 new "standard" APIs every month or so: https://web-confluence.appspot.com/#!/confluence
I really don’t care if my hello world UI is 60MB to download, I care that it consumes 1 GB of my precious ram to run.
How is running js with a rust backend any better than running js with a C++ backend?
I guess your “backend” is rust here, which is nice (because I <3 rust), but tell me this won’t sit there guzzling all the memory it can get it’s hands on for the UI?
Ie. really, do you get meaningful benefits from using this over say, literally just using https://github.com/webview/webview?
... if you happen to run other browsers and apps using this WebKit / libwebkitgtk / webview.
and that embedded apps won't be obese frontend code with bazillion npm dependencies and a heavy, all too widespread framework, of course.
Hopefully, developers turning to Tauri will have some sensibility to lightness.
lot of people cares, they may have a slow connection, must pay per MB and so on.
There is no reason why hello world UI should be 60MB.
A 60MB download would have been fine.
Indeed, with the annoying habit of proprietary software to install "Download managers" that download the actual software, I would be happy for just a 60MB runtime for the actual program itself.
60MB, even today, is really big when you have to download it while boarding a train or with poor connectivity (even in rich countries, just being in a metallic building is enough for 60MB to be painful to download.
And 60MB would have been a couple of hours, not bad to wait for some software.
It wasn't prohibitive to do this.
Indeed, I seem to be back at square one, as downloading a AAA game for me once again takes about a day.
It was absolutely prohibitive for the average person with a shared line, and the direct comparison to shared line today is a metered connection. Even in the US it can be as much as $30 per gigabyte which would make that 60MB download cost $1.80.
To be short: if you can make your app less greedy - do it.
In some cultures we have a concept of "engineering conscience" (ru: "инженерная совесть"). Are we loosing all that?
https://github.com/tauri-apps/tauri/discussions/3162
> FabianLars, 3 hours ago, Collaborator
> ...for example my somewhat simple app uses ~120MB
> But only ~5MB is the actual tauri/rust process, the rest is WebView2.
So, if 60MB is a large download, surely a simple app using 120MB of ram is pretty outrageous too?
> There is no reason why hello world UI should be 60MB.
Absolutely, but you can't have everything. Fast. Small. Doesn't use any memory. Easy to develop for. Free. Consistent cross platform behaviour.
You can't have them all.
So... the question isn't "is 60MB ok?"
The question is: What do you care about the most? Is it really the download size?
It's not the download size for me.
Maybe you are referring to Gtk/Qt vs. win32 etc. with their integrations in the operating system. I agree that they look and feel the best for their respective OS, but eventually require you maintain multiple unrelated codebases. It is understandable and necessary for this approach to die. A middle ground would be best, say, Qt support on all existing platforms. Or more likely, prettier browser defaults for standard elements like lists and tables, with browsers themselves respecting the underlying OS theme. Probably never gonna happen...
Why? I guess because webkit-gtk is less ram hungry than blink.
> I really don’t care if my hello world UI is 60MB to download,
If you're writing Hello World for fun, then sure. But _I_ won't be using any of your software if it's that bloated. I'm not going to even complain to you about my internet connection or hard drive space or personal preferences. If you are not going to respect my resources as a dev, I will not use your software. Just like I won't ride with a cabbie who curses and cuts off other drivers.The issue is most common on games that release on consoles, but also for ones that want to support older hardware: the audio formats they use are designed to minimize the amount of decompression necessary for play, and so reduce resource requirements in exchange for storage space.
Would you argue the same for a 60 MB Hello, World application?
I assume this to be a conversion killer. If you have to wait 10 min do download you loose interest in trying it out.
Sure, if your app is just a faux-native variant of something that is developed for the browser anyways nothing is lost, but if it's an offline first application that just happens to use web tech for UI the difference is huge.
</obligatory physics joke>
It might mean more testing for developers, but it's a benefit for users.
If not, what's wrong with it "spread[ing]" everywhere?
It's hardly lazy dev work. It's a pragmatic approach to developing cross platform apps quickly. Apps that, it might be added, don't have a horrendous UI, which is common with other frameworks.
Because then it's a monopoly. I'm taking shortcuts but having a single browser engine controlled by a single company means that you rely on that company to define what is tomorrow's web like.
I get that same feeling when I open an program using it; kind of a 'oh...' slight disappointment. I get that it makes sense sometimes for a developer to sacrifice performance and size for ease of development... but as a user, it feels like a loss, a sign the developer will be taking too many shortcuts, or that I just won't like their general design philosophy.
While part of being a web dev unfortunately is also dealing with this you can't necessarily blame web devs when Safari breaks IndexedDB for the nth time, or when after using ES2018 features like regex lookarounds you discover that Safari still hasn't implemented them (which year are we in now, 2022?).
You may also discover that mobile and desktop browsers work differently in some aspects, not everybody even has the resources to test every single thing in 3+ desktop browsers (which may require at least 1 VM already if you are not developing on macOS, which I think might even be illegal to run in a non-mac hardware, bizarrely) and 3+ mobile browsers (which may require at least one physical device or a macOS VM for the iPhone, and another physical device or another VM for Android, and all these VMs aren't exactly lightweight).
Besides an Electron app doesn't necessarily have to run anywhere else, there's no point in checking compatibility with Gecko when your app never has to run there.
At this point why not focus on some actual GUI toolokit, like write a Qt clone in Rust, for real world apps we don't need all the CSS and HTML crap, you need simple layout, GUI components and an option WebView you can embed in the app if needed. Probably there is no commercial interest to pay professional developers with real experience to implement this.
I understand both, I don't agree with either more than the other.
WPF has amazing layouts.
CSS is irritating as hell. Even modern CSS, justify-content, justify-items, seriously?
Flex has so many weird edge cases it is overwhelming. I have used flex type systems in other frameworks that worked 10x better, while Flexbox is way better than what existed before on the web, it is still and endless source of frustration.
And yes, Winforms is 100x more productive than HTML. Awhile back I designed a fully functioning UI in Winforms to get an idea what I wanted my website to look like. I hadn't used Winforms in years. Took me less than a day to get a UI up and running with data binding to my backend and all the features implemented.
TWO MONTHS of web dev later I had the same thing working in a browser.
Now the browser was styled, and responsive, sure. But 2 months vs 6 hours. The loss of productivity there is insane.
What a Qt or other similar frameworks gives you is consistency, all components in all apps will look and work the same (with the exception of customized ones). This means you can focus on UX and not on bad design. My experience is that some bad designer will force his opinion on the users, will force his preferred fonts, font sizes and font colors on the users(making text hard to read), will disabgle text selection for some weird reason, will fuck with the scrollbars because the native ones are ugly etc.
For a working app that is not a music player you don't need the "power" of css, say you seen video games have a small Launcher/config window that hase buttons,drop downs, checkboxes , I noticed those use Qt or Windows Forms. I am also noticing that modding tools , open source tools (that are not GNOME) also focus on functionality and you will not see buttons with round corners, fancy fonts and animated borders.
IMO Electron advantage is not his the "powerfull"css and html and it is that you can reuse the existing node ecosystem and existing web developers and the alternatives are also lacking for higher level languages (GTK is shit IMO)
There is: flexbox and grid. All kinds of alignment can be done with basically a one-liner in both layout systems, without any hacks.
You missed the part with "there should be ONLY 1 way". I know about flex and grid, this are new and thanks the gods we finally we have something decent (not good).
Flexbox is great I wish to magically remove or magically fix all the code that does not use it and instead uses "float" or other shit.
You would say "don't use the other old shit" but my point was that we need a GUI framework that does not have 1 million lines of code for supporting this old stuff. If we really want to use HTMl a language for documents to write GUIs then we should make a new version that is the modern subset of html and css, where you ONLy have 1 way to do a thing (remove or limit the use of float, don't support all boxing models, simplify the layout rules so I don't have to google and find that to make something to work I have to set min=width=0 so the css engine follows a different path and does the correct thing)
Yes, Qt4 is not compatible with Qt3 , Adobe Flex4 was not compatible with Flex3 , I only used at that time this new versions and did not had to work or learn the old stuff. Old projects continued to use the old stuff and continued to work.
It’s amazing how fast the browser can be for this (and tiny) when you aren’t using querySelectors, vDOM, or event listeners.
How do you handle the nuances of GUI and input handling?
Instead of querySelectors I use things like getElementById, getElementsByClassName, getElementsByTagName, and some custom DOM navigation utilities I wrote for this application like getAncestor, getModalsByModalType, getNodesByNodeType, and so forth.
You don't need any kind of framework or fancy wiring to work with events. You always know what you are working with from within the event handler, because event handlers receive an implicit event object as their first argument. From that there is event.target which returns the element the handler is assigned to or event.currentTarget which returns the element the user interacted with that fired the event after bubbling.
State management is also just as easy.
It's more work to reinvent those wheels than bind to them.
Is there something like WebkitQt? Guess it would use WebEngine.