基于jsp的網(wǎng)上服裝商城的設(shè)計與實現(xiàn)論文_第1頁
基于jsp的網(wǎng)上服裝商城的設(shè)計與實現(xiàn)論文_第2頁
基于jsp的網(wǎng)上服裝商城的設(shè)計與實現(xiàn)論文_第3頁
基于jsp的網(wǎng)上服裝商城的設(shè)計與實現(xiàn)論文_第4頁
基于jsp的網(wǎng)上服裝商城的設(shè)計與實現(xiàn)論文_第5頁
已閱讀5頁,還剩61頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

畢業(yè)設(shè)計(論文)題目:基于jsp的網(wǎng)上服裝商城的設(shè)計與實現(xiàn)畢業(yè)設(shè)計(論文)要求及原始數(shù)據(jù)(資料):1.綜述國內(nèi)外網(wǎng)上服裝商場技術(shù)研究現(xiàn)狀;2.深入了解網(wǎng)上服裝商場的相關(guān)技術(shù);3.熟練掌握熟練掌握B/S三層架構(gòu)模式的應(yīng)用與分析的應(yīng)用與分析,訓(xùn)練編寫插件程序的能力;4.設(shè)計并實現(xiàn)網(wǎng)上服裝商場中針對某一服裝購買的設(shè)計;5.深入分析網(wǎng)上服裝商城插件的關(guān)鍵技術(shù)與編寫語言;6.訓(xùn)練檢索文獻(xiàn)資料和利用文獻(xiàn)資料的能力;7.訓(xùn)練撰寫技術(shù)文檔與學(xué)位論文的能力。畢業(yè)設(shè)計(論文)任務(wù)書第1頁畢業(yè)設(shè)計(論文)主要內(nèi)容:1.綜述網(wǎng)上服裝商城在生活中的應(yīng)用;2.了解網(wǎng)上服裝商城的相關(guān)技術(shù);3.熟悉網(wǎng)上服裝商城的開發(fā)環(huán)境;4.設(shè)計網(wǎng)上服裝商城的插件;5.深入分析網(wǎng)上服裝商城的關(guān)鍵技術(shù)與編寫語言的設(shè)計流程;6.熟練掌握基于網(wǎng)上服裝商城平臺的插件編寫;7.設(shè)計與實現(xiàn)針對網(wǎng)上服裝商城的程序。學(xué)生應(yīng)交出的設(shè)計文件(論文):1.內(nèi)容完整、層次清晰、敘述流暢、排版規(guī)范的畢業(yè)設(shè)計論文;2.包括畢業(yè)設(shè)計論文、源程序等內(nèi)容在內(nèi)的畢業(yè)設(shè)計電子文檔及其它相關(guān)材料。第2頁主要參考文獻(xiàn)(資料):趙洋.\t"://s.g.wanfangdata/_blank"服裝業(yè)電子商務(wù)系統(tǒng)中基于圖像內(nèi)容檢索的設(shè)計與實現(xiàn)[D].河南大學(xué),2013rticleId=Y2218222&Name=%e6%b8%b8%e5%b0%91%e8%be%89"\t"://s.g.wanfangdata/_blank"游少輝.\t"://s.g.wanfangdata/_blank"基于VRML的3D商品網(wǎng)上展示方案設(shè)計與實現(xiàn)[D].北京大學(xué),2011\t"://s.g.wanfangdata/_blank"蔡舒璟.\t"://s.g.wanfangdata/_blank"石獅市服裝產(chǎn)業(yè)電子商務(wù)系統(tǒng)的設(shè)計與實現(xiàn)[D].電子科技大學(xué),2007閔小玲.\t"://s.g.wanfangdata/_blank"Web應(yīng)用系統(tǒng)設(shè)計的JSP技術(shù)方法[J].黃石理工學(xué)院計算機(jī)學(xué)院,湖北,黃石435003,2007,?4(24)\t"://s.g.wanfangdata/_blank"閆東.px"\t"://s.g.wanfangdata/_blank"淺談JSP動態(tài)網(wǎng)站的技術(shù)開發(fā)[J].沈陽大學(xué)南校區(qū)教育學(xué)院,信息工程學(xué)院0442班,2003,(12)\t"://s.g.wanfangdata/_blank"趙成龍.\t"://s.g.wanfangdata/_blank"一個基于WEB的智能答疑系統(tǒng)的設(shè)計與實現(xiàn)[D].東南大學(xué),2004\t"://s.g.wanfangdata/_blank"張云帆.gdata/_blank"Oracle數(shù)據(jù)庫備份與恢復(fù)策略[J].中石油遼河油田公司信息管理部,盤錦,124010,2009,?35(15)

