学号:281403117题目:基于J2EE架构网上书店的设计与实现学院:信息学院专业:计算机科学与技术姓名:康乐指导教师:任秀丽完成日期:2012年5月13日摘要随着互联网的普及,电子商务技术在不断的发展,Internet不仅给我们带来了无穷无尽的多媒体信息,更带来了商业模式和消费观念的变迁,这是对传统商业模式的一种挑战。
随着大量电子商务的崛起,越来越多的人选择在网上进行购物。
相对传统的购书方式来说,网上购书的好处是多方面的,对于商家来说,可以有效的控制成本;对于客户来说,网上购书方便快捷、经济省时,足不出户就能买到想要的书籍,因此网上书店有很大的发展空间。
而要满足这种大量的需求,需要一种强大快速、高效稳定的技术作为支撑。
J2EE就是这样一种技术,它提供一个多层的分布式模型,是一组技术规与指南,其中所包含的各类组件、服务架构及技术层次,均有共同的标准及规格。
通过组建重用,允许多台服务器集成部署,具有稳定的可用性、可伸缩性。
本设计使用J2EE技术在网络上架构了一个网上书店,从理论和实际两个角度出发,对网上书店进行设计和实现。
网上书店的主要有用户管理、购买图书、图书分类查看、图书检索等功能。
在构建的过程中使用了多种技术,包括MVC 的架构风格、多种设计模式等,合理的运用了各种技术的优势,力争开发出一个具有高健壮性、稳定性、易用性、可靠性的系统,为顾客在平时的生活中网上购买书籍提供强大的后台支撑,以满足顾客的网上购书需求。
全文共分为六个部分,第一部分主要介绍了电子商务的背景和本系统所使用的技术;第二部分介绍了本系统所涉及的各方面的需求;第三部分为本系统的总体设计思路、过程以及数据库的概念设计;第四部分为系统各个模块的详细设计和实现以及相关细节;第五部分为对系统部分功能的测试过程;第六部分是总结。
关键词:J2EE;设计模式;电子商务;网上书店;数据库AbstractWith the spread of the Internet,the e-merce technology is developing fast.The Internet brings us not only infinite multi-media information,but also brings the changes of merce pattern and consuming concept, which is a challenge to the traditional merce pattern.With the arising of many online shops,more and more people choose to shop online.pared with the way of buying books traditional,shopping online has a variety of advantage.To the merchants,they can control the costing easily.To the customers,it is so convenient and economical to buy books online;they do not have to go out of home to buy a book they like.So the online-bookstore has a great development.To mean the great need,we have to provide a powerful and efficient technology to support it.The J2EE technology is a kind of technology like this,it provide a variety-layer distribute model.It is a kind of technology standard and guide,the variety ponents and server architecture which contains have the same standard.By reuse the ponents,it allows deploy on many servers,which has high efficiency and high scalability.This design buildsan online-bookstore by using the J2EE technology.From the point of view of practice and theory,the online-bookstore is designed and realized. The primary function of the online-bookstore contains the management of the users, shopping on the bookstore and checking the book by different category.In the procedure of building the bookstore,many technologies are used,including the architecture of MVC style and many design models, theadvantage of variety of many technology is full used, which sustain the need of the customer buying book online.The text is divided into 6 parts.The first part introduces some background knowledge about e-merce and the technology the design uses. The second part introduces the need of variety aspects the system involved. The third part gives the process, some ideas and related details in system designing, which also include the concept design of the database. The fourth part displays the detail design of every part of the system and related details. The fifth part introduces the test of the part of the system. The sixth part is the summary.Key words:J2EE; Design Pattern;E-merce; Online Bookstore; Database目录序言2第1章绪论31.1课题背景31.2 MVC架构风格41.3 J2EE体系结构7第2章需求分析112.1 概述112.2 功能性需求122.2.1 功能划分122.2.2 功能描述132.3 非功能性需求14第3章总体设计和功能概述153.1 功能模块划分153.2 网上书店结构层次图163.3 网上书店系统建模163.4 数据库概念结构设计19第4章系统详细设计和实现204.1 数据库逻辑实现204.2 用户登陆注册模块的设计与实现234.2.1 用户登陆模块234.2.2 用户注册模块254.3 图书浏览模块的设计与实现274.3.1 文件关系274.3.2 图书浏览模块截图284.4 购物车模块的设计与实现294.4.1 文件关系294.4.2 购物车模块截图304.5 图书管理模块的实现30第5章系统测试335.1 系统功能测试335.2 系统实用性分析35第6章总结36参考文献37致38序言电子商务,最初出现在1993年美国克林顿政府工作报告对国家信息基础设施的描述中,含义就是利用电子信息技术、网络互联技术和现代通讯技术,有效地把商品的资源管理和人们的交易行为结合起来,从而实现商品和服务交易的计算机化、网络化。
随着互联网的快速发展和在人群中的普及化,以及中小企业应用电子商务进程的推进和国家对电子商务发展的重视,网络已经开始影响人们的生活观念,改变国人的消费模式。
越来越多的消费者选择进行网上购物,根据淘宝网的统计数据,截至2007年12月31日,我国网上购物的人数超过5500万,较2002年增长近7倍。
每天有近900万人在淘宝网上“逛街”,相当于近600个沃尔玛、家乐福的平均客流量。
据中国互联网络信息中心(NIC)的报告,2009年至少在网上买过一次东西的中国网民数历史性地突破了1亿,达到1.08亿,增长46%;而艾瑞的报告也同样显示了“网购”的中国网民突破1.1亿。
根据我国电子商务研究中心发布的《2010年(上)电子商务市场数据检测报告》显示,截至2010年6月份,国个人网店的数量已经达到了1200万家。
可见电子商务交易量增长非常快,越来越受到人们的青睐,各种Web互联网的技术也呈现出一种共同繁荣的景象,各种编程语言也使整个互联网的Web技术体系日趋成熟,每种技术都有各自的优势。
而近几年电子商务的发展速度越来越快,大量的客户需求需要处理,要求并发性的处理非常高。
本设计就是针对电子商务而建立的一个网上书店,采用J2EE技术体系,包括了JSP、JavaBean、E、JDBC、JNDI一系列的J2EE相关技术,另外数据库采用ORACLE,以便满足大量数据处理的需求,服务器采用WebLogic,体现了较高的性能,满足了高并发性的需求。
本系统是基于B/S结构的,一方面采用了J2EE的四层体系,即运行在客户端机器上的客户端组件、运行在J2EE服务器上的Web层组件、运行在J2EE服务上的业务逻辑层组件、服务器上的数据访问层组件;另一方面,在表现层和业务逻辑层则采用了MVC架构风格,在Java类的设计上采用多种设计模式。
在客户端只需要浏览器即可,无需安装任何其他软件,满足了众多应用客户分散环境下的需求。
第1章绪论1.1课题背景随着社会的不断进步,互联网的不断发展,网上书店如雨后春笋般在国外迅速发展,如全球的亚马逊网上书店,国的当当网和卓越网等。