What is architecture?

  • Architecture

    • Design scheme in software development
    • Relationships between classes, between modules, between clients and servers
  • Structural nouns often heard

    • MVC, MVP, MVVM, VIPER, CDD
    • Three-tier architecture, four-tier architecture
    • .

MVC – Apple version

  • Model-View-Controller
    • Advantages: View and Model can be reused and used independently
    • Cons: Controller code is too bloated

MVC – variant

  • Model-View-Controller
    • Advantages: Thin Controller, encapsulate the details inside the View, the outside world does not know the specific implementation inside the View
    • Cons: View depends on Model

MVP

Model-View-Presenter

MVVM

  • Model-View-ViewModel

The demo address

  • Because CDD has not been in contact, so no

layered

Design patterns

  • Design Pattern

    • Is a set of repeatedly used, code design experience summary
    • The benefits of using design patterns include reusing code, making it easier for others to understand, and ensuring code reliability
    • Generally has nothing to do with programming language, is a set of relatively mature programming ideas
  • Design patterns fall into three broad categories

    • Creation pattern: Pattern of object instantiation, used to decouple the object instantiation process

      • Singleton pattern, factory method pattern, and so on
    • Structural pattern: Groups classes or objects together to form a larger structure

      • Proxy pattern, adapter pattern, composite pattern, decorator pattern, and so on
    • Behavioral patterns: How do classes or objects interact and divide responsibilities and algorithms

      • Observer mode, command mode, chain of responsibility mode, and so on

recommended

  • Data structures and algorithms

    • Weimin Yan, Data Structures
    • Big Talk Data Structure and Algorithm
  • network

    • The Definitive GUIDE to HTTP
    • TCP/IP Volume 1: Protocols
  • Architecture and design patterns

    • Github.com/skyming/Tri…
    • The design – patterns. Readthedocs. IO/zh_CN/lates…