3 ms·
For stuff like figma and photoshop I can't help but suspect that the creators would be better of writing their program in CPP with the GUI toolkit of their choi
by traverseda 3y ago
For stuff like figma and photoshop I can't help but suspect that the creators would be better of writing their program in CPP with the GUI toolkit of their choice, and compiling it for the web with emscripten.
- diggan 3y agoI don't think that workflow was even a realistic option when Figma development was initiated, or even when it first launched.
- traverseda 3y ago(300MB download warning) Here's an example of libreoffice running entirely in the browser: https://lab.allotropia.de/wasm/ https://lab.allotropia.de/wasm/ Once it does it's painfully long download and bootstrap it works pretty nicely. This is a big complicated legacy app, but I'm sure if reasonable file sizes and graceful loading was an actual goal you could get some pretty good results. Sure, it's not going to be as easy to hire for right now, but I think for complicated programs that general kind of workflow is likely to be better than the big pile of JS scripts. Google seems to think the same if flutter is any indication.
- diggan 3y agoAre you saying that that was built back in 2016/2017?
- chilli_axe 3y agoThe existing C++ Photoshop codebase was largely ported to WASM with Emscripten https://web.dev/articles/ps-on-the-web https://web.dev/articles/ps-on-the-web
- grose 3y agoI believe Figma is indeed written in C++ and uses emscripten. It's pretty much the polar opposite of your standard CRUD app. Old article: https://www.figma.com/blog/webassembly-cut-figmas-load-time-by-3x/ https://www.figma.com/blog/webassembly-cut-figmas-load-time-...
- traverseda 3y agoHuh, Guess I was right :p So neither of those are a good argument in favour of these complicated javascript stacks, are they?
- rezonant 3y agoJust because Figma opted for this route doesn't make it right for all interactive web applications.
- traverseda 3y agoYeah. That's what the little `:p` at the end of that comment meant.
- lacerrr 3y agoI tend to dislike this approach for the simple reason that it's an extra "compatibility layer" where you give up control. If you're developing for the web you may every now and then want to do things a specific way or use a specific feature and be unable to do so because the transpiler doesn't support it or is programmed not to.
- mardifoufs 3y agoWhy? If there's one thing JavaScript and browser tech is good at, it's making GUI dev easier. Just look at how even Qt is basically pivoting completely towards QML which to my naive eyes look very very similar to how GUI/Layouts/styling is done with html5/Js. Why would you purposefully use something worse just to not use browser related tech? I would agree if this was about raw number crunching, where compiling to wasm makes sense and where a html5 GUI can be used as a frontend, but the GUI itself has no reason to be built with CPP.
- skydhash 3y agoIt’s reactive/declarative UI programming, which Android does with Jetpack Compose, and iOS and MacOS with SwiftUI. The other way is doing imperative UI, like the web was doing with jQuery.