5 ms·
One of the things I like about CoreData is that all the relationships and entities are defined in one file, and its easier to browse the history of that schema
by seanalltogether 3y ago
One of the things I like about CoreData is that all the relationships and entities are defined in one file, and its easier to browse the history of that schema to see how the models evolved. One of the things I dislike though is that it doesn't interop well with swift types and almost everything has to be marked as optional. It looks like this SwiftData solves the second problem, but since definitions are spread across all the classes individually, it's harder to get a glance at the whole schema at once.
- jondwillis 3y agoCMD+F @Model would largely address the issue of not having an overview of the schema.
- refulgentis 3y agoNot quite, having a list of lines it appears in won't be as helpful as the UML-ish graph.
- codetrotter 3y agoEither Apple will add some graph tools to Xcode, or third-parties will develop tools to make the graphs you need
- refulgentis 3y agoOkay awesome, great news (what is going on here, exactly? why do we need to solve this and tie it off with a bow, today? why is 'maybe someone else or maybe them will maybe make something similar someday' a resolution?)
- wahnfrieden 3y agoput them in one file then.
- leovander 3y agoDitto to this suggestion. Especially when you auto generate classes it ends up creating the main class for each entity and a separate extension file for each. By default we merge the two and avoid the separate extension altogether.
- jmull 3y agoYou still have the option to keep things organized, though you will need to supply a bit more of your own discipline.
- TheJoeMan 3y agoI hope all the swift tutorials don't switch to just SwiftData, seeing as how we must support iOS(-2).
- wahnfrieden 3y agoread tutorials authored up to wwdc(-2) then. tutorials cover the latest because that's where attention is.
- throw74775 3y agoWhy must you support iOS(-2)?
- dcow 3y agoCommon industry practice for iOS development is to support the most recent two major versions.
- throw74775 3y agoYes, but why?
- belmont_sup 3y agoGuess I’ll have to say it. It maximizes the user market. https://iosref.com/ios-usage https://iosref.com/ios-usage Losing a potential 10% of your market share because they’re 2 versions away is unquestionable for some companies.
- throw74775 3y agoThat chart doesn’t say you lose 10% of your market share. It only says that 10% of your users can’t upgrade to the latest version of your app, which is a totally different proposition. You say for some companies, this is unacceptable, which is obviously true. It’s not obviously true for a lot of companies, so it’s worth questioning whether this is just a dogma that is handicapping developers and slowing progress in many cases.