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.

Struts 2 Tutorial Basic MVC Architecture的更多相关文章

  1. ExtJS笔记3 MVC Architecture

    MVC Architecture   MVC架构 Contents File Structure Creating the application in app.js Defining a Contr ...

  2. Basic Printing Architecture

    https://blogs.technet.microsoft.com/askperf/2007/06/19/basic-printing-architecture/ Printer sharing, ...

  3. (一)Spring’s MVC Architecture

    Spring’s MVC module Spring’s MVC module is based on front controller design pattern followed by MVC ...

  4. What is difference between 3-layer architecture and MVC architecture?

    By Vikas Singh on Sep 26, 2014 In 3-layer architecture  3-layer architecture separates the applicati ...

  5. Struts 2 Tutorial

    Apache Struts 2 is an elegant, extensible framework for creating enterprise-ready Java web applicati ...

  6. 用struts和hibernate结合MVC层实例

    1.倒包hibernate11个包+sturts2 13个包 2.创建web.xml <?xml version="1.0" encoding="UTF-8&quo ...

  7. Spring、struts、webwork2三者MVC的比较

    http://blog.sina.com.cn/s/blog_4a69fa43010005il.html 在web应用方面,Spring有独立的MVC实现,与struts和webwork2相比毫不逊色 ...

  8. 对spring,struts,hibernate及MVC的理解

    对于spring,hibernate,struts等框架,刚开始的时候总是会很迷茫,不知道他们是用来做什么的. 1.对框架的作用理解 个人认为框架的作用是把代码进行了分类,减少了代码的耦合性. 如果不 ...

  9. Struts+Spring+Hibernate、MVC、HTML、JSP

    javaWeb应用 JavaWeb使用的技术,比如SSH(Struts.Spring.Hibernate).MVC.HTML.JSP等等技术,利用这些技术开发的Web应用在政府项目中非常受欢迎. 先说 ...

随机推荐

  1. 【题解】新型城市化 HAOI2017 网络流 二分图最大匹配 强连通分量

    Prelude 好,HAOI2017终于会做一道题了! 传送到洛谷:→_→ 传送到LOJ:←_← 本篇博客链接:(●'◡'●) Solution 首先要读懂题. 考场上我是这样想的QAQ. 我们把每个 ...

  2. python 字符串切片知识巩固

    切片操作(slice)可以从一个字符串中获取子字符串(字符串的一部分).我们使用一对方括号.起始偏移量start.终止偏移量end 以及可选的步长step 来定义一个分片. 格式: [start:en ...

  3. jdk与jdt

    jdk是java的开发环境 ,程序的编译.运行都需要jdk.一个java开发平台,jdk少不了,而编辑器 可以多种多样,除了 eclipse中的JDT,还有独立的jcreate ,或者用记事本以其他加 ...

  4. ElastAlert监控日志告警Web攻击行为

    由于公司需要监控web攻击行为,而因某些原因搭不了waf,才不得不用ElastAlert进行告警,此为前提. 一.ELK安装 Elasticsearch 是一个分布式.可扩展.实时的搜索与数据分析引擎 ...

  5. openwrt的sysupgrade和factory固件的区别

    openwrt的固件一般分两种类型:factory原厂固件.sysupgrade固件 factory多了一些验证的东西,用于在原厂固件的基础上进行升级. 普通家用路由一般不是openwrt固件,如果要 ...

  6. linux下lz4解压缩遇到的那些事儿

    一.Debian系列:Debian.Ubuntu等1.1 kali下修改apt-get源:   vim /etc/apt/sources.list     deb http://mirrors.ust ...

  7. Linux基础-host文件解析

    任务目标:为集群内的机器设定主机名,利用/etc/hosts文件来解析自己的集群中所有的主机名, 相应的集群的配置应该改成使用主机名的方式 使用 hostnamectl set-hostname 设定 ...

  8. 使用solrJ管理索引——(十四)

    a)          什么是solrJ solrj是访问Solr服务的java客户端,提供索引和搜索的请求方法,SolrJ通常在嵌入在业务系统中,通过SolrJ的API接口操作Solr服务,如下图:

  9. 【黑客免杀攻防】读书笔记17 - Rootkit基础

    1.构建Rootkit基础环境 1.1.构建开发环境 VS2012+WDK8 1.2.构建基于VS2012的调试环境 将目标机.调试机配置在同一个工作组内 sVS2012配置->DRIVER-& ...

  10. libevent简介和使用【转】

    转自:http://www.open-open.com/lib/view/open1386510630330.html libevent是一个基于事件触发的网络库,memcached底层也是使用lib ...