【正文】
2022 年 6 月 19 日摘 要 電子商務(wù)是利用電子信息技術(shù)和網(wǎng)絡(luò)技術(shù)進(jìn)行商務(wù)活動(dòng)的一種先進(jìn)手段。電子商務(wù)為中小型企業(yè)的經(jīng)營和管理打開新的局面。對所選框架分別進(jìn)行分析和研究。通過實(shí)踐,很好的整合了這三個(gè)框架,并將其應(yīng)用到實(shí)際的項(xiàng)目中,達(dá)到了預(yù)期效果,體現(xiàn)了較高的研究價(jià)值和應(yīng)用價(jià)值。 Hibernate。 課題背景 隨著信息化的普及,傳統(tǒng)的商務(wù)模式已經(jīng)不能滿足人們的需求,越來越多的人開始接受新的模式,基于瀏覽器和服務(wù)器的模式,讓消費(fèi)者能夠?qū)崿F(xiàn)網(wǎng)上購物,使用戶能夠足不出戶就能實(shí)現(xiàn)購物和交易,這就是新型你的商務(wù)模式 —— 電子商務(wù)。電子商務(wù)在中國也發(fā)展了一段時(shí)間,目前在國內(nèi)也有很多電子商務(wù)的平臺,通過分析國內(nèi)的電子商務(wù)網(wǎng)站可知,目前國內(nèi)的電子商務(wù)做的都是集合型,一個(gè)平臺中各個(gè)方面的商務(wù)領(lǐng)域似乎都有涉及到。為了能夠上中小型企業(yè)特別是小型企業(yè)能夠用上電子商務(wù)平臺,我們特地開發(fā)此系統(tǒng),使中小型企業(yè)也能做到生產(chǎn),宣傳,銷 售一條龍。 可行性分析 通過對 當(dāng)前購物網(wǎng)站的 分析研究,對 本系統(tǒng)主要進(jìn)行技術(shù)可行性,操作的可行性、經(jīng)濟(jì)可行性和社會(huì)需求的 分析 ,其他方面的可行性暫時(shí)不作考慮。所有說操作簡單明了,任何人都可以操作。 軟件 開發(fā)環(huán)境 在基于 Java Web 的 環(huán)球家電網(wǎng)上購物系統(tǒng) 分析的基礎(chǔ)上, 更進(jìn)一步的了解該系統(tǒng)所需的開發(fā)環(huán)境,開發(fā)環(huán)境主要有 MyEclipse , Apache Tomcat , Navicat Premium, MySQL MyEclipse 企業(yè)級工作平臺 ( MyEclipse Enterprise Workbench ,簡稱 MyEclipse)是對 EclipseIDE 的擴(kuò)展,利用 其 在 數(shù)據(jù)庫 以及 JavaEE 的發(fā)布 和 開發(fā) 以及 應(yīng)用程序 服務(wù) 器的 整合方面極大提高 了 工作效率。 產(chǎn)品總體概述描述 待開發(fā)的軟件系統(tǒng)的名稱 是環(huán)球家電網(wǎng)上購物系統(tǒng)。 系統(tǒng)界面要求:界面簡潔、明了,是用戶能夠在一個(gè)很舒服的界面下完成購物的相關(guān)操作。二級分類等信息 商品信息 管理員 03 訂單管理 管理員可以查看用戶的訂單,以及對訂單的狀態(tài)進(jìn)行修改 訂單 管理員 軟件接口 環(huán)球家電網(wǎng)上購物系統(tǒng)普通用戶和管理員之間可以共同使 用一套底層數(shù)據(jù)庫, 底層為上層提供服務(wù)接口,可 用性良好。訂單管理等 功能。 圖 41 普通 用戶用例圖 第 4 章 系統(tǒng)詳細(xì)設(shè)計(jì) 8 管理員用戶 的 用例圖 是當(dāng)管理員登陸到后臺進(jìn)行管理操作的時(shí)候不同的用例, 管理員用戶用例圖 如圖 42 所示。 第 4 章 系統(tǒng)詳細(xì)設(shè)計(jì) 11 圖 45 環(huán)球家電網(wǎng)上購物 系統(tǒng) 用戶登錄后的狀態(tài)轉(zhuǎn)換圖 環(huán)球家電網(wǎng)上購物 系統(tǒng) 系統(tǒng)平臺的時(shí)序圖 環(huán)球家電網(wǎng)上購物 系統(tǒng)的主要對象是 普通 用戶 及游客 , 普通 用戶 從首頁瀏覽商品,再到查看商品 詳細(xì)信息,再到選擇商品并加入購物車,如有需要還可以修改購物車中商品的數(shù)量以及增加或刪除購物車中的商品,再到用戶確認(rèn)購物車中商品以及數(shù)量的整個(gè)時(shí)序圖如圖 46 所示。第二是屬性不能與其他實(shí)體具有聯(lián)系及圖中所表示的聯(lián)系是實(shí)體之間的聯(lián)系。 用 戶 信 息用 戶 I D用 戶 郵 箱用 戶 聯(lián) 系方 式用 戶 姓 名用 戶 類 型密 碼注 冊 時(shí) 間 圖 48 用戶信息實(shí)體 屬性圖 用 戶 注 冊用 戶 密 碼用 戶 名 電 子 郵 箱 聯(lián) 系 方 式 圖 49 用戶 注冊 實(shí)體 屬性圖 圖 410 一級分類 實(shí)體 屬性圖 第 4 章 系統(tǒng)詳細(xì)設(shè)計(jì) 14 圖 411 二級分類 實(shí)體 屬性圖 圖 412 商品信息 實(shí)體 屬性圖 環(huán)球家電網(wǎng)上購物系統(tǒng)的數(shù)據(jù)庫表的設(shè)計(jì) 環(huán)球家電網(wǎng)上購物 系統(tǒng) 的實(shí)現(xiàn) 是 為普通用戶及游客和管理員 提供一個(gè) 便捷的服務(wù)平臺,后臺管理員表如 41 所示,一級分類表如 42 所示,二級分類表如 43 所示,訂單表如 44 所示,訂單項(xiàng)表如 45 所示,商品表如 46 所示,用戶表如 47 所示。 第 5 章 系統(tǒng)的實(shí)現(xiàn) 18 圖 51 商品信息 實(shí)體 屬性圖 圖 52 商品信息 實(shí)體 屬性圖 第 5 章 系統(tǒng)的實(shí)現(xiàn) 19 圖 53 商品信息 實(shí)體 屬性圖 圖 54 商品信息 實(shí)體 屬性圖 用戶登陸 當(dāng) 用戶 注冊成功 后, 用戶可以輸入自己的用戶名和密碼與已注冊的信息進(jìn)行驗(yàn)證,驗(yàn)證成功后即可登陸, 具體實(shí)現(xiàn)效果如圖 55 所示 。 圖 512 后臺登陸 第 5 章 系統(tǒng)的實(shí)現(xiàn) 25 后臺登陸成功到歡迎界面 本操作根據(jù)管理員的權(quán)限不同顯示不同的管理界面,即不同的管理員管理不同的功能模塊兒,超級管理員權(quán)限如圖 513 所示,商品信息管理員權(quán)限如圖 514 所示,用戶管理員權(quán)限如圖 515 所示,訂單管理員權(quán)限如圖 516 所示。 功能測試 環(huán)球家電網(wǎng)上購物系統(tǒng)在已經(jīng) 完成 所有需求中的 所有功能,并且在 后面 的詳細(xì)設(shè)計(jì)階段, 還增加了郵箱激活等功能 。 當(dāng)用戶進(jìn)入系統(tǒng)后,可以快捷查看到當(dāng)前最熱門的商品,用戶還可以看到最新的商品,這樣可以幫助用戶更方便的了解最新最熱門的商品。通過 SSH 框架的 運(yùn)用 , 很大程度的 減少了 代碼的大量 冗余, 這樣 在編碼的時(shí)候, 更加去注重 于業(yè)務(wù)邏輯 的分析和設(shè)計(jì) ,而不再是 滯留在 數(shù)據(jù)操作 等問題 。 環(huán)球家電網(wǎng)上購物系統(tǒng) 系統(tǒng)平臺的設(shè)計(jì)與實(shí)現(xiàn), 這其中包括了好多人的幫助。t able to have direct involvement in page development. HTML embedded into code is ugly. For the Web, the classical form of MVC needed to change. Figure 1 displays the Web adaptation of MVC, also monly known as MVC Model 2 or MVC 2. Struts, an MVC 2 implementation Struts is a set of cooperating classes, servlets, and JSP tags that make up a reusable MVC 2 design. This definition implies that Struts is a framework, rather than a library, but Struts also contains an extensive tag library and utility classes that work independently of the framework. Figure 2 displays an overview of Struts. Client browser An HTTP request from the client browser creates an event. The Web container will respond with an HTTP response. Controller:The Controller receives the request from the browser, and makes the decision where to send the request. With Struts, the Controller is a mand design pattern implemented as a servlet. The file configures the Controller. Business logic:The business logic updates the state of the model and helps control the flow of the application. With Struts this is done with an Action class as a thin wrapper to the actual business logic. Model state:The model represents the state of the application. The business objects update the application state. ActionForm bean represents the Model state at a session or request level, and not at a persistent level. The JSP file reads information from the ActionForm bean using JSP tags. View:The view is simply a JSP file. There is no flow logic, no business logic, and no model information just tags. Tags are one of the things that make Struts unique pared to other frameworks like Velocity. Struts details:Displayed in Figure 3 is a strippeddown UML diagram of the package. Figure 6 shows the minimal relationships among ActionServlet (Controller), ActionForm (Form State), and Action (Model Wrapper). The ActionServlet class:Do you remember the days of function mappings? You would map some input event to a pointer to a function. If you where slick, you would place the configuration information into a file and load the file at run time. Function pointer arrays were the good old days of structured programming in C. Life is better now that we have Java technology, XML, J2EE, and all that. The Struts 外文資料原文 3Controller is a servlet that maps events (an event generally being an HTTP post) to classes. And guess what the Controller uses a configuration file so you don_t have to hardcode the values. Life changes, but stays the same. ActionServlet is the Command part of the MVC implementation and is the core of the Framework. ActionServlet (Command) creates and uses Action, an ActionForm, and ActionForward. As mentioned earlier, the file configures the Command. During the creation of the Web project, Action and ActionForm are extended to solve the specific problem space. The file instructs ActionServlet on how to use the extended classes. There are several advantages to this approach: The entire logical flow of the application is in a hierarchical text file. This makes it easier to view and understand, especially with large applications. The page designer does not have to wade through Java code to understand the flow of the application. The Java deve