Git Product home page Git Product logo

mvc-front-back's Introduction

MVC是什么

  1. 它是一种设计**或方案
  2. M -> Model -> 模型层 -> 数据模型 -> 数据库
  3. V -> View -> 视图层 -> 模板引擎 EJS/PUG -> HTML字符串
  4. C -> Controller -> 控制器层 -> 给视图层提供数据 / 调用模型层方法 / 提供 据API
  • 后端一种设计方式
  • 以前WEB的实现方案 -> 前后端混编 -> 动态网站 -> 服务端渲染的方式

浏览器 -> www.baidu.com -> 服务器上 -> 资源 -> HTML -> 控制器 -> 调用模型层的方法 -> 获取数据 -> 控制器 -> 模板引擎 -> 拼接一个完整的HTNL字符串 -> 返回一个完整的HTML文件 -> 客户端做解析渲染

前端MVC是什么?

  1. M -> Service -> 服务层 -> 异步请求数据的层 -> 对数据进行操作层
  2. V -> HTML字符串 -> 函数返回HTML字符串
  3. C ->给视图提供数据 / 调用M层的方法对数据进行操作 / 对DOM进行响应的操作

后端的实践

  1. 路由: List Detail
  2. 列表展示 Brand Model
  3. 列表项删除
  4. 增加手机信息
  5. 手机详情页 展示

mvc-front-back's People

Contributors

crystal-63 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.