// archives

design pattern

This tag is associated with 8 posts

Clean Architecture with VIPER Sample Project for UIKit

Architecting applications to meet today’s challenges and be ready for tomorrow’s problem is not an easy feat. The principles of clean architecture may be sound, but separating the signal from the noise is tough. Here is a sample VIPER project for iOS that you can tinker to learn about the principles of clean architecture.


Future-Proof Your Data Persistence

The data persistence stack that is an appropriate decision today may not be an optimal solution when your app has grown. You would need to design your app to withstand the test of time and be extensible for as it grows. Read more to learn how.


Swift Snowflake ID Generator

Make thousands of unique 64 bit identifiers at every millisecond without the need of global synchronization.


A Swift Promise

Futures/promises are great to coordinate persistence and views to ensure responsiveness in today’s native apps. However bringing thousands of lines of foreign code just to have this small functionality may not be cool. Here’s a hundred-line implementation of futures/promises in Swift 3.1


Tips for Architecting Dual-platform OS X / iOS Applications

How to share common code between OS X and iOS and architect your app to dance around each platform’s similarities and differences.


Crash-proof your Cocoa-app when consuming JSON!

Is your Cocoa app plagued by “unrecognized selector sent to instance” exceptions when consuming JSON data? Is your app not resilient to minor server-side JSON API changes? Here’s how to fix your JSON woes in your Objective-C project.


Behold the Holy Array!

The holy array — like the holy swiss cheese — is an array that’s full of holes. Sometimes they’re called sparse arrays. You can use this kind of arrays instead of dictionaries to save some memory when you know that you’ll only be using small nonnegative integer as keys.


Wrapping C-Style Callbacks with Blocks

Elegantly handle C-style callbacks with Objective-C blocks. Reduce clutter, improve readability, and a really cool way of wrapping those clunky callback style that’s more than 20 years old!



Find us on Facebook