• 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/
  • 相关阅读:
    毕业设计-角色用户管理
    质因数分解
    高次同余方程
    线性同余方程
    乘法逆元
    约数,整除
    扩展欧几里得算法
    同余
    P2303 [SDOI2012] Longge 的问题
    最大公约数(gcd)与最小公倍数(lcm)
  • 原文地址:https://www.cnblogs.com/Junelee1211/p/2507196.html
Copyright © 2020-2023  润新知