Here are my initial thoughts about the content and structure of the tutorials. I’d love some feedback on these plans before I flesh them out and start coding and writing.
- Xcode vs. the Xojo IDE
Start with a gentle comparison of the Xcode and Xojo IDEs, including what you can and can’t do in Xcode relative to what you can and can’t do in the Xojo IDE, and equivalent actions in each. This will cover the most-used features and commands, and the ones needed to start using Xcode.
- Swift Playgrounds vs. the Xojo IDE
Introduction to Swift Playgrounds as a way to experiment with Swift language features or user interface controls as they’re being learned, or to prototype an app quickly.
3.Swift vs. Xojo
Comparison of the Swift and Xojo languages: features, design considerations, etc. The most commonly used features will be covered in most detail, while more esoteric topics (e.g., generics, etc.) will be deferred until specifically needed or requested by users.
- SwiftUI (If SwiftUI is to be used)
Discussion of SwiftUI’s design philosophy, the use of one SwiftUI control name across all devices, the different views that are included vs. not present yet (as compared to Xojo’s controls), etc. Comparison of building UIs in SwiftUI vs. the Xojo IDE. It might also be compared to UI development in AppKit alone if people want to see that.
By the way, a new Canvas SwiftUI control was just introduced that is similar to the Xojo Canvas in that it draws using similar graphics commands (move, draw, and so on with lines, shapes, etc).
- Full Simple App
A simple app will be built from scratch in both Swift and Xojo for discussion. Readers might suggest what the program might do, so long as it doesn’t require adding a bunch of frameworks that would need to be discussed in detail.
- More Complex Apps
More and more complex apps might then be discussed to show how to do specific tasks in Swift and Cocoa for the Mac. This will depend upon how much knowledge I have of these specific tasks and the frameworks that support them. Most of my knowledge deals with graphics and scientific computing, so other topics such as networking, audio, or MapKit, would require me to study them in detail first. (Of course, I’d also accept help from others on this!)
All of this would translate into quite a lengthy tutorial series, so feedback is critical before I go any further and start coding and writing.
Here’s the most important feedback that I need immediately: Some IfNotNil users have indicated that they definitely want a Mac-oriented tutorial rather than an iOS-oriented one. This has a major influence on how the code for the tutorials is written and how detailed the discussion must be, so we need to consider the approach taken from the start:
a. Do the tutorials entirely with AppKit for macOS. The down side is that the entire tutorial series would need to be redone (except for most of the Xcode and all of the Swift language discussions) if iOS, iPadOS or watchOS tutorials are needed later.
b. Do the tutorials with SwiftUI for the user interface, reducing the amount of AppKit coverage and its detail until specific needs arise.
c. Do the tutorials entirely in Catalyst, removing the need for separate Mac ands iOS versions. One version of the code can be used for both iPadOS and macOS. Of course, for some platform-specific features such as menus and differences in the general Human Interface Guidelines for each device, tweaking would have to be done to make sure the finished app looks and behaves correctly on each platform — as if it’s native to each device — much like the tweaking Xojo apps may need to feel native on each platform.
d. Combine SwiftUI and Catalyst to reduce the platform-specific code even more.
My preference is to try SwiftUI and Catalyst, but I need to know what your needs are, and what you think would benefit you the most. Thanks!