Chien-HungLiu.\t"://s.g.wanfangdata/_blank"Dataflowanalysisandtestingof?JSP-basedWebapplications[J].Informationandsoftwaretechnology.2006,48(12)XiaohuaWang.fangdata/_blank"Ahybridbiogeography-basedoptimizationalgorithmforjobshopschedulingproblem[J]puters&IndustrialEngineering.2014,73GuangCen.\t"://s.g.wanfangdata/_blank"Aimplementationofanautomaticexaminationpapergenerationsystem[J].Mathematicalandcomputermodelling.2010,51(11/12)第3頁摘要關(guān)鍵詞:網(wǎng)上購物;電子商務(wù);服飾TheDesignandImplementoftheClothingShopWebsiteAbstractWiththedevelopmentofsocietyandthepopularizationoftheInternet,networkofmodernlifehasspreadtoeveryfamily.Onlineshoppingasaformofe-commerceisinitshighefficiencyandlow-costadvantages,hasgraduallybecomeanewbusinessmodelandphilosophy.Moreandmoreconsumers,tiredofalloverthehighstreetsandbacklanestofindtheproductstheyneed,haveaccustomedtousingcomputerforshopping,andenjoytheInternetlife.Theentityclothingstorehasbeendeeplyawareofthatenterpriseoperationintheinformationagehasbeenchangedfromthetechnologyandproductsasthecenterofthebusinessmodeltothecustomerandmarket-orientedbusinessmodel.Soitisverynecessarytobuildatheirowne-commercewebsite.Inthispaper,fromtheclothingshopwebsiteforusersandadministratorsconveniencepointofview,thesystemprovidestheuserfunctionandadministratormanagementfunctions.Theuserfunctionsmainlyincludethenon-registeredusersandtheregisteredusers.Thenon-registereduserscanviewthebasicinformationofproducts.Furthermore,userscanregisterfortheshoppingcart,orderinquiries,thebasicproductinformationview,inordertoreturn,favoritesfunction,messageboard,memberinformationchangesandotherfunctions.Theadministratormanagementfunctionsmainlyincludeboardmanagement,goodscategorymanagement,commoditymanagement,ordermanagement,inventorymanagement,messagemanagement,financialstatistics,advertisingpicturemanagement,membershipmanagement,andsoon.Withthestructuredanalysismethod,throughthesystemplanning,systemanalysis,systemdesign,detailedonlineclothingstorewebsiteoperationprocess,thespecificstepsandtherelatedapplicationnotes.ThesystemisbasedonB/Smode,usingJSPdevelopmenttechnology,Tomcatapplicationserver,MYSQLasthedatabase,usingMyEclipseasadevelopmenttoolfordevelopment.KeyWords:ShoppingOnline;E-Commerce;Apparel目錄1引言 ④使用javascript來綁定和調(diào)用。ajax原理和XmlRequest對象:Ajax的原理簡單來說通過XmlRequest對象來向服務(wù)器發(fā)異步請求,從服務(wù)器獲得數(shù)據(jù),然后用javascript來操作DOM而更新頁面。這其中最關(guān)鍵的一步就是從服務(wù)器獲得請求數(shù)據(jù)。要清楚這個過程和原理,必須對XMLRequest有所了解。XMLRequest是ajax的核心機(jī)制,它是在IE5中首先引入的,是一種支持異步請求的技術(shù)。簡單的說,也就是javascript能及時向服務(wù)器提出請求和處理響應(yīng),而不阻塞用戶,達(dá)到無刷新的效果。所以先從XMLRequest講起,來看看它的工作原理。XMLRequest這個對象的屬性有:onreadystatechange每次狀態(tài)改變所觸發(fā)事件的事件處理程序。responseText從服務(wù)器進(jìn)程返回數(shù)據(jù)的字符串形式。responseXML從服務(wù)器進(jìn)程返回的DOM兼容的文檔數(shù)據(jù)對象。status從服務(wù)器返回的數(shù)字代碼,比如常見的404(未找到)和200(已就緒)statusText伴隨狀態(tài)碼的字符串信息readyState對象狀態(tài)值ajax的優(yōu)點:(其帶來的好處大家基本上都深有體會,在這里只簡單的講幾點) (1)最大的一點是頁面無刷新,在頁面內(nèi)與服務(wù)器通信,給用戶的體驗非常好。(2)使用異步方式與服務(wù)器通信,不需要打斷用戶的操作,具有更加迅速的響應(yīng)能力。(3)可以把以前一些服務(wù)器負(fù)擔(dān)的工作轉(zhuǎn)嫁到客戶端,利用客戶端閑置的能力來處理,減輕服務(wù)器和帶寬的負(fù)擔(dān),節(jié)約空間和寬帶租用成本。并且減輕服務(wù)器的負(fù)擔(dān),ajax的原則是“按需取數(shù)據(jù)”,可以最大程度的減少冗余請求,和響應(yīng)對服務(wù)器造成的負(fù)擔(dān)。平時我們大多注意的都是ajax所帶來的好處諸如用戶體驗的提升,而對其所帶來的缺陷有所忽視,下面著重闡述它先天所產(chǎn)生的的缺陷。ajax的缺點:(1)ajax干掉了back按鈕,即對瀏覽器后退機(jī)制的破壞。這是ajax所帶來的一個非常嚴(yán)重的問題。(2)對IT企業(yè)帶來了新的安全威脅。(3)對搜索引擎的支持比較弱。(4)破壞了程序的異常機(jī)制。(5)另外,像其他方面的一些問題,比如說違背了url和資源定位的初衷。例如,我給你一個url地址,如果采用了ajax技術(shù),也許你在該url地址下面看到的和我在這個url地址下看到的內(nèi)容是不同的。這個和資源定位的初衷是相背離的。 該想法源于淘寶,在淘寶的商品詳情中,當(dāng)鼠標(biāo)停留在商品圖片上時,右側(cè)則會出現(xiàn)一個框可以將圖片放大,這一功能在購物系統(tǒng)中已得到廣泛使用,所以我在本次設(shè)計中也引入了此功能。具體的代碼如下:<scripttype="text/javascript">functiongetEventObject(W3CEvent){//事件標(biāo)準(zhǔn)化函數(shù)returnW3CEvent||window.event;}functiongetPointerPosition(e){//兼容瀏覽器的鼠標(biāo)x,y獲得函數(shù)e=e||getEventObject(e);varx=e.pageX||(e.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));vary=e.pageY||(e.clientY+(document.documentElement.scrollTop||document.body.scrollTop));return{'x':x,'y':y};}functionsetOpacity(elem,level){//兼容瀏覽器設(shè)置透明值if(elem.filters){elem.style.filter='alpha(opacity='+level*100+')';}else{elem.style.opacity=level;}}functioncss(elem,prop){//css設(shè)置函數(shù),方便設(shè)置css值,并且兼容設(shè)置透明值for(variinprop){if(i=='opacity'){setOpacity(elem,prop[i]);}else{elem.style[i]=prop[i];}}returnelem;}varmagnifier={m:null,init:function(magni){varm=this.m=magni||{cont:null,//裝載原始圖像的divimg:null,//放大的圖像mag:null,//放大框scale:15//比例值,設(shè)置的值越大放大越大,但是這里有個問題就是如果不可以整除時,會產(chǎn)生些很小的白邊,目前不知道如何解決}css(m.img,{'position':'absolute','width':(m.cont.clientWidth*m.scale)+'px',//原始圖像的寬*比例值'height':(m.cont.clientHeight*m.scale)+'px'//原始圖像的高*比例值})css(m.mag,{'display':'none','width':m.cont.clientWidth+'px',//m.cont為原始圖像,與原始圖像等寬'height'nt.clientHeight+'px','position':'absolute','left':m.cont.offsetLeft+m.cont.offsetWidth+10+'px',//放大框的位置為原始圖像的右方遠(yuǎn)10px'top':m.cont.offsetTop+'px'})varborderWid=m.cont.getElementsByTagName('div')[0].offsetWidth-m.cont.getElementsByTagName('div')[0].clientWidth;//獲取border的寬css(m.cont.getElementsByTagName('div')[0],{//m.cont.getElementsByTagName('div')[0]為瀏覽框'display':'none',//開始設(shè)置為不可見'width':m.cont.clientWidth/m.scale-borderWid+'px',//原始圖片的寬/比例值-border的寬度'height':m.cont.clientHeight/m.scale-borderWid+'px',//原始圖片的高/比例值-border的寬度'opacity':0.5//設(shè)置透明度})m.img.src=m.cont.getElementsByTagName('img')[0].src;//讓原始圖像的src值給予放大圖像m.cont.style.cursor='crosshair';useover=magnifier.start;},start:function(e){if(document.all){//只在IE下執(zhí)行,主要避免IE6的select無法覆蓋magnifier.createIframe(magnifier.m.img);}this.onmousemove=magnifier.move;this.onmouseout=magnifier.end;},move:function(e){varpos=getPointerPosition(e);//事件標(biāo)準(zhǔn)化this.getElementsByTagName('div')[0].style.display='';css(this.getElementsByTagName('div')[0],{'top':Math.min(Math.max(pos.y-this.offsetTop-parseInt(this.getElementsByTagName('div')[0].style.height)/2,0),this.clientHeight-this.getElementsByTagName('div')[0].offsetHeight)+'px','left':Math.min(Math.max(pos.x-this.offsetLeft-parseInt(this.getElementsByTagName('div')[0].style.width)/2,0),this.clientWidth-this.getElementsByTagName('div')[0].offsetWidth)+'px'})magnifier.m.mag.style.display='';css(magnifier.m.img,{'top':-(parseInt(this.getElementsByTagName('div')[0].style.top)*magnifier.m.scale)+'px','left':-(parseInt(this.getElementsByTagName('div')[0].style.left)*magnifier.m.scale)+'px'})},end:function(e){this.getElementsByTagName('div')[0].style.display='none';magnifier.removeIframe(magnifier.m.img);//銷毀iframemagnifier.m.mag.style.display='none';},createIframe:function(elem){varlayer=document.createElement('iframe');layer.tabIndex='-1';layer.src='javascript:false;';elem.parentNode.appendChild(layer);layer.style.width=elem.offsetWidth+'px';layer.style.height=elem.offsetHeight+'px';},removeIframe:function(elem){varlayers=elem.parentNode.getElementsByTagName('iframe');while(layers.length>0){layers[0].parentNode.removeChild(layers[0]);}}}window.onload=function(){magnifier.init({cont:document.getElementById('magnifier'),img:document.getElementById('magnifierImg'),mag:document.getElementById('mag'),scale:3});}</script>mag:null,//放大框scale:15//比例值,設(shè)置的值越大放大越大,但是這里有個問題就是如果不可以整除時,會產(chǎn)生些很小的白邊,目前不知道如何解決}css(m.img,{'position':'absolute','width':(m.cont.clientWidth*m.scale)+'px',//原始圖像的寬*比例值'height':(m.cont.clientHeight*m.scale)+'px'//原始圖像的高*比例值})css(m.mag,{'display':'none','width':m.cont.clientWidth+'px',//m.cont為原始圖像,與原始圖像等寬'height':m.cont.clientHeight+'px','position':'absolute','left':m.cont.offsetLeft+m.cont.offsetWidth+10+'px',//放大框的位置為原始圖像的右方遠(yuǎn)10px'top':m.cont.offsetTop+'px'})varborderWid=m.cont.getElementsByTagName('div')[0].offsetWidth-m.cont.getElementsByTagName('div')[0].clientWidth;//獲取border的寬css(m.cont.getElementsByTagName('div')[0],{//m.cont.getElementsByTagName('div')[0]為瀏覽框'display':'none',//開始設(shè)置為不可見'width':m.cont.clientWidth/m.scale-borderWid+'px',//原始圖片的寬/比例值-border的寬度'height':m.cont.clientHeight/m.scale-borderWid+'px',//原始圖片的高/比例值-border的寬度'opacity':0.5//設(shè)置透明度})m.img.src=m.cont.getElementsByTagName('img')[0].src;//讓原始圖像的src值給予放大圖像m.cont.style.cursor='crosshair';m.cont.onmouseover=magnifier.start;},start:function(e){if(document.all){//只在IE下執(zhí)行,主要避免IE6的select無法覆蓋magnifier.createIframe(magnifier.m.img);}

