GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 前端架构分层思考 · Issue #21 · Jarweb/thinking-in-deep

前端架构分层思考 #21

New issue
Copy link
New issue
Copy link
Open
Open
前端架构分层思考#21
Copy link

Description

@Jarweb
Jarweb
opened on Sep 5, 2020
Issue body actions

前端架构分层思考

image-20200905115749168

  • 请求通信层
    • 理解:把服务端比作是数据库,那请求通信层就是数据库驱动。请求层提供相关的通用的 api,通过通用 api 来封装请求的接口。
    • 功能:http 规范、接口请求、缓存、sw、轮训、并串行、超时、取消、分页、错误处理 ...
  • 存储层
    • 数据实体:与服务端的一致
    • 持久化同步:同步到本地持久化存储
  • 模型层
    • 增删改查:对实体进行操作的 action,可复用
  • 视图控制层
    • 与视图一一对应,处理副作用、业务逻辑、接口通信、错误监听等。
    • 无需考虑复用
  • 视图层
    • 保持简单
  • 应用控制层
    • 应用生命周期
    • 应用配置
    • 插件配置
  • 通用模块
    • 组件库
    • hook 库
    • 函数库
    • 插件库
    • 中间件库

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.