doumaji6215 2015-06-15 10:12
浏览 67
已采纳

mvc模式中php控制器的起源是什么?

What is the origin of the controller in a OOP PHP application?

Why if I put an url like:

www.mysite.com/index.php/controller=mycontrol&action=insert

The application enters in the controller class and uses the insert function?

Is controller a particular keyword of PHP?

  • 写回答

1条回答 默认 最新

  • douyu4535 2015-06-15 10:37
    关注

    MVC is a software architecture - the structure of the system - that separates domain/application/business (whatever you prefer) logic from the rest of the user interface. It does this by separating the application into three parts: the model, the view, and the controller.

    The model manages fundamental behaviors and data of the application. It can respond to requests for information, respond to instructions to change the state of its information, and even to notify observers in event-driven systems when information changes. This could be a database, or any number of data structures or storage systems. In short, it is the data and data-management of the application.

    The view effectively provides the user interface element of the application. It'll render data from the model into a form that is suitable for the user interface.

    The controller receives user input and makes calls to model objects and the view to perform appropriate actions.

    All in all, these three components work together to create the three basic components of MVC.

    Reference MVC means

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 ImportError: DLL load failed while importing _iterative: 找不到指定的模块。
  • ¥15 控制工程研究生方向选择
  • ¥15 如何通过交互分析得出某高危患者对放疗获益更多
  • ¥15 相关性分析中,p<0.05, r=0.29,怎么评价相关性呢
  • ¥15 docker部署Mongodb后输入命令报错?
  • ¥15 将下列流程图转变成python程序代码
  • ¥15 我需要全国每个城市的最新小区名字等数据。
  • ¥15 开发一个小区生态的小程序
  • ¥15 如何解决Excel中dependent dropdown list 的问题
  • ¥15 MddBootstrapInitialize2失败