7性能測試與分析測試實例(測試集)的研究與選擇程序測試的主要方法分為兩大類,白盒測試和黑盒測試。本系統(tǒng)的測試綜合了白盒測試、黑盒測試兩種方法,但主要使用的是黑盒測試方法。在測試當(dāng)中遵循了“盡早地和不斷進(jìn)行測試”,“保證測試用例的完整性和有效性”原則。通過測試達(dá)到以下測試目的:(1)功能檢查:檢查功能是否爭取,是否遺漏或?qū)崿F(xiàn)不了應(yīng)該實現(xiàn)的功能等。(2)接口檢查:檢查能否正確地接受信息或輸出信息。(3)數(shù)據(jù)檢查:檢查數(shù)據(jù)結(jié)構(gòu)或外部信息是否有(如數(shù)據(jù)文件)訪問錯誤。(4)性能檢查:檢查性能需求能否得到滿足。(5)初始化、終止檢查:檢查是否能進(jìn)行正確地初始化或終止。處理器:Inter(R)Core(TM)2DuoT5750內(nèi)存:3GB硬盤:160G操作系統(tǒng):WindowsXP數(shù)據(jù)庫:MYSQLWeb服務(wù)器:Tomcat實例測試用戶購買產(chǎn)品支付的功能測試表7-1功能測試表測試目的:看注冊會員是否能進(jìn)行產(chǎn)品的購買預(yù)置條件:使用有效的用戶名和密碼登錄網(wǎng)上服裝商城網(wǎng)站;測試過程:預(yù)期結(jié)果:對滿意的產(chǎn)品點擊“購買”按鈕正常顯示購物車頁面;頁面中產(chǎn)品編號、產(chǎn)品名稱、產(chǎn)品單價、數(shù)量、支付金額等系統(tǒng)數(shù)據(jù)完成初始化。點擊“收銀臺”按鈕結(jié)賬結(jié)賬成功,生成訂單信息點擊“提交”按鈕確認(rèn)支付頁面彈出窗口(支付成功)完成測試上述操作均達(dá)到“測試”要求測試實際結(jié)果:經(jīng)過測試證明數(shù)據(jù)錄入驗證功能正常,可以正常過濾出用戶輸入的錯誤信息。并且將處理結(jié)果反饋給用戶,達(dá)到預(yù)期結(jié)果。測試總結(jié)本系統(tǒng)的測試主要是對于前臺各功能模塊和后臺各功能模塊進(jìn)行測試。(1)前臺各功能模塊運行用戶注冊的功能,查看該部分功能對用戶注冊信息的合法性進(jìn)行有效的檢驗。運行修改個人信息功能,驗證能正確獲得用戶的個人信息并成功修改。運行產(chǎn)品展示功能,驗證能否顯示產(chǎn)品信息。運行產(chǎn)品查詢功能,驗證查詢結(jié)果符合所輸入的產(chǎn)品信息。運行購物車功能,驗證能修改產(chǎn)品數(shù)量,刪除產(chǎn)品,添加產(chǎn)品,清空購物車。運行訂單查詢功能,驗證能正確顯示訂單信息。運行收銀臺功能,驗證能填寫訂單,結(jié)賬。(2)后臺各功能模塊運行管理員登錄功能,驗證能正確登錄。運行產(chǎn)品管理功能,驗證能查看產(chǎn)品、添加產(chǎn)品、刪除產(chǎn)品和修改產(chǎn)品信息。運行用戶管理功能,驗證能查看用戶信息和刪除會員。運行訂單管理功能,驗證能正確的查看訂單信息和發(fā)貨。運通過對系統(tǒng)的全面測試,所有測試條目都已經(jīng)通過,實現(xiàn)了基本要求,系統(tǒng)可以正常運行。

