电子商务网站的建设毕业设计.doc_第1页
电子商务网站的建设毕业设计.doc_第2页
电子商务网站的建设毕业设计.doc_第3页
电子商务网站的建设毕业设计.doc_第4页
电子商务网站的建设毕业设计.doc_第5页
已阅读5页,还剩40页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

焦作大学毕业设计说明书 第44页共46页 焦 作 大 学毕业设计(论文)说明书作 者: 徐帅利 学 号: 120304118 学院(系): 信息工程学院 专 业: 软件技术 题 目: 好买网 主 题: 电子商务网站的建设 指导教师: 孟军霞 职称: 2009年12月摘要3abstract4第一章 前言6第二章 开发工具及运行环境62.1开发工具的选用与介绍62.2系统软件要求72.3系统运行环境7第三章 网站建设73.1网站建设步骤73.2.1数据库准备103.2.2购物车的实现153.2.3新闻阅读页173.2.4商品详情页183.2.5共享页面203.2.6留言页203.2.7后台页面223.2.8最近浏览243.2.9分页显示263.2.10大分类小分类级联283.2.11 文件上传293.2.12 js实现登陆验证与验证码的实现以及ajax实现注册无刷新验证32第四章 网站的测试与发布434.1网站的测试434.2 网站的发布43第五章 网站的维护与更新435.1网站的维护445.2 网站的更新44致谢45参考文献46摘要随着互联网的飞速发展,电脑网络已经应用到各个领域,普及到千家万户,无论是国内还是国外都迅速发展起来。现在,网络已经成为人们快速获取信息、发布信息和传输信息的主要渠道,成为每个人生活中的一部分,同时网络也提供一个很好的信息交流平台。目前,网页设计和网站建设成为新时代的一个热点。电子商务也应运而生。电子商务,electronic commerce,通常是指在全球各个广泛的贸易活动中,在因特网开放的网络环境下,基于浏览器/服务器应用方式,买卖双方不谋面地进行各种商贸活动,实现消费者网上购物、客户之间的网上交易和在线电子支付以及各种商务活动、交易活动、金融活动和相关的综合服务活动的一种新型的商业运营模式。我们曾经一直在校门外摆地摊,要毕业了,有些存货,再加上好多同学在抱怨行李太多了带不完,扔了可惜。结合自己的专业,以及市场情况我们决定建立一个商务网站解决大家的难题,建立一个网站就是在网上给你的企业建一个家,这样你就可以在这里向客户介绍你的企业,展示你的实力,推销你的产品。客户可以给你的网站发电子邮件咨询问题,你可以把最新的产品放在网上供大家选购。世界上任何一个上网的人都可以拜访你的企业,而你的企业同时也展示在全世界的面前。这是一个多么好的宣传企业、树立企业形象的方式。不得不感叹internet给人们生活带来的方便以及给社会创造的价值。由于我们的资金不够,也怕货物积存。我们没有将同学的物品买下,而只是将他们想卖的东西拍成照片,并运用ps技术进行处理后上传到网站上去,等有人买了,我们就向其联系。本网站主要运用开源数据库mysql,开源的开发语言java,以及开源工具eclipse入手,实现网上购物系统的主页浏览模块、会员登录、管理员登陆模块,买家留言模块、会员注册模块与身份验证模块、购物车等方面的设计,从网站的主页、界面设计方面研究,并探讨了运用数据库技术,基于javaee的动态网页设计和mysql数据库进行电子商务网站的设计和实现,此文一一简单介绍其设计从、思想和设计方法,由于网站的初衷是好买好卖,所以就已“好买网”命名,现在网站的羽翼还不怎么丰满,期待以后尽可能的去完善。在制作过程中,我参考了有关教材和某些网站的资料,老师也给与我相应的指导,在此表示感谢!由于制作水平有限,时间仓促,不妥之处在所难免,衷心希望大家批评并给与好的建议。关键字:网站设计,javaee,eclipse,ajax,jsabstractwith the rapid development of internet,computernetworkhas been applied to various fields,spread tothousands of households,whether domestic or foreigndeveloped rapidly.now,the network hasbecome the mainchannel for people toget information quickly,information releaseand transmission of information,become apart of everyones life,at the same time,the networkalso provides a very goodplatform for the exchange of information.at present,webpagedesign and website constructionhas become a hot spotin the new era.electroniccommerce alsoemerge as the times require.electronic commerce,electroniccommerce,usually refers to theall the worldwidetrade activities,theinternet and opennetwork environment,based onbrowser /serverapplicationmode,both parties not metforvarious business activities,a new business modelto achieve between theconsumeronline shopping,online transactionsandonlinecustomerspayment and various business activities,trading activities,financial activities and related serviceactivities.we have beenoutside the schoolset up a stall,be graduated,some of the inventory,plusa lot of studentscomplainingtoo much baggagebeltnot over,throwing a pity.combined with their ownprofessionalmarket,andwedecided to build abusiness web siteto solveallproblems,the establishment of aweb site or online toyour enterprise to build a home,so you canintroduce yourbusiness to customerhere,show your strength,sell your products.the customer cangive your websiteemailconsultation the problem,you cangetthe latest producton the internet for you to choose.no one in the world ofinternet can visityour company,and your enterprise alsodisplay in front of the whole world.thisis a very goodpropaganda enterprise,establish a corporateimage of the way.had to sighinternetfor people living with theconvenienceandvalue to thesocietyof creation.because we havenot enough funds,is also afraid ofgoodsstored.we dont haveourgoods to buy,butthey willwant to sellthings tophotograph,anduse ps technology forprocessing uploadto the website,etc.some people bought,wewent tothecontact.this websitemainly uses theopen sourcemysql database,open sourcedevelopment language java,andopen source toolsofeclipse,the realization of online shoppingsystem home pagemodule,member login,the administrator login module,message module,the designof buyersregister moduleandauthentication module,shopping cartand other aspects of theresearch,from thesites home page,interface design,and discusses the application of database technology,javaee dynamicweb pagedesign anddatabase based on mysqlis designed and realized usingelectroniccommerce website,this articleintroducesthedesign,from thethinking and design methods,because the sites original intention is goodbuysell,so theyhave beengood buynet name,the website nowwingshow notplump,looking forward to the future totry toimprove.in the production process,i made reference tothe relevant materials andsomesite information,the teacher alsogave methe appropriate guidance,thanks! because the manufacturinglevel is limited,the time is hasty,the inadequaciescan hardly be avoided,sincerely hope thatwecriticizeand givegood suggestion.keywords:website design,javaee,eclipse,ajax,js第一章 前言在全球经济形势不景气的情况下,受到的冲击力最大的是全球中小企业和中国的大多数中小企业,作为应届大学生的我们就业压力就像一只无形的手压得我们喘不过气来。就算找到了工作工资也少得可怜,“打工不如创业”那么信息时代我们靠什么来创业,当然是通过电子商务来做生意,因为最少的投入可以收到最大化的回报!我本次制作的网站是个购物网站,网站的名字叫“好买网”,之所以取这样一个名字是因为我刚开始建设这个网站的初衷“好买好卖”,“好买网”主营图书、家电、服装,虽然网站内容不是很多,但是都能看出是个购物网站。本店除了能够实现基本的功能,还设有在线留言及买后评价的工能,当然会员注册也是免不了的。“好买网”主要借助eclipse实现,动态部分主要利用mysql数据库来实现,当然一个网站视觉效果也是很重要的,在网站里面,我们加如了多种元素,风格简单又不失单调。第二章 开发工具及运行环境2.1开发工具的选用与介绍eclipses是一款专业的javeee的动态网站编译工具,对于web站点、web页面和web应用程序进行设计、编码和调试,虽然其比不上dream有可视化编辑窗口,但其手工编代码的方式却让页面变得更灵活,不会产生冗余的代码,使用jsp,servlet生成由动态数据库支持的web应用程序。优点:(1) 最佳的制作效率:灵活多变,不产生多余的代码。自定义样式表、div,思路比较清晰,更重要的是它能编辑、调试java代码,这是其它网页编辑工具所没有的,同时也能也flash,ps做到良好的融合。(2) 网站管理:使用通过发布不同的项目就可以看到不同的项目运行的结果,项目一经发布就会更新所有的链接,并且支持代码改错功能,即使有复杂难记的代码也没关系,按下alt+/所有提示代码都会出来。(3) 动态网站的调试能力:一旦网站出现什么异常,在控制台就会打印出相应的信息,我们就可以根据错误提示来找到错误并修改。tomcat一款开源免费的服务器,深受广大网站开发者的喜爱,目前最新的应该到了tomcat8,与jdk8相对应优点:(1) 开源免费(2) 轻巧不失稳重2.2系统软件要求系统配置不应过低,因为考虑到今后可能要对网站的功能进行扩充,所以应做到未雨绸缪,如因特殊原因配置达不到,或者不打算长期从事这一职业(也就不需要多大扩充维护),低配置也没有多大关系2.3系统运行环境由于本网站使用java语开发的,可移植性好,只要是装有java虚拟机的任何操作系统都能运行,如果没有装jdk8.0的话,可以到官网下载,傻瓜式安装就行了,有兴趣的还可以配置环境变量(一般都是开发人员才配置),其次就是服务器了,由于网站规模不是很大,tomcat8对付它绰绰有余。第3章 网站建设3.1网站建设步骤由于目前所见即所得的工具越来越多,使用也越来越方便,所以制作网页已经成为了一件轻松的工作,不像以前要手工编写也一行代码源那样。一般初学者经过短暂的学习就可以学会制作网页,于是他们认为网页制作非常简单,就匆匆忙忙制作自己的网站,可是做出来之后与别人一比,才发现自己的网站非常粗糙,这是为什么呢?常言道:“心急吃不了热豆腐”。建立一个网站就像盖一幢大楼一样,他是一个系统工程,有自己特定的工作流程,你只有遵循这个步骤,按部就班地一步一步来,才能设计出一个满意的网站。(1) 确定网站主题网站主题就是你建立的网站所要包含的主要内容,一个网站必须要有一个明确的主题。特别是对于个人网站,你不可能像综合网站那样做的内容大而全,包罗万象。你没有这个能力,也没有这个精力,所以必须要找准一个自己最感兴趣的内容,做深、做透,办出自己的特色,这样才能给用户留下深刻的印象。网站的主题无定则,只要是你感兴趣的,任何内容都可以,但主题要鲜明,在你的主题范围内内容做到大而全,精而深。本设计属于商业型网站,主题主要是对商品进行全面的描述,能有让产品本身有说话的力量。(2) 收集资料明确了网站的主题以后,你就要围绕主题开始搜集材料了。常言道:“巧妇难为无米之炊”。要想让自己的网站有血有肉,能够吸引住用户,你就要尽量搜集材料,搜集的材料越多,以后制作网站就越容易。材料既可以从图书、报纸、光盘、多媒体上得来,也可以从互联网上去粗取精,去伪存真,作为自己制作的网页素材。由于本网站属于商业网站,所以我们网站上的商品图片是根据自己的商品拍摄并用ps技术进行处理后而上传的。(3) 规划网站一个网站设计的成功与否,很大程度上决定于设计者的规划水平,规划网站就像设计师设计大楼一样,图纸设计好了,才能建成一座漂亮的楼房。网站规划包含的内容很多,如网站的结构、栏目的设置、网站的风格、颜色搭配、版面布局、文字图片的应用等,你只有在制作网页之前把这些方面都考虑到了,才能在制作时驾轻就熟、胸有成竹。也只有如此制作出来的网页才能有个性、有特色、具有吸引力。如何规划网站的每一项具体内容,我们会在下面介绍。(4) 选择合适的制作工具和制作语言尽管选择什么样的工具并不会影响你设计网页的好坏,但是一款功能强大、使用简单的软件往往能起到事半功倍的效果。网页制作设计的工具比较多,首先就是网页制作工具了,目前大多数网民选用的都是所见即所得的编辑工具,这其中的优秀者当然是dream weaver和front page了,如果是初学者,front page是首选。除此之外,还有图片编辑工具,如photo shop等,动画制作软件flash,网页特效工具会声会影,网上有许多这方面的软件,你可以根据需要灵活运用。根据个人实力以及网站的功能实现的要求,由于本人的使用习惯还是编写代码比较实用,主要采用eclipse实现java8的注解+servlet+jsp动态网站建设。(5) 制作网页材料有了,工具也选好了,下面就需要按照规划一步步地把自己的想法变成现实了,这是一个复杂而细致的过程,一定要按照先大后小,先简单后复杂来进行制作。所谓先大后小,就是说在制作网页时,先把大的结构设计好,然后在逐步完善小的结构设计。所谓先简单后复杂,就是先设计出简单的内容,然后再设计复杂的内容,以便出现问题时好修改。在制作网页时要多灵活运用模板,这样可以大大提高制作效率。(6)网站大致的架构(7)发布测试网页制作完毕,最后要发布到web服务器上,才能够让全世界的朋友观看,现在上传的工具很多,有些网页制作工具本身就带有ftp功能,利用这些ftp工具,你就可以方便地把网站发布到自己申请的主页存放到服务器上。网站上传以后,你要在浏览器中打开自己的网站,逐页、逐个链接的进行测试,发现问题,及时修改,然后再上传测试,全部测试完毕就可以把你的网址告诉朋友,让他们来浏览。(8)推广宣传网页做好之后,还有不断地进行宣传,这样才能让更多的朋友认识它,提高网站的访问率和知名度。推广的方法有很多,例如到搜索引擎上注册、与别的网站的交换链接、加入广告链接等(9)维护更新网站要注意经常维护更新内容,保持内容的新鲜,不要一做好就放在那不问了,只有不断地给他补充新的内容,才能够吸引住浏览者。站点结构图如图3-1所示3.2.1数据库准备(1) :字段名说明用户表(user):存放用户基本信息字段名称说明类型备注id主键int非空,主键,自增login_id用户名varchar(30)非空,唯一user_name真实姓名varchar(30)password密码varchar(30)gender性别varchar(2)birthday出生日期dateidentity_no身份证号varchar(20)emailemailvarchar(80)mobile手机varchar(20)address地址varchar(256)role角色int1普通用户,2管理员留言表(comment):存放用户留言字段名称说明类型备注id编号int主键,自动编号content留言varchar(1024)reply回复varchar(1024)nick_name留言用户昵称varchar(30)create_time留言时间datetimereply_time回复时间datetime商品表(product):存放商品基本信息字段名称说明类型备注id商品编号int主键,自动编号product_name商品名字varchar(80)description商品描述varchar(1024)price商品价格doublestock商品库存intcategory_id所属分类idintchild_id所属二级分类idintfile_name上传文件名varchar(256)商品分类表(category):存放商品分类基本信息字段名称说明类型备注id编号int主键,自动编号category_name名字varchar(80)parent_id父分类int订单表(order_header):存放订单相关信息字段名称说明类型备注id编号int主键,自动编号user_id用户idintuser_name用户名varchar(30)user_address用户地址varchar(256)create_time创建时间datetimecost金额doublestatus状态int1下单 2审核 3配货4送货中 5收货并确认pay_type付款方式int1货到付款 2网上支付订单详情表(order_detail):存放订单详细信息字段名称说明类型备注id编号int主键order_id订单idint外键product_id商品idintquantity数量intprice单价doublecost金额double(2) :建表脚本create_goodbuy.sqldrop database if exists goodbuy;create database goodbuy default character set utf8 default collate utf8_general_ci;use goodbuy;create table user(id int not nullauto_increment,login_id varchar(30)null,user_namevarchar(30)null,passwordvarchar(30)null,gendervarchar(10)null,birthdaydatenull,identity_novarchar(20)null,emailvarchar(80)null,mobilevarchar(20)null,addressvarchar(255)null,roleintnull,constraintpk_userprimary key(id),constraint uq_user_login_idunique(login_id);create table news(idint not nullauto_increment,titlevarchar(50)null,contentvarchar(1024)null,create_timedatenull,constraintpk_user primary key(id);create table comment(idintnot nullauto_increment,contentvarchar(512)null,replyvarchar(512)null,nick_namevarchar(30)null,create_timedatenull,reply_timedatenull,constraintpk_commentprimary key(id);create table category(idintnot nullauto_increment,parent_idintnull,category_namevarchar(80)null,constraintpk_categoryprimary key(id);create table product(idintnot nullauto_increment,product_namevarchar(80)null,descriptionvarchar(1024)null,pricedoublenull,stockintnull,category_idintnull,child_idintnull,file_namevarchar(256)null,constraintpk_productprimary key(id),constraint fk_product_category1foreign key(category_id) references category(id),constraint fk_product_category2foreign key(child_id) references category(id);createtable order_header(idint not nullauto_increment,user_idintnull,user_namevarchar(30)null,user_addressvarchar(255)null,create_timedatenull,costdoublenull,statusintnull,pay_typeintnull,constraint pk_order_headerprimary key(id);create tableorder_detail(idint not nullauto_increment,order_id intnull,product_idintnull,quantityintnull,pricedoublenull,costdoublenull,constraint pk_order_detailprimary key(id),constraint fk_order_detail_headerforeign key(order_id)references order_header(id),constraint fk_order_detail_productforeign key(product_id)references product(id);insert into user(login_id, user_name, password, gender, birthday, identity_no, email, mobile, address, role)values(admin, 管理员, admin, 男, null, null, null, 110, 河南洛阳, 2 );insert into user(login_id, user_name, password, gender, birthday, identity_no, email, mobile, address, role)values(a, 普通用户, a, 男, null, null, null, 119, 河南洛阳, 0 );insert into user(login_id, user_name, password, gender, birthday, identity_no, email, mobile, address, role)values(b, 普通用户, b, 女, null, null, null, 120, 河南洛阳, 0 );insert into user(login_id, user_name, password, gender, birthday, identity_no, email, mobile, address, role)values(c, 普通用户, c, 女, null, null, null, 112, 河南洛阳, 0 );insert into news(title, content, create_time)values(最新酷睿笔记本, ibme系列全场促销中,最新酷睿双核处理器,保证cpu更高效的运转。,2012-12-12);insert into news(title, content, create_time)values(团购无忧, 团购无忧,2012-12-12);insert into news(title, content, create_time)values(会员特惠月开始了, 会员特惠月开始了,2012-12-12);insert into news(title, content, create_time)values(加入会员,赢千万大礼包, 加入会员,赢千万大礼包,2012-12-12);insert into news(title, content, create_time)values(迎双旦促销大酬宾, 迎双旦促销大酬宾,2012-12-24);insert into news(title, content, create_time)values(新年不夜天,通宵也是开张了, 新年不夜天,通宵也是开张了,2012-12-31);insert into news(title, content, create_time)values(积分兑换开始了, 积分兑换开始了,2012-12-12);insert into news(title, content, create_time)values(配货通知, 配货通知,2012-12-12);insert into news(title, content, create_time)values(团购阿迪1折起, 团购阿迪1折起,2012-12-12);insert into comment(content, reply, nick_name, create_time, reply_time)values(刚订了台ipod,很是期待啊,货已发出,请注意收货时开箱检查货物是否有问题, 黎明,2012-1-1,2012-1-2);insert into comment(content, reply, nick_name, create_time, reply_time)values(佳能d50现在可以多长时间发货呢,很是期待啊,一般在订单确认后的第3天发货, 大宝,2012-1-1,2012-1-2);insert into category(parent_id, category_name)values(0, 图书);insert into category(parent_id, category_name)values(0, 生活用品);insert into category(parent_id, category_name)values(1, 少儿图书);insert into category(parent_id, category_name)values(1, 其他图书);insert into category(parent_id, category_name)values(2, 家用电器);insert into category(parent_id, category_name)values(2, 厨房用品);insert into category(parent_id, category_name)values(2, 化妆品);insert into product(product_name, description, price, stock, category_id, child_id, file_name)values(画册, 画册, 100, 1000, 1, 4, 591.jpg);insert into product(product_name, description, price, stock, category_id, child_id, file_name)values(饭盒, 韩国风格, 200, 1000, 2, 6, 592.jpg);insert into product(product_name, description, price, stock, category_id, child_id, file_name)values(护肤王, 女士专用, 300, 1000, 2, 7, 596.jpg);insert into product(product_name, description, price, stock, category_id, child_id, file_name)values(奶粉, 三元, 120, 1000, 2, 6, 601.jpg);insert into product(product_name, description, price, stock, category_id, child_id, file_name)values(旅行包, 旅行包, 80, 1000, 2, 5, 641.jpg);insert into product(product_name, description, price, stock, category_id, child_id, file_name)values(项链, 饰品, 300, 1000, 2, 7, 643.jpg);insert into product(product_name, description, price, stock, category_id, child_id, file_name)values(丝袜, 女士, 50, 1000, 2, 7, 645.jpg);insert into product(product_name, description, price, stock, category_id, child_id, file_name)values(显示器, 三星, 800, 1000, 2, 5, 660.jpg);insert into product(product_name, description, price, stock, category_id, child_id, file_name)values(液晶屏, 纯平液晶显示器, 590, 1000, 2, 5, 663.jpg);insert into order_header(user_id, user_name, user_address, create_time, cost, status, pay_type)values(1, a, 河南洛阳, 2013-1-18, 1390, 1, 1);insert into order_detail(order_id, product_id, quantity, price, cost)values(1, 8, 1, 800, 800);insert into order_detail(order_id, product_id, quantity, price, cost)values(1, 9, 1, 590, 590);3.2.2购物车的实现 站点结构图如图3-2-2所示购物车cart.javapackage com.boxy.goodbuy.bean;import java.util.arraylist;import java.util.list;public class cart private integer userid;private list items =new arraylist();public void add(cartitem item)cartitem cart=getcartdetail(item);if(cart!=null)cart.setquantity(cart.getquantity()+item.getquantity();elseitems.add(item);public void remove(cartitem item)cartitem cart=getcartdetail(item);if(cart!=null)items.r

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论