Developing a Swift iOS app "The Right Way" Developing a Swift iOS app "The Right Way" ios ios

Developing a Swift iOS app "The Right Way"


A few suggestions

  1. Design patterns are a guide to help save you effort from resolving already solved problems, they aren't strict rules
  2. While the site you link to (raywenderlich.com) is a good start for tutorials, for a more detailed look at design patterns in swift I suggest Design Patterns In Swift
  3. If HttpClient and PersistencyManager are base classes which provide the interface than a protocol is not strictly essential. I agree that protocols are a more general way to go here
  4. If you go with protocols, I'd specify the client and persistency manager in the initializer as they are essential
  5. Persisting models is a specific enough role as to be handled by a single class, see realm.io for an example db


Since the first line of question states that you want to "develop a real application on your own" therefore I just want to point you in the right direction.

The fact is there is no "best" way of structuring your code. There are many ways in which you can write code which accomplishes the same task. And unless you are working in a team and building a very complicated app, it does not really matter which approach you follow.

As you said that you have learned swift, I would suggest you now focus on learning advanced features of swift like closures and protocols. Once you are familiar with these then you would need to get familiar with iOS SDK which has loads of built in frameworks that you would need to use in your app.

Lastly, just get started with your app as soon as possible. You may not be able to write clean and well structured code in your first app but it is something that you will learn over time by making mistakes and correcting them later. Just to encourage you, I would like to tell you that making a simple app is not very tough, I learned objective c and made my first game in 20 days and you can do it too. If you need any tutorials/resources, just leave a comment, I will update the answer.

Focus on building the app. Improve it later when you have built it.