8總結(jié)與展望總結(jié):通過這次對網(wǎng)站的設(shè)計,本人對購物網(wǎng)站的交易流程有了更深刻的認(rèn)識,體會到了電子商務(wù)系統(tǒng)的分析與設(shè)計方面,鞏固了以前所學(xué)過的結(jié)構(gòu)化的分析方法,進(jìn)而在實際應(yīng)用中有效的利用。在代碼的編寫方面,確實遇到了很多復(fù)雜的問題,雖然不斷的翻閱資料,網(wǎng)上搜索依舊難以解決,好在通過教師悉心的指導(dǎo),不斷修改各種bug,完善代碼的復(fù)用率,問題逐一被攻克,并且經(jīng)過親自測試,網(wǎng)站達(dá)到了預(yù)期的功能要求,能夠完成交易流程。此刻的內(nèi)心是十分開心的。展望:當(dāng)然網(wǎng)站中還存在很多的不足,代碼的調(diào)用有些地方繁瑣,冗余,代碼重復(fù)率較高,以后的可重用性較差。本網(wǎng)站功能上還是有需要改進(jìn)的地方,此外還可以開放更多的功能,例如站內(nèi)信功能、在線即時交互功能等。在界面顯示上,也可以做的更簡單化,讓用戶使用起來更加便捷。我想這些在未來都會慢慢的成為現(xiàn)實,就如同Children走過的歷程一樣,從幼稚天真漸漸的走向成熟。

