Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Design Pattern equivalents when coming from a C#/Java world?

So I'm new to iOS development and am doing all I can to learn the "best" way to do things. (Yes I know that's a relative term)

I'm coming from a world of C# and Java where we do things like injecting dependancies via an IOC container, use a repository pattern to abstract data access, use domain services and objects to encapsulate business data and behavior, etc. These are things I have yet to see in iOS development. (Maybe I'm looking in the wrong places)

I realize that Objective-C is a superset of C and a dynamic/loosely-typed language which will probably change the game quite a bit when it comes to good designs practices. Can anyone point me in the directions of some books/blogs/other that would help me make this mental leap from a strongly typed, managed environment to this new world while keeping my designs supple and abiding by the SOLID principles?

EDIT - I want to be clear here. I am not asking how to learn the Cocoa framework and the ins and outs of Objective-C as a language. I have found plenty of resources on that. I'm looking to take this to the next level, begin doing TDD and make sure the projects I'm building will be easy to extend and maintain.

like image 939
Ross Hambrick Avatar asked Jan 31 '12 20:01

Ross Hambrick


People also ask

What are the design patterns used in iOS?

Most common Cocoa design patterns: Creational: Singleton. Structural: Decorator, Adapter & Facade. Behavioral: Observer and Memento.


1 Answers

The best way to learn the "best" way to do things is by gaining as deep an understanding as possible of how Apple's existing APIs are designed. After all, regardless of what the theoretical best way to do something is, ultimately your code is going to have to work with these APIs, so it makes sense that you should follow similar patterns in most cases.

As far as books go, there is one called Cocoa Design Patterns that covers this exact subject and, based on Amazon review, seems to be well received.

like image 186
UIAdam Avatar answered Oct 01 '22 23:10

UIAdam