Basic MVC Architecture
来源:互联网 发布:淘宝怎么添加旺信 编辑:程序博客网 时间:2024/05/20 03:40
Model View Controller or MVC as it is popularly called, is a software design pattern for developing web applications. A Model View Controller pattern is made up of the following three parts:
Model - The lowest level of the pattern which is responsible for maintaining data.
View - This is responsible for displaying all or a portion of the data to the user.
Controller - Software Code that controls the interactions between the Model and View.
MVC is popular as it isolates the application logic from the user interface layer and supports separation of concerns. Here the Controller receives all requests for the application and then works with the Model to prepare any data needed by the View. The View then uses the data prepared by the Controller to generate a final presentable response. The MVC abstraction can be graphically represented as follows.
The model
The model is responsible for managing the data of the application. It responds to the request from the view and it also responds to instructions from the controller to update itself.
The view
A presentation of data in a particular format, triggered by a controller's decision to present the data. They are script based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology.
The controller
The controller is responsible for responding to user input and perform interactions on the data model objects. The controller receives the input, it validates the input and then performs the business operation that modifies the state of the data model.
Struts2 is a MVC based framework. In the coming chapters, let us see how we can use the MVC methodology within Struts2.
- Basic MVC Architecture
- Basic Printing Architecture
- MMORPG服务器-Basic Architecture
- Web Architecture Basic idea
- 1-LTE Network Architecture: Basic
- 1-LTE Network Architecture: Basic
- MVC Architecture with QT4
- OAF MVC Architecture
- OAF MVC Architecture
- Ext JS MVC Architecture
- Spring MVC architecture
- The Zend Framework MVC Architecture
- The Zend Framework MVC Architecture
- The Zend Framework MVC Architecture
- The Zend Framework MVC Architecture
- The Zend Framework MVC Architecture
- The Zend Framework MVC Architecture
- The Zend Framework MVC Architecture
- EXCEL单元格内容自动换行
- Rational rose生成代码及其反向工程功能手册
- Linux 用户管理 (添加-删除-修改)
- Android MediaScanner 详尽分析
- 'Operation is not valid due to the current state of the object' error during postback
- Basic MVC Architecture
- 代理proxies
- Linux: How to Configure the DNS Server for 11gR2 SCAN [ID 1107295.1]
- 算法导论 第7章 快速排序
- Contoso 大学 - 使用 EF Code First 创建 MVC 应用
- ALSA音频驱动研究(二)
- Android:改变文字字体
- Struts 2 Architecture
- 关于listview的setAdapter和notifyDataSetChanged