面向对象技术及方法 期末作业(论文)
题 目 基于MVC模式下的网上商城的设计与实现 学 院 计算机与信息学院 专 业 通信与信息系统 学生姓名 学 号 指导老师
1
摘 要
基于Browser/Server结构的Web应用,因其具有易用性、通用性和良好的可扩展性等优点而迅速发展,正逐渐成为实现电子商务系统的主流技术。Asp.Net MVC3构架是MVC设计模式的一个应用实例,应用Asp.Net MVC3构架可以减轻设计和开发大型企业级软件的负担,使设计人员和编程人员在较短的时间里就能够开发出系统原型。
本文在剖析MVC模式的设计思想后,总结了基于MVC模式开发Web应用程序的优缺点;研究了基于MVC模式的工作原理和实现机制;接着作者将实现MVC设计模式的Asp.Net MVC3构架引入到电子商务系统的开发中,并结合一个具体实例网上购物系统开发,实践了应用Asp.Net MVC3构架开发Web应用程序的全过程。在开发过程中,通过应用MVC设计模式实现了表示逻辑和业务逻辑的分离,为系统的开发和维护提供了更大的灵活性和更好的可管理性。通过实践证明,基于MVC设计模式不但能够有效地解决传统Web应用程序开发中存在的问题,而且采用分层和模块化设计,使得系统流程清晰,易于扩展和维护。
关键字:MVC , Asp.Net MVC3构架,设计模式,网上购物系统
E-commerce system development based on MVC pattern
2
Abstract
Web-based applications with the Browser/Server mode make great progresses for its general availability, which is easy use and good expansibility in the design of e-commerce system development. Asp.net mvc3 is an application instance of MVC pattern, it can be used to reduce workload obviously in order to make the engineers to develop the system prototype rapidly.
In this paper, after analyzing the design idea of MVC pattern, we get the conclusion of advantage and disadvantage of the Web application based on MVC pattern. Then researching the work principle and the process of realization of Asp.net mvc3 framework based on MVC pattern. The author applies the MVC design to the e-commerce system development.With an instance of shopping System on line development, we carry out the whole process of developing web application with mvc framework. In this case, distinction between description logic and business logic become reliable within the MVC design pattern, which means better flexibility and easier management the exploration of a system. It proves that the MVC pattern and Struts Framework are a good choice to development of Web Applications, considering its functional classification, system extensibility, and maintainability.
Keywords: MVC , Asp.net ,design pattern, Net shopping system
目 录
3
1 绪论 .............................................................................................................................................. 1
1.1 课题设计背景及目的 ........................................................................................................ 1
1.1.1设计背景 .................................................................................................................. 1 1.1.2 设计目的 ................................................................................................................. 1 1.2 国内外研究状况 ................................................................................................................ 2 1.3 课题设计方法 .................................................................................................................. 2 1.4 本文的主要研究内容 ...................................................................................................... 2 1.5 论文的构成 ...................................................................................................................... 3 2 MVC设计模式 .......................................................................................................................... 4
2.1 什么是MVC设计模式 ................................................................................................... 4 2.2 MVC的组成.................................................................................................................... 4 2.4 MVC的处理过程 ............................................................................................................ 6 2.5 MVC模式的优点 ............................................................................................................ 6 2.6 MVC模式的缺点 ............................................................................................................ 7 4 基于MVC模式的网上购物系统设计 ...................................................................................... 8
4.1 网上购物系统设计的总体方案 ...................................................................................... 8
4.1.1系统概述 .................................................................................................................. 8 4.1.2 系统需求 ................................................................................................................. 8 4.1.3 系统功能 ................................................................................................................. 9 4.2 网上购物系统模块功能分析 ............................................................................................ 9
4.2.1 模块划分 ................................................................................................................. 9 4.3 数据库设计 .................................................................................................................... 10
4.3.1 表的设计 ............................................................................................................... 10 4.4 系统模块设计 .................................................................................................................. 10
4.4.1 用户注册模块 ....................................................................................................... 10 4.4.2 购物模块 ............................................................................................................... 11 4.4.3 商品管理模块 ....................................................................................................... 11 4.4.4 订单管理模块 ....................................................................................................... 11
5 网上购物系统功能测试 ........................................................................................................... 12
5.1 系统的调试 ...................................................................................................................... 12 5.2 系统测试 .......................................................................................................................... 12 6 总结和展望 ............................................................................................................................... 17
6.1 总结 .................................................................................................................................. 17 6.2 新技术的展望 .................................................................................................................. 18
6.2.1 JSF (Java Server Faces) ......................................................................................... 18 6.2.2 ASP.NET 4.0 .......................................................................................................... 19
致 谢 ............................................................................................................................................ 20 参考文献......................................................................................................................................... 21
4
相关推荐: