Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine / SwiftUI? #522

Open
mickeyl opened this issue Jul 7, 2020 · 4 comments
Open

Combine / SwiftUI? #522

mickeyl opened this issue Jul 7, 2020 · 4 comments

Comments

@mickeyl
Copy link

mickeyl commented Jul 7, 2020

After using Objective-C for 10 years, 5 of them with YapDatabase, I'm just starting to get into SwiftUI.

Did anyone of you find out a good way to bind YapDatabase as the "data source" (or whatever it's called these days in SwiftUI) for a SwiftUI (lazy) grid?

Or more generally speaking… is anyone using YapDatabase with Combine?

@mickeyl mickeyl changed the title SwiftUI? Combine / SwiftUI? Sep 19, 2020
@mickeyl
Copy link
Author

mickeyl commented Mar 22, 2022

FWIW, for now I settled on using https://github.com/groue/GRDB.swift. I still miss YapDatabase's approach with the computed views, but while YapDatabase seems to be EOL, GRDB is Swift-native and embraces Combine and SwiftUI.

@chrisballinger
Copy link
Contributor

Yep that's where I've landed as well, GRDB is great. Maybe you could build some Yap-like functionality on top of GRDB and release it as a Swift Package?

@mickeyl
Copy link
Author

mickeyl commented Apr 6, 2022

Indeed – I'm pretty sure this would be possible. I would have started already, but I'm just worried about Apple presenting their own Swift-native database solution soon… so lets wait at least until after WWDC2022…

@robbiehanson
Copy link
Contributor

I still love the technology in YapDatabase - I miss having its Views almost everyday. But as mickeyl pointed out:

I'm just worried about Apple presenting their own Swift-native database solution

And that touches on the issue. Apple has their own database tech. And they keep improving it, and adapting it to work with their latest technologies. If you want to convince apple developers (like yourselves) to use non-apple-owned tech, then the 3rd-party tech has to be either:

  • a LOT better
  • or multiplatform

I spent a lot of time thinking about this. And I learned a lot by watching Realm. So... Realm was multiplatform - and this was a big part of their success. Realm also had a lot of money. They spent a lot of money on marketing, and it was a very successful marketing campaign (from my perspective as a competing database). In contrast, YapDatabase was not multiplatform, and had zero money.

But all that VC money meant that Realm still had to create some kind of business. So they added cloud syncing, with their own cloud backend. And this, to me, was the most interesting. You might recall that I added YapDatabaseCloudCore, which was the foundation for pluggable syncing. I spent a lot of time thinking about how YapDatabse could connect to various clouds. And what niche ecosystems exist for these technologies. I even tried to create a business around encrypted zero-knowledge sync technology - but failed.

If I was to rewrite YapDatabase from scratch today, I don't know if I would choose Swift. Perhaps Kotlin-Multiplatform would be a better way to go. With a Swift-native layer on top. Similar to what Realm did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants