Ever since Codable was introduced in Swift 4 / Xcode 9.0, I’ve been researching ways to combine the two services to provide an iOS framework to reduce their complexities, while improving maintenance and scalability. Most iOS applications these days are data-driven and receive their data from server-side API calls, process the response into their own data structures, and display that data to the User Interface.
To simplify this data flow, the data, caching, and persistence logic should be abstracted into their own layers within the application architecture — this is the purpose for the proposed framework, called Badger(?), which I hope to release in 2019. For example, some of the goals of the proposed framework include:
Object graph management
Logging and error handling
Due to the many responsibilities of this framework, I’ve decided to break down the components into this blog series, titled Exploring Codable and Core Data. To help lower the barrier of entry for readers, I’ve decided to focus on a few essential topics per post. The series will consist of the following topics:
Decoding Custom Types with Decodable (coming soon)
Encoding Custom Types with Encodable (coming soon)
Getting Started with Core Data (coming soon)
Making Core Data Your Model Layer (coming soon)
Creating Your Core Data Stack (coming soon)
Saving Codable Models to Core Data (coming soon)
Fetching Codable Models from Core Data (coming soon)
Testing Codable Models (coming soon)
Testing Core Data Models (coming soon)
Note: I strongly believe sharing knowledge this way helps readers from all levels of experience and backgrounds to learn and improve their skills, and help the community grow and build together. So any feedback, questions, or comments from you would be greatly appreciated. Thanks in advance, and stay tuned for updates!