7 ms·
Oh man, this has been suuuuch a pet peeve of mine. There is so much buried, incomplete or otherwise missing documentation on Apple's side, and every time anyon
by Klonoar 7y ago
Oh man, this has been suuuuch a pet peeve of mine.
There is so much buried, incomplete or otherwise missing documentation on Apple's side, and every time anyone complains about Electron and wonders why nobody wants to build native apps anymore... this is a huge factor why. Meanwhile, any Cocoa devs on Twitter scoff at this stuff being difficult to find and learn.
It goes deeper than this, too - there's a litany of Apple dev forum threads that Google has half-spidered and are behind a login screen. Or the fact that some of the release notes for point releases of macOS will have crucial details that you'd otherwise miss - just a few months ago I learned that watching the mouse in a specific way can completely disable smooth scrolling.
I dislike Marzipan, personally, but I wouldn't be surprised if a huge motivating factor for the project is the fact that parts of AppKit require wizardry on a dwindling level. I've had developers from Apple lament this to me in person, too, and nobody ever seems to have a clear reason why it's such a clusterf...
- api 7y agoPeople whining about Electron is a pet peeve of mine for this reason. Electron exists because of the sorry mess of half-supported fragmented junk that desktop UI development has become. If you hate Electron don't blame Electron. Blame OS vendors.
- tomc1985 7y agoElectron hater here, desktop UI has always been super fragmented. Electron does cross-platform, and it lets people deploy their cheaper-to-hire web developers on desktop tasks, plus its free, hence its popularity. As much as I love other toolkits I'm not sure anything else checks those boxes QT comes close, but it ain't free. WinForms also comes close, but its old and whiny kids think its ugly. GTK comes close, but you can't use your web people to program it...
- Klonoar 7y ago> References QT as a solution > Calls web devs cheaper to hire, a gatekeeping tactic that shows up in every discussion like this (market salaries actually indicate the opposite is true here...) > "whiny kids" Yup, this seems par for the course. Desktop UI has to be willing to compete on Electron's merits, that's the game now. It will die otherwise.
- coldtea 7y ago>Desktop UI has to be willing to compete on Electron's merits That's a pretty low bar. None amazing desktop UI I've seen has been non-native.
- Klonoar 7y agoThen you're using a select few apps that fit your use-case. The merits of Electron are explained, at length, elsewhere, and the market has spoken multiple times as to why people pick it over alternative environments. Microsoft outright courts the HTML/CSS/JS crowd because they know it matters, and that's where the developers are. Google does the same, FB has been pushing the model for native apps in more ways than you can count for years now. It's not going away, and it's eating every Desktop GUI framework's lunch. A GUI framework (like AppKit) cannot stand against something like that without Apple actually investing in it. AppKit (or whatever they use, ala Marzipan) needs to strive to be as easy and straightforward to use as the web, or it won't matter. Comparatively few people actually care about writing a GUI and just want it to work, the interesting things are elsewhere... so you need to offer something that "just works" and is easy to debug. (Qt is not this) Also, "Native" is a horrendously overloaded term in these discussions. When saying it in the context of Qt, for instance, it's incorrect - Qt draws custom controls on the different platforms. A good example that I hit daily is Dolphin, it simply doesn't look correct on Mac even with the Qt switch. It feels like a Windows program shoved into a foreign OS, much like GTK does on Windows.
- coldtea 7y ago>Then you're using a select few apps that fit your use-case. Please enlighten me of the apps I miss. >It's not going away, and it's eating every Desktop GUI framework's lunch. Not for any app that matters. Form-based apps and glorified chat apps like Slack and FB, perhaps...
- arvinsim 7y ago> glorified chat apps like Slack Sure, let's just call the app that many many tech teams use as an app that doesn't matter. It's not perfect. But it's certainly not insignificant.
- mrmonkeyman 7y agoAs someone moving from backend development to fullstack / frontend I have to say the pay is increasing lately and, dare I say it, the backend part of applications is the easy part nowadays. As a "web developer" (who also does QT/C++) I also am the only one who can communicate like a human. So not only am I responsible for coming up with an entire UX, I frequently am also the one coming up with the specs with the C-guys because the "regular devs" are too autist/unwilling to have normal conversations and/or giving up on their petty ideas about how the world should work. Frontend work, in my case, is WAY more complex than the backend.
- Vogtinator 7y agoQt (LGPL-3.0, some parts GPL-3.0) is as free as GTK (LGPL-2.1+)
- pjc50 7y agoI'm the greybeard that likes WinForms, but it has a couple of massive blind spots due to its age - the big one is that it's not "responsive", and copes badly with high-DPI displays. This is still visible all over Windows 10, as they only managed to convert some of the system config UI to Metro. Responsiveness is extremely hard, and modern web and Electron have mostly got it working pretty well. This does come at a cost of complexity and CPU. To me there's probably more mileage in trying to resource-constrain Electron than build yet another new system and wait for its adoption.
- spiralganglion 7y agoHighly agree with the last point. Electron bloat and slowness are real, but that’s not the whole story of why so many Electron apps are awful platform citizens. If one were so motivated, they could make an Electron app that passed the smell test, and didn’t try to run megabytes of node_modules-black-hole JS per tick. It still wouldn’t be as nice as a true native app, but it’d be a lot better than the usual offenders.
- api 7y agoYup... a shitty app written in X is a shitty app where X is any language, platform, or framework. You can write non-shitty apps in Electron/JS but you have to actually pay attention to resource use, reducing dependencies, styling to match the host platform, etc.
- mikepurvis 7y agoIt's truly hilarious how much legacy config/settings stuff there is hanging around in Windows 10. I kid you not, the click path for me to change my USB network adapter between DHCP and static IP is: Windows key -> Gear icon -> Network & Internet -> "Ethernet" -> "Change adapter options" Now I'm in the legacy "Network Connections" explorer window, and I double-click my adapter to open the legacy Status panel, where I click "Properties". Then select TCP/IPv4 and click "Properties" again, and finally there's a panel to actually switch it and enter network details.
- Crinus 7y agoAs a user i'd rather blame the developers who made the choice to use Electron despite its drawbacks for users been repeatedly mentioned every single time Electron itself is mentioned.
- m_fayer 7y agoNot sure why this is getting downvoted I think it's dead on. Yeah desktop's always been fragmented, but it hasn't always been in today's state of utter neglect. Look at Windows - wpf was powerful, elegant, and ahead of it's time. Now it's abandonware with nothing to replace it (please don't say UWP). To reiterate - right now the world's dominant-by-a-mile desktop OS has no viable modern 1st-party native UI toolkit.
- pjmlp 7y agoI will say WinUI instead then. https://github.com/microsoft/microsoft-ui-xaml/blob/master/docs/roadmap.md https://github.com/microsoft/microsoft-ui-xaml/blob/master/d...
- Kipters 7y agoI wouldn't say WPF is abandonware, just look at the efforts to modernize it with .NET Core 3.0 (and as someone already pointed out: WinUI)
- m_fayer 7y agoAFAIK, those efforts are just trying to make it usable from Core 3.0 - they're not doing anything to address the verbosity and performance issues.
- Kipters 7y agoThey've also been doing work for making it easier to call WinRT APIs or introducing UWP controls (through XAML Islands) in both WPF and WinForms... A bit of a stretch, but this way they're both inheriting all the work they've done before for UWP. I think they also announced something about DPI awareness that won't be backported to classic .NET because it required runtime changes
- m_fayer 7y agoDoes any of that sound like it's even in the neighborhood of what's needed to you?
- threeseed 7y agoThe answer to your last question is pretty obvious. AppKit is from the NextStep era: https://en.wikipedia.org/wiki/Application_Kit https://en.wikipedia.org/wiki/Application_Kit
- Klonoar 7y agoYes, which is also where the odd coordinate system and so on descend from... the annoying thing is it still works fine, but it's too large of a surface to enjoy developing in without proper docs and so on.
- mpweiher 7y agoErr...the "odd" coordinate system is the Cartesian coordinate system from...math. https://en.wikipedia.org/wiki/Cartesian_coordinate_system https://en.wikipedia.org/wiki/Cartesian_coordinate_system It is also the coordinate system of the graphics model(s) underlying all this: Postscript, PDF and CoreGraphics. As UIKit shows, it is fairly easy to transform the coordinate system if you want a different one.
- saagarjha 7y agoPlus there's also NSView.isFlipped if you want the UIKit behavior.
- Klonoar 7y agoIt's "odd" because the vast majority of UI libraries use top left, not bottom left. NSView being flippable alone confirms that it's an expected style at this point. Anyone who did middle school math knows it's Cartesian. ;P
- jonhendry18 7y agoNSView has been flippable since the NeXT days.
- layoutIfNeeded 7y ago>there's a litany of Apple dev forum threads that Google has half-spidered and are behind a login screen I often experience this too. Haven’t tried it yet, but I wonder if you could access the content by changing your user agent to one of googlebots.
- layoutIfNeeded 7y agoDon’t forget the secret knowledge that is passed on via archive WWDC videos and is forbidden to put into written form, lest the heathens would stumble upon it via Google. Forever be damned the heretics at asciiwwdc.com!
- Klonoar 7y agoOr the classic "burn a TSI to solve some esoteric issue that documentation might've helped with".
- jakobegger 7y ago"Sorry, this functionality is not covered by Developer Technical Support"
- saagarjha 7y agoUsually they'll refund your TSI in that case, so the only thing you lose is your time?
- derefr 7y agoEasier to just throw the system libraries into Hopper, honestly.
- layoutIfNeeded 7y agoIs Hopper better at ObjC than IDA Pro? I’ve tried going through UIKit once with IDA, but it was very tedious due to objc_msgSend...
- saagarjha 7y agoI personally prefer it to IDA Pro and Ghidra. It's not always the most accurate but it generally does the job pretty well for what Clang produces for C and Objective-C.
- 7y ago
- omeid2 7y agoYou say it like Electron documentation is any better, for one, the scope of a project like electron is many orders of magnitude smaller than the Apple ecosystem APIs and second, it is barely any better. This comes from someone who has done a fair share of developing in both. What I hate most about electron is the never ending pointless churn in quest for "modern". Breaking changes like this that provide no real value is standard modus operandi: https://github.com/electron/electron/pull/16570 https://github.com/electron/electron/pull/16570 Something as simple and fundamental for desktop applications, Instance Management, changes every release or so, and is primitive at best (a simple mutex and event, with no way to pass metadata other than the instance flags). The portable builds are half-ass too, can't build a separate 64bit and 32bit version for windows without building twice and cleaning up. Many many other issues like that, it is a case of torture by a thousand cuts and forever trying to keep resource consumption under control. Electron sounds good in theory, but in practice it barely scratches "good-enough".
- Klonoar 7y agoCore Electron documentation is akin to wondering where the docs for NSApplication are. They exist and are easy to find, but they might be confusing at points if you don't get it, or it's not documented - but it's a smaller surface area. How you build things in Electron is akin to the web rendering API, which has ~20 years of backwards compatible guides and documentation. There is, full stop, not a single thing out there that is as well documented as HTML/CSS/JS. (Edited to note that parent comment significantly edited since my reply. I'm not debating in this format.)
- auggierose 7y agoI'd say that AutoLayout is much better documented than CSS; because it is a much better concept in the first place.
- Klonoar 7y agoAutoLayout is amazing. I love it and personally think it's better too... ...however, when it first got added to iOS, Apple notably had crappy documentation for it, and the performance was abysmal so it had uptake issues where people would still resort to manually judging frames. Moreover, it doesn't matter. CSS is a juggernaut and it's not going away anytime soon.