Christian Tietze

  • Blog Posts
  • Writing
  • Apps
  • Work With Me
  • Contact

Put Usage of a CoreDataFetchRequest out of Your Code and Into ... Where Exactly?

Oct 9th, 2015

I created a generic CoreDataFetchRequest a while ago and love it. It casts the results to the expected values or throws an error if something went wrong, which it shouldn’t ever, logically – but the Core Data API currently returns AnyObject everywhere, so I have to deal with that.

Continue reading …

  • ∞ Permalink
  • • Comments
  • • Tags:
    • core-data
    • swift
    • generics
    • repository
    • protocol

Combining Collection-Like Repositories and East-Oriented Code

May 7th, 2015

A repository pattern is used to model a central place in your domain to fetch model instances. It usually hides database-related stuff behind a collection-like interface. You don’t have to worry about caching or database query optimization in client code – the concrete repository implementation will handle that.

Continue reading …

  • ∞ Permalink
  • • Comments
  • • Tags:
    • repository
    • east-oriented

Contact • Newsletter • Blog Feed • /feeds • /now • /uses • @ctietze@mastodon.social • Privacy & Legal Information

Except where otherwise noted, content on this site is licensed CC BY-SA 4.0.

As an Amazon Associate I earn from qualifying purchases. This e.g. applies to links to Amazon.com.