結(jié)論本系統(tǒng)的開發(fā)過程,從服裝店的實際需求出發(fā),并對用戶進(jìn)行了深入的調(diào)查,力求最大限度地滿足服裝店和用戶雙方的需求。這個系統(tǒng)我充分考慮了在中國網(wǎng)購飛速發(fā)展的大的環(huán)境下,服裝商城網(wǎng)站的使用的用戶體驗,設(shè)計更加人性化,界面同樣美觀大方,突出商品的亮點,讓客戶充滿購物的渴望。同時,讓網(wǎng)站管理者清晰明了,簡化用戶和操作員的輸入,不得不提的是,現(xiàn)在的大部分網(wǎng)站都有各種系統(tǒng)提示,這樣的話即使你是新手,相信也會很快適應(yīng)怎么使用,對于擴(kuò)大用戶的使用數(shù)量,增加客戶滿意度起到了不可替代的作用。通過不斷完善,本系統(tǒng)已經(jīng)可以正常運行,實現(xiàn)了所設(shè)計的功能。通過本系統(tǒng)功能的實現(xiàn),將實體服裝店的業(yè)務(wù)建立在網(wǎng)絡(luò)上的優(yōu)勢也得以體現(xiàn):(1)用戶可以隨時查詢和購買自己需要的服飾信息,可以克服時空、地域?qū)Ψb店的制約。(3)本網(wǎng)站將服裝店信息、服務(wù)信息、產(chǎn)品信息顯示在網(wǎng)上,為消費者購物提供了保障,同時可以促使價格更加透明、合理。(4)使實體服裝店工作人員從手工處理數(shù)據(jù)中解放出來,可以提高工作效率。本系統(tǒng)在設(shè)計過程中由于本身水平有限,還有很多不盡人意的地方,如考慮到安全問題,系統(tǒng)不能在線支付,后臺產(chǎn)品管理功能也需進(jìn)一步完善等。

