// archives

design pattern

This tag is associated with 8 posts
viper-sample-app@2x.jpg

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.

database@2x.jpg

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.

snowflake-identifier@2x.png

Swift Snowflake ID Generator

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

handshake-car@2x.jpg

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

00-iOS-OS-X.png

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.

JSON-Coffee-FX.jpg

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.

swiss_cheese_boosted.jpg

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.

post-image-Objective-C-Blocks-Callback.png

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!

Categories

Archives