For the past month or two, I've been working on some pretty complex logic to support caret navigation and text selections across multiple sequential `NSTextView`s in #AppKit. I need this functionality for my block-based notes app, where each block lives inside its own text view. The problem is that by default #macOS doesn't natively support caret navigation or text selection across multiple text views. This would be a big problem for the user experience in my app, so I had to build a solution! My solution lets the user move the caret smoothly between text views just by using the arrow keys. On top of that, the implementation also supports making text selections across text views. The user can even copy text from a selection that spans multiple text views. In the video, the red borders show the boundaries of each text view. Notice how I'm able to move between them seamlessly, as if it were one continuous editor. #dev
From a learning perspective, I definitely think I’m making the right choice by building natively for each platform, because it lets me experience many different ways of doing things. Every language and framework has its own patterns and philosophies. Because of that, I’m getting a lot of practical experience that in the future, will help me make better implementation decisions. At some point, I’ll need to learn Electron and React Native. It should be easy, considering it’s React, which I’ve already used a lot. Tauri would be cool too, mostly because it’s much less bloated than Electron. But it sure isn't Rust that’s drawing me in… #dev View quoted note →
It’s difficult not to want to just scrap #AppKit and go all-in on #Electron or #Tauri. If my app was a macOS-exclusive, going the native route would be no problem - but this is not the case… I do want my notes app to be available on all the major platforms (iOS, Android, macOS, Windows, Linux, and the web). Building a native app for each platform is a massive undertaking - even for a large team of developers, let alone a single person. In fact, I would argue it’s naive to believe one person can realistically achieve this (even with LLMs). Sure, it's *possible*, but keep in mind, that you’ll be spending an enormous amount of time pushing every feature to every platform, while your competition using Electron and React Native move much faster. This becomes a big problem from a business perspective. Customers expect you to keep up with the competition, but that is nearly impossible when you're maintaining five separate codebases instead of just two (Electron and React Native where much of the code can be shared). If this project was purely for the sake of business, I probably made the wrong choice by going native 😅 But hey, I'm new to programming, so I think it's good that I'm making all these choices and learning from them. This project is about learning the craft of programming. Of course, I'd love for this project to eventually make a living income - that'd be a dream come true. I started my Software Engineering degree ≈2,5 years ago. I had coded before that, but just some pretty basic Remix and Next.js. I would barely even call that real programming considering how little logic was involved (mostly just mutating state values) to what I'm doing now with AppKit where I'm working with low-level APIs that are poorly documented. #dev