检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
机构地区:[1]仲恺农业工程学院信息科学与技术学院,广东广州510225
出 处:《计算机时代》2015年第4期43-46,共4页Computer Era
基 金:广东省科技计划项目(2012B040500040);广东省科技计划高新技术产业化项目(2012B010100048);广州市海珠区科技计划项目(2014-cg-31)
摘 要:控制器在MVC模式中起着重要作用。分析了J2EE中MVC模式的实现方式,指出了经典的基于Servlet控制器的不足,分析了Struts2中控制器的核心原理。提出了一种基于门面模式和简单工厂模式的轻量级控制器框架,将其命名为"1+N"模式控制器。该控制器主要包括核心控制器和业务控制器,由核心控制器统一响应客户前端的请求,并将请求转换到相应的业务控制器进行处理。给出了该框架中核心类的源代码。该框架易于使用且具有较好的可扩展性和可维护性。The controller plays an important role in the MVC mode, this paper analyzes the implementation of the MVC model in J2EE, poins out the drawback of the classic controller based on Servlet and analyzes the core principle of the controller in Struts2. Then proposes a framework of lightweight controller based on Facade pattern and simple factory pattern, which named as “1 +N” controller. The controller framework incudes core controller and business controller. The core controller responses the client request unified and then transfers the request to the business controller to process. The paper gives the source code of the core class in the framework. The framework is easy to use and has good scalability and maintainability.
关 键 词:MVC 控制器 门面模式 简单工厂模式 核心控制器
分 类 号:TP311[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:18.226.159.125