zoukankan      html  css  js  c++  java
  • MVC模式

    Each piece of the MVC architecture is well defined and self-contained, which is referred to as the
    separation of concerns. The logic that manipulates the data in the model is contained only in the model,
    the logic that displays data is only in the view, and the code that handles user requests and input is
    contained only in the controller. With a clear division between each of the pieces, your application will
    be easier to maintain and extend over its lifetime, no matter how large it becomes.

    简单来说,就是MVC的每一层都是定义明确而且是自包含,业务逻辑数据应当而且只能在Model层,显示逻辑应当而且只能在View层,处理用户请求和输入的应当而且只能在Controller层。

    自己之前总是混淆了Model层和Controller层,把Model层当成了单纯的数据类,而把处理业务逻辑都放到了Controller层,现在总算是明白了

    http://www.kissit.com.cn/
  • 相关阅读:
    Java--从键盘读取
    java--mkdirs()
    Java--正则表达式
    java--利用Filereader BufferedReader读取文本文档
    java--lambda表达式和动态数组arraylist的forEach方法
    substring 方法
    ES 字符串操作
    slice方法
    process.env.NODE_ENV
    像素
  • 原文地址:https://www.cnblogs.com/Junelee1211/p/2507196.html
Copyright © 2011-2022 走看看