Live data from Hacker News

Show HN: SwiftData – A SQLite library in Swift

github.com

1–10 of 19 posts

Re: Show HN: SwiftData – A SQLite library in Swift

#4

What's the advantage of using something like this over CoreData - which is built in?

Personally, I find the CoreData API unpleasant to use ... I think SwiftData offers simplicity and the familiarity of SQL to developers.

But CoreData is a great option if you have time to learn it!

Re: Show HN: SwiftData – A SQLite library in Swift

#6
post #5

Hello, Is there already a built-in package manager in Swift? Maybe CocoaPods will have support for Swift but, as a completely new environnement, I'm hoping that Apple will add a dependency manager for Swift.

Currently, I'm not aware of one.

However, once Swift comes out of beta (and with some time) I think the best practices to distribute libraries will become evident.

It would be great if Apple released a dependency manager for Swift, though!

Re: Show HN: SwiftData – A SQLite library in Swift

#7
post #5

Hello, Is there already a built-in package manager in Swift? Maybe CocoaPods will have support for Swift but, as a completely new environnement, I'm hoping that Apple will add a dependency manager for Swift.

Xcode 6 provides better support for third-party frameworks, which certainly makes distributing packages without a third-party took like CocoaPods easier, but it doesn't have anything resembling a proper package manager or dependency resolution tool.

Right now, the state of distributing libraries in Swift seems to be "add it as a git submodule, and either add the xcodeproj and link the compiled framework or just drag in the .swift files, but let's hope the community comes up with something better soon".

Re: Show HN: SwiftData – A SQLite library in Swift

#8

What's the advantage of using something like this over CoreData - which is built in?

I've had the same thoughts and internal discussions a few times. I recently found these two articles, one talking about using NSCoding instead of CoreData, and the other is about helper libraries to make CoreData easier to manage. Both are good reads if you're working on iOS apps.

http://nshipster.com/nscoding/

http://nshipster.com/core-data-libraries-and-utilities/

Re: Show HN: SwiftData – A SQLite library in Swift

#9

What's the advantage of using something like this over CoreData - which is built in?

CoreData actually has the option of using SQLite as the underlying datastore. The other alternative is a proprietary binary store. I think there is also an XML store. CoreData is an abstraction level higher than SQLite. It's similar to an ORM or graph database where it manages the relationships between objects for you. So if you don't need all the features of CoreData, SQLite is lighter and simpler.

Re: Show HN: SwiftData – A SQLite library in Swift

#10
post #5

Hello, Is there already a built-in package manager in Swift? Maybe CocoaPods will have support for Swift but, as a completely new environnement, I'm hoping that Apple will add a dependency manager for Swift.

Currently, I'm not aware of one. However, once Swift comes out of beta (and with some time) I think the best practices to distribute libraries will become evident. It would be great if Apple released a dependency manager for Swift, though!

I think Apple should build the basic hooks so that package manager like CocoaPods is possible but a better solution will emerge if the package system is handled outside of Apple which is likely have a huge legal that prevents healthy ecosystem.
Post reply on HN