My Github address

Notes on data Structures and Algorithms

Notes for geek Time iOS Developer Class

IOS large factory interview high frequency algorithm summary

Summary of iOS interview materials

Six Design principles

  • Single responsibility principle
    • A class does one thing
    • CALayerandUIView
  • The open closed principle
    • Closed for modifications, open for extensions
  • Interface Isolation Principle
    • Use multiple specialized protocols rather than one bloated protocol
    • There should be as few methods in the agreement as possible
    • UITableviewDelegate & UITableviewDataSource
  • Dependency inversion principle
    • Abstraction should not depend on concrete implementation, concrete implementation can depend on abstraction
  • Richter’s substitution principle
    • A parent class can be seamlessly replaced by a subclass without affecting its functionality
  • Demeter’s rule
    • One object should know as little as possible about other objects
    • High cohesion, low coupling

Chain of Responsibility model

  • Manually implement the chain of responsibility

The bridge model

Adapter mode

  • A problem where an existing class needs to adapt to change
    • Object adapter
    • The class adapter

The singleton pattern

Command mode

  • Behavior parameterization
  • Reduce code overlap

Design model interview summary

  • Please write singleton implementation.
  • What design principles do you know? Please share your understanding.
  • Can a diagram simply represent the main structure of the bridge pattern?
  • How is the UI event passing mechanism implemented? How do you understand the design patterns used?