參考文獻(xiàn)[1]趙洋.服裝業(yè)電子商務(wù)系統(tǒng)中基于圖像內(nèi)容檢索的設(shè)計與實現(xiàn)[D].河南大學(xué),2013[2]游少輝.基于VRML的3D商品網(wǎng)上展示方案設(shè)計與實現(xiàn)[D].北京大學(xué),2011[3]蔡舒璟.石獅市服裝產(chǎn)業(yè)電子商務(wù)系統(tǒng)的設(shè)計與實現(xiàn)[D].電子科技大學(xué),2007[4]閔小玲.Web應(yīng)用系統(tǒng)設(shè)計的JSP技術(shù)方法[J].黃石理工學(xué)院計算機(jī)學(xué)院,湖北,黃石435003,2007,?4(24)[5]閆東.淺談JSP動態(tài)網(wǎng)站的技術(shù)開發(fā)[J].沈陽大學(xué)南校區(qū)教育學(xué)院,信息工程學(xué)院0442班,2003,(12)[6]趙成龍.一個基于WEB的智能答疑系統(tǒng)的設(shè)計與實現(xiàn)[D].東南大學(xué),2004[7]張云帆.Oracle數(shù)據(jù)庫備份與恢復(fù)策略[J].中石油遼河油田公司信息管理部,盤錦,124010,2009,?35(15)[8]Chien-HungLiu.Dataflowanalysisandtestingof?JSP-basedWebapplications[J].Informationandsoftwaretechnology.2006,48(12)[9]XiaohuaWang.Ahybridbiogeography-basedoptimizationalgorithmforjobshopschedulingproblem[J]puters&IndustrialEngineering.2014,73[10]GuangCen.Aimplementationofanautomaticexaminationpapergenerationsystem[J].Mathematicalandcomputermodelling.2010,51(11/12)致謝

