9 ms·
If I had a time traveling magic wand, the one Software Thing I would wish for would be that native, cross platform toolkits had won the war rather than the whol
by ryandrake 3y ago
If I had a time traveling magic wand, the one Software Thing I would wish for would be that native, cross platform toolkits had won the war rather than the whole industry punting and declaring The Web Browser to be the target platform, or these super-high-level Game Engines. For decades, I always hopelessly thought the OS and hardware gaps would eventually be bridged by something like Qt or SDL or wxWidgets, and we'd all one day be happily programming cross platform apps using plain old native languages and SDKs instead of Electron or the HTML/CSS/JS triad of pain. As the years go on, and OS vendors move even more towards their own proprietary incompatible native APIs, this dream seems less and less likely.
- swatcoder 3y agoPlatform innovation requires control over your own API, because you want to expose the features and architectures that make your platform excel and that weren’t accounted for in abstracted tools. There will always be incompatible native API’s. Meanwhile, a ton of apps and games are completely agnostic to those cutting edge platform differences and are going to thrive in least common denominator sandboxes. And making those sandboxes easy to use for some specific style/genre/skill-level is always going to be the competitive difference between them. So the big high-level things are always going to exist too. But… so are the near-metal abstractions that let you cut through and interleave cross-platform and platform-specific code even in high-performance paths. You wanted the last group to “win”, but the ecosystem inevitably involves all three. There will always be something like Metal, there will always be something like Unity, and there will always be something like SDL. Winning isn’t necessary.
- loup-vaillant 3y ago> Platform innovation requires control over your own API, because you want to expose the features and architectures that make your platform excel and that weren’t accounted for in abstracted tools. Yeah, I’m not buying that. It’s the story they tell you of course, but I think that’s a marketing lie. Let’s be clear first that hardware is the platform. Your comment seems to agree with that. Note that for quite a long time, the Windows and Mac world used the same hardware (same CPU, same GPU), and therefore the same platform. They could have went together and specified a common API to work on both MacOS and Windows, and they could both expose all the hardware has to offer. Heck, if they really wanted to expose all the goodness hardware has to offer, they would give us the actual data sheets. They don’t, for various reasons that are generally tied to "IP". They tell us sweet words about innovation, but let’s be honest they just want to lock us in.
- andybak 3y agoBoth things can be true.
- loup-vaillant 3y agoI was trying to respond to "Platform innovation requires control over your own API". The short answer "no it does not": look at CPUs, we just need their ISA to take advantage of any improvement. In fact, the best way to expose any hardware improvements is to give us the data sheet. Gate keeping direct access to the hardware with an API effectively reduces user access to innovation. One could criticise how I conflate hardware and platform. I’ll just note that all the goodness we’ve seen the past 40 years were made possible by hardware. Personally I saw precious little innovation coming from software specifically. So even if a platform is more than just hardware, actual innovation mostly comes from hardware anyway.
- pjmlp 3y agoEven UNIX isn't one platform, hence why POSIX is only good for CLI applications.
- nine_k 3y agoWhat would make such a platform less of a compromise than a web browser? How would programming in C++ be less pain than programming in JS / HTML / CSS? At the very least, JS code won't write past array bounds, or smash the stack. From relevant olden times, Lisp and Smalltalk environments were closest to the ideal. They were expensive though, and nobody distributed them for free, as Netscape did with the browser. They also notably lacked any protections against untrusted code. But worst of all, they'd likely run even more poorly on consumer PCs circa 1995. So, enjoy Typescript, V8, flexbox, canvas, web workers, etc. You could end up having a worse deal.
- AgentME 3y agoI think people really underrate browsers. The browser standards are open and have multiple open source implementations. People associate browsers too much with annoying trashy ad-based and other questionable websites to see how good they are themselves. Electron has an annoyingly heavy download size but it's not the only option for native releases of web-based apps. Windows and some other OSes have built-in browser widgets that can be used with Tauri.
- nine_k 3y agoBrowsers are absurdly well-optimized for performance. If you know how to tap it, you can make screaming-fast apps of various kinds, with top-notch graphics, font rendering, accessibility support, audio, video, etc. They also have really solid networking capabilities, as long as you don't need raw TCP or UDP. In particular, HTTP/2, HTTP/3, WebSockets, and WebRTC allow for a lot of advanced things. By now, you also have WebGL and WASM, if JS's JIT is not fast enough for you.
- ClimaxGravely 3y agoI've definitely seen some really well optimized web targets. Unfortunately that is not the common case in my experience currently. That said the WebGL/WASM stuff is generally very nice in my experience and is very much changing my opinion. I'm interested to see what comes in the future!
- ClimaxGravely 3y agoFor games SDL still gets a good amount of usage. As do a few other frameworks that I think fit your criteria if I understand you correctly. Examples - SDL - GLFW - Openframeworks - Monogame/FNA/XNA/etc - Haxe
- a1o 3y agoIf you think any of these will save you from the issues of cross platform development and platform specifics, in a different way from what is described by the post, you are wrong. You will still suffer with notarization and appleness, Android stuff being pressured by Play Store policies changing constantly, and every platform/store specifics, adapting controls, form factors, gestures...
- ClimaxGravely 3y agoI have used these for published cross platform development. They don't solve everything but they certainly make things easier. Some of the issues you are describing would still exist even if I wasn't using a cross platform library.
- Waterluvian 3y agoThere's way more than enough room for both given how many million UIs get made. I think more time should be spent wondering why cross-platform toolkits aren't good enough. It's kind of lazy to point at the incumbent and say it's their fault for some reason. Or framed this way: your dream exists and it's called Qt and can be used to make some absolutely fantastic applications[1]. What's deficient about it and why? [1] https://musescore.org/en https://musescore.org/en
- Kiro 3y agoSounds like you're talking about software and apps in general, not games. 99% of game developers do not use web technologies.
- IggleSniggle 3y agocough Switch cough
- ClimaxGravely 3y agoDoes switch use web targets a lot? I haven't noticed that personally (I tend to mostly only play first part switch games though)
- Kiro 3y agoDo you mean games or their UI? Or do you mean that people are not using web due to Switch not being a valid target? No idea how the platform works.
- modeless 3y agoFor that to happen, OS vendors would have actually had to care about sandboxing and security, to enable local execution of completely untrusted code without any gatekeeper. It's their complete security failure, still continuing today, that forces everyone to the web. The other, slightly less important thing is petty rejection of cross-platform APIs (e.g. Apple's refusal to allow Vulkan support in macOS). It's fine to additionally have platform-specific APIs, but there should be a least common denominator cross-platform standard. But middleware can smooth over this problem, while the security problem is something only OS vendors could fix. Unfortunately, the position of gatekeeper turned out to be so profitable that vendors don't actually want to improve their security to the point where it's unnecessary. And they're also incentivized to prevent the web from improving to the point where it would threaten their gatekeeper status.
- ugh123 3y agoElectron would be great if it weren't for the performance, security, configuration, and packaging issues. The latter two seem to be what OP suffered the most. html/css/js (and the frameworks on top of it) seem like a pretty low bar to build games and business logic for a variety of apps which, despite huge efforts from OP, could run on pretty much any modern platform.
- Andrex 3y agoIt's a shame opening local HTML pages is so heavily restricted in modern browsers. I mean, I get it, but we also might not need Electron if you could stuff everything into a single HTML file and let users download that as your "app."
- modeless 3y agoThat's what PWAs are supposed to be. Many if not most Electron apps could and should be PWAs.
- oldbbsnickname 3y agoNative is the only way to go. The problem of the mythology of cross-platform (pseudo-)development is having to know both the underlying platform AND the abstraction layer. This explains why RubyMotion, PhoneGap/Cordova, and Appcelerator/Titanium were flops, and so shall Microsoft's MAUI. There is nothing for free. Abstractions cost performance and confuse troubleshooting.
- zubairq 3y agoCould Flutter from Google be considered a good enough solution?
- halostatue 3y agoOnly if you don't value your battery life, usability, proper accessibility, or developer ergonomics with a language that has no raison d’être.
- Apocryphon 3y agoWhat's the evidence that battery life is substantially worse than native? Take this performance for example. https://www.orientsoftware.com/blog/flutter-vs-react-native-performance/ https://www.orientsoftware.com/blog/flutter-vs-react-native-... While the framework had issues with accessibility in the past, seems like they've been adding a lot to improve it. https://www.kodeco.com/35275067-flutter-accessibility-getting-started https://www.kodeco.com/35275067-flutter-accessibility-gettin... Dart is a simple, no-frills language. It's not used outside of Flutter but what is wrong with its semantics or anything inherent about it?
- cageface 3y agoFlutter is actually pretty close to this right now. I'm building an app that targets Windows, Mac, iOS and Android and so far it's working really well on all of them with more than 90% code reuse. If Google doesn't give up on it I think it's going to be a much better stack for cross platform applications than the browser is.
- Capricorn2481 3y ago> If Google doesn't give up on it I think it's going to be a much better stack for cross platform applications than the browser is. When I read this, I don't know if you're saying it's not ready yet or something. Is it close but not there yet? Do you experience bugs?
- cageface 3y agoNo so far I've had a great experience with it. But keeping up with new improvements and changes to the underlying platforms is going to require ongoing investment. Hopefully google continues to think it's worth it.
- halostatue 3y agoFlutter has a multitude of problems, at Google's inability to support anything long-term is probably the smallest. Flutter apps don't look or work like native apps, and the only people who will put up with that are people who have to do so because their enterprise mandates it. Flutter apps have horrible battery performance. Flutter apps are always at least six months behind what is possible with native toolkits and SDKs. Flutter apps use a language that literally no one other than Sass or Flutter developers actually want to use and that offers exactly no benefit over the dozens of other possible languages out there. Flutter is Java Swing, but worse in pretty much every way.
- cageface 3y agoThis doesn't match my experience at all. It's leagues ahead of react native in memory usage, disk space, responsiveness etc. Users are used to apps that don't look much like the out of the box platform toolkit by now. Even apple isn't very consistent about this anymore. Native is better if course if you have the luxury of writing your app twice or three times but not many of us do.
- livrem 3y agoEven without the time traveling, I would be happy if there was just a single stable, non-bloated, reliable, portable platform that could be used for when you just want to Write Once and then know that it will Run Everywhere _forever_ (* insert disclaimer about nothing literally lasting forever). Not something that rolls out breaking changes every six months. Or six years for that matter. Would not even have to be an entire API, just a clear declaration that a subset of some APIs will never change, and some tool to verify that my code did not accidentally use any of the other parts of the API. Unfortunately running things in a browser is no guarantee, even for those that would otherwise consider that a good option. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... https://developer.mozilla.org/en-US/docs/Web/HTML/Element#obsolete_and_deprecated_elements https://developer.mozilla.org/en-US/docs/Web/HTML/Element#ob...
- oli-g 3y agoIsn't .NET Core pretty much what you're describing at this point?
- livrem 3y agoI must admit I never looked at that ecosystem. Does it just happen to have been quite stable or is it a serious design decision they made and are sticking to? From a quick search I do not get the impression that .NET has been deprecating parts of the API, including Core APIs, in the past, e.g.: https://learn.microsoft.com/en-us/dotnet/core/compatibility/fx-core https://learn.microsoft.com/en-us/dotnet/core/compatibility/...
- stanac 3y ago.NET was pretty stable. I remember porting old .NET Framework 4.x MVC web app to .NET Core 2, and then to .NET 5. Both times it took less than an hour to port. Old directory structure and APIs still work even if they are not the new hot way to do things. Microsoft is known for backward compatibility.
- 3y ago
- bullen 3y agoThe Java Applet was this. Flash also was this. Now the browser is just a bloated pile of crap.
- Capricorn2481 3y agoAs opposed to Java applets?
- bullen 3y agoJava is the best thing we have gotten since C in 1970. That was 30 years ago. Since then everyone has been copying Java: C#, WASM, Go, Rust... nothing even scratches the surface. And it never was insecure, it was removed by the same people that leverages consume only devices and root certificates. That said I'm actually a proponent of bringing back the MIDlet, J2ME was the best software platform ever created.
- Capricorn2481 3y agoYou misunderstand me. I think Java's great. Java applets were quite bloated. moreso than Electron. You can still make Java Applets if you want, but people have moved on.
- bullen 3y agoApplets where bloated by programmers, my Applets where super lean. No, I can't develop Applets, they are disabled in all browsers.
- reductum 3y agoYou may find the Orca project quite interesting: https://orca-app.dev/posts/230607/orca_announcement.html https://orca-app.dev/posts/230607/orca_announcement.html