Free to see some of the iOS development architecture video, simple introduction of a few commonly used architecture design, it is now recorded as follows, later there is time to write this aspect of the content, we can see, interested in further study.
I. Architecture Basics
1. Purpose of Architecture design
Further decoupling.
2. The way of coupling
1) Singleton-know each other's presence
2) delegate-The entrusted party does not know the existence of the principal party, the client knows the existence of the entrusted party
3) Notification-both parties do not know the other's presence
Second, MVC
C can control the rendering of V, C can modify M.
V can give the user the data collected here and user event feedback to C for further processing, V can read to the data in M and then display themselves.
Third, MVP
Comparison with MVC
In MVC, the three roles of-M, V, and C are known to each other, referenced by each other, and V is known to exist in M.
In the MVP,-V and M are non-existent, there is no reference, there is no dependency, all coupling is handled in P.
Iv. MVVM
There is a two-way binding, which can be done using the REACTIVECOCOA framework or KVO in iOS.
Five, CDD
Useful-do not need to write delegate to be able to complete an event delivery.
The structure of the scene-view is very complex, for example, chat interface, live interface.
Vi. Layered Architecture
Application Layer-Service layer-data tier.
Vii. Summary
These are just basic introductory concepts and want to use a good architecture is needed-
1. Study and summary of a great deal of theoretical knowledge
2. The practice of multiple projects, because no architectural design is suitable for all projects, each project needs to design a suitable architecture according to its business logic.
iOS Development Architecture Learning Record