外文文獻(xiàn)WebMVCwiththeSpringFrameworkBy:JuergenHoellerSource:Spring&SpringMVCIntroductionIntroduction:SpringtheApplicationFrameworkWhenfirstconfrontedwiththeSpringFramework,onemightbetemptedtothink:"Ohno,notyetanotherwebframework".ThisarticlewilloutlinewhySpringisn'tparticularlyawebframeworkbutagenericlightweightapplicationframeworkwithdedicatedwebsupport,andshowthearchitecturaldifferencestoStrutsandWebWorkIncontrasttoStrutsorWebWork,Springisanapplicationframeworkforalllayers:Itoffersabeanconfigurationfoundation,AOPsupport,aJDBCabstractionframework,abstracttransactionsupport,etc.Itisaverynon-intrusiveeffort:YourapplicationclassesdonotneedtodependonanySpringclassesifnotnecessary,andyoucanreuseeverypartonitsownifyouliketo.Fromitsverydesign,theframeworkencouragescleanseparationoftiers,mostimportantlywebtierandbusinesslogic:e.g.thevalidationframeworkdoesnotdependonwebcontrollers.Majorgoalsarereusabilityandtestability:Unnecessarycontainerorframeworkdependenciescanbeconsideredavoidableevils.Ofcourse,Spring'sownwebsupportisnicelyintegratedwiththeframework'sgeneralpatterns.Nevertheless,replacingthewebsolutionwithStruts,WebWork,orthelikeiseasy.BothwithSpring'swebsupportoradifferentone,Springallowsforbuildingatruededicatedmiddletierinthewebcontainer,withtheoptiontoreuseexactlythesamebusinesslogicintestenvironmentsorstandaloneapplications.AndwithinJ2EE,yourbusinesslogicwillnotunnecessarilydependoncontainerserviceslikeJTAorEJB-allowingcomplex,well-architectedwebapplicationstorunina"simple"containerlikeTomcatorResin.NotethatSpringdoesn'tgenerallyaimtocompetewithexistingsolutions.ItratherfostersseamlessintegrationwithstandardslikeServlet,JSP,JTA,JNDI,JDBC,andJDO,andwell-suitedtoolslikeHibernate,Velocity,Log4J,andCaucho'sHessian/Burlap.Theframeworkisdesignedtogrowwiththeneedsofyourapplications,intermsoftechnologychoice:Forexample,youwillprobablyuseJTAviaSpring'sJtaTransactionManagerifyouneeddistributedtransactions-butonlythen,asthereareperfectreplacementsforsingledatabases,likeDataSourceTransactionManagerorHibernateTransactionManager.WebMVCTheDesignofSpring'sWebFrameworkSpring'swebframeworkisdesignedaroundaDispatcherServletthatdispatchesrequeststohandlers,withconfigurablehandlermappings,viewresolution,andlocaleandthemeresolution.ThedefaulthandlerisaverysimpleControllerinterface,justofferinga"ModelAndViewhandleRequest(request,response)"method.Thiscanalreadybeusedforapplicationcontrollers,butyouwillprefertheincludedimplementationhierarchy,consistingofAbstractController,AbstractCommandController,MultiActionController,SimpleFormController,AbstractWizardFormController.Applicationcontrollerswilltypicallybesubclassesofthose.Notethatyoucanchooseanappropriatebaseclass:Ifyoudon'thaveaform,youdon'tneedaFormController.ThisisamajordifferencetoStruts.Youcantakeanyobjectascommandorformobject:There'snoneedtoimplementaninterfaceorderivefromabaseclass.Spring'sdatabindingishighlyflexible,e.g.ittreatstypemismatchesasvalidationerrorsthatcanbeevaluatedbytheapplication,notassystemerrors.Soyoudon'tneedtoduplicateyourbusinessobjects'propertiesasStringsinyourformobjects,justtobeabletohandleinvalidsubmissions,ortoconverttheStringsproperly.Instead,it'softenpreferabletobinddirectlytoyourbusinessobjects.ThisisanothermajordifferencetoStrutswhichisbuiltaroundrequiredbaseclasseslikeActionandActionForm-foreverytypeofaction.ComparedtoWebWork,Springhasmoredifferentiatedobjectroles:ItsupportsthenotionofaController,anoptionalcommandorformobject,andamodelthatgetspassedtotheview.Themodelwillnormallyincludethecommandorformobjectbutalsoarbitraryreferencedata.Instead,aWebWorkActioncombinesallthoserolesintoonesingleobject.WebWorkdoesallowyoutouseexistingbusinessobjectsaspartofyourform,butjustbymakingthembeanpropertiesoftherespectiveActionclass.Finally,thesameActioninstancethathandlestherequestgetsusedforevaluationandformpopulationintheview.Thus,referencedataneedstobe10modelledasbeanpropertiesoftheActiontoo.Thesearearguablytoomanyrolesinoneobject.Regardingviews:Spring'sviewresolutionisextremelyflexible.AControllerimplementationcanevenwriteaviewdirectlytotheresponse,returningnullasModelAndView.Inthenormalcase,aModelAndViewinstanceconsistsofaviewnameandamodelMap,containingbeannamesandcorrespondingobjects(likeacommandorform,referencedata,etc).Viewnameresolutionishighlyconfigurable,eitherviabeannames,viaapropertiesfile,orviayourownViewResolverimplementation.TheabstractmodelMapallowsforcompleteabstractionoftheviewtechnology,withoutanyhassle:BeitJSP,Velocity,oranythingelse-everyrenderercanbeintegrateddirectly.ThemodelMapsimplygetstransformedintoanappropriateformat,likeJSPrequestattributesoraVelocitytemplatemodel.IntegrationIntegration:UsingaDifferentWebFrameworkwithSpringManyteamswilltrytoleveragetheirinvestmentsintermsofknow-howandtools,bothforexistingprojectsandfornewones.Concretely,therearenotonlyalargenumberofbooksandtoolsforStrutsbutalsoalotofdevelopersthathaveexperiencewithit.Thus,ifyoucanlivewithStruts'architecturalflaws,itcanstillbeaviablechoicefortheweblayer.ThesameappliestoWebWorkandotherwebframeworks.Ifyoudon'twanttouseSpring'swebMVCbutintendtoleverageothersolutionsthatSpringoffers,youcanintegratethewebframeworkofyourchoicewithSpringeasily.SimplystartupaSpringrootapplicationcontextviaitsContextLoaderListener,andaccessitviaitsServletContextattribute(orSpring'srespectivehelpermethod)fromwithinaStrutsorWebWorkaction.Notethattherearen'tany"plugins"involved,thereforenodedicatedintegration:Fromtheviewoftheweblayer,you'llsimplyuseSpringasalibrary,withtherootapplicationcontextinstanceasentrypoint.AllyourregisteredbeansandallofSpring'sservicescanbeatyourfingertipsevenwithoutSpring'swebMVC.Springdoesn'tcompetewithStrutsorWebWorkinthisusage,itjustaddressesthemanyareasthatthepurewebframeworksdon't,frombeanconfigurationtodataaccessandtransactionhandling.SoyouareabletoenrichyourapplicationwithaSpringmiddletierand/ordataaccesstier,evenifyoujustwanttousee.g.thetransactionabstractionwithJDBCorHibernate.FeatureCheckListIfjustfocussingonthewebsupport,someofSpring'suniquefeaturesare:.Clearseparationofroles:controllervsvalidatorvscommandobjectvsformobjectvsmodelobject,DispatcherServletvshandlermappingvsviewresolver,etc..PowerfulandstraightforwardconfigurationofbothframeworkandapplicationclassesasJavaBeans,includingeasyin-betweenreferencingviaanapplicationcontext,e.g.fromwebcontrollerstobusinessobjectsandvalidators..Adaptability,non-intrusiveness:UsewhateverControllersubclassyouneed(plain,command,form,wizard,multiaction,oracustomone)foragivenscenarioinsteadofderivingfromAction/ActionFormforeverything..Reusablebusinesscode,noneedforduplication:YoucanuseexistingbusinessobjectsascommandorformobjectsinsteadofmirroringtheminspecialActionFormsubclasses..Customizablebindingandvalidation:typemismatchesasapplication-levelvalidationerrorsthatkeeptheoffendingvalue,localizeddateandnumberbinding,etcinsteadofString-onlyformobjectswithmanualparsingandconversiontobusinessobjects.Customizablehandlermapping,customizableviewresolution:flexiblemodeltransfervianame/valueMap,handlermappingandviewresolutionstrategiesfromsimpletosophisticatedinsteadofonesingleway.Customizablelocaleandthemeresolution,supportforJSPswithandwithoutSpringtaglibrary,supportforJSTL,supportforVelocitywithouttheneedforextrabridges,etc.SimplebutpowerfultaglibrarythatavoidsHTMLgenerationatanycost,allowingformaximumflexibilityintermsofmarkupcode.theantinomyofofdatamodelandlogicmodel.Currentlythedatabaseofusagebasicallyandallisrelationtypedatabase,buttheJavabeessentiallyakindofthelanguagewhichfacetoobject,objectatsavingwithreadusageSQLandJDBCcarryonadatabaseoperationandloweredplaitdistanceofefficiencyandsystemofcanmaintenance;2)traditionofJ2EEapplicationmuchtheadoptionisaccordingtotheEJBheavyweightframe,thiskindofframesuitablefordevelopalargebusinessenterpriseapplication,butusagetheEJBcontainercarryondevelopmentandadjusttotrytoneedtobewasteagreatdealoftime.ForloweringtheOuofcodetomatchsex,exaltationsystemofdevelopmentefficiency,thistextputforward1kindEEaccordingtotheJ2oftheStrutsframeandtheHibernateframeapplicationdevelopmentstrategy.Data'sholdingoutforlongtimelayerandHibernateisonepieceaccordingtoholdoutforlongtimelayerframe,isakindofrealizationobjectandrelationofthetoolwhichreflecttoshoot(O/RMapping),itcarriedontheobjectofthelightweighttopacktotheJDBCandmakeproceduremembercanusageobjectplaitdistancethoughttooperationdatabase.ItnotonlyprovidedtoshootfromJavatoreflectofdataform,butalsoprovidedadataasearchandinstaurationmechanism.OppositeinusageJDBCandSQLtooperationdatabase,useHibernateabilityconsumedlyofexaltationrealizationofefficiency.TheHibernateframeuseallocationdocumentoftheformcometothereflectofthedefinitionJavaobjectanddataformtoshootrelation,inthemeantimeatmoredeepoflevelofdataformofrelationexplanatio

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論