Skip to content

Apps Dissected Posts

MVC? MVVM? VIPER? Which iOS architecture do I start with?

When you’re investigating iOS development, early on you will run into discussions about iOS app architectures, and start getting hit with a wall of acronyms and jargon: MVC, MVVM, MVP, VIPER, RIBS, Clean, RxSwift, ReactiveCocoa, and even more. You will also find heated discussions online where developers sing the praises of the architecture of their choice, whether it is the more modern patterns such as MVVM or VIPER, or the tried and true MVC.

With all of these choices and all of these opinions, you will quickly ask the question: which one do I start with?

While many of the other architectures are newer, and can solve some of the problems of iOS development (when done correctly), there is really only one answer to the question which one you should start with: MVC.

When am I ready?

When we all start learning app development, there is a primary reason: to be able to develop and publish apps. Once you have some lessons, tutorials, and books under your belt, the nagging questions start:

How much do I need to learn?
What are the things I absolutely must know?
What are the right decisions? The best practices?
What if I haven’t learned the right thing yet?

WHEN AM I READY?

BREAKING NEWS: There are no gatekeepers. There is no group of anointed gurus who will look at your learning, see that it is good, and decree, “Yes, you may now develop apps.” The good news is that if you are asking this question, the answer is simple: now.

Got JSON? Need objects? Stop typing, and start generating your object models with Quicktype

It’s time to integrate another API into your app.

That statement alone brings all these feelings to mind:

  • Poring over the API documentation, teasing out the JSON requests and responses for each call you need to use
  • Extracting a schema out of those requests and responses, being mindful of the structures, types, and required/optional state of each field
  • Writing the Swift or Objective-C code to translate those JSON schema into an object model

Hours gone in an instant. Isn’t parsing and translation something a computer should be taking care of? It can, using a tool called Quicktype.

4 ways to connect your app to a database, and 1 way not to

When you’re putting together a new app, especially if it’s your first exposure to iOS development, it can be a confusing experience. Sometimes you’re starting from scratch, and you have a bunch of options available to you, and you just don’t know which one is right for your app. You may have even been “helped” by a PaaS or IaaS platform that has given you a conventional SQL database instance: great for web apps, but how do I connect this to my iOS app? Do I want to?

There are many different ways to provide a database backend for your app. Here are some recommendations for different situations.