yeah, I understand. And thank you for the detailed answer. But why people always use swift than swiftUI in this forum, if the swiftUI is that great? may be all the people here just making server apps which needs no user interfaces? I'm just trying to understand the value of sticking to swift than just using a framework like "swiftUI" or "Cocoa"
Everyone here who works on UI-based apps does use SwiftUI/UIKit/AppKit on a daily basis β no one here, to the best of my knowledge, has rolled out their own GUI stack.
It's just that discussion about app development and UI work (and related questions) happens in other communities: StackOverflow, Reddit, Twitter/Mastodon, etc. Here, we discuss the lower-level parts: the semantics of the language and its features, how the language itself evolves, how the compiler works, etc.
No one is actually saying that, I think it's just a misunderstanding. There isn't some camp that's saying "You should be writing programs in Swift, but without using SwiftUI". We're just focused on a different part.
The UI on my Mac app project is its simplest component, and isn't at all interesting. The "backend" to my app (as in, everything beyond the skin-deep UI) outnumbers the frontend (gui, animations) by at least 10:1 (in lines of code). So a lot of the things I post/talk about here focuses on that. The UI is simple, and there's billions of articles already on that, so I've never had a need to ask novel questions about that.
The hard part is the business logic, which has nothing to do with AppKit or SwiftUI. It's "pure Swift", for whatever that counts.
If you want graphical user interface on Apple platforms, the next step is to select the target platform (macOS or iOS), and the template (App)
Then you will have interface options to choose from
Storyboard and XIB are developer tools to the GUI APIs provided by Apple operating systems:
- AppKit on macOS
- UIKit on iOS