【正文】
and JavaBean. The operation of processing business logic interacts with database by data permanence layer and field object layer. The “execute” method of Action will return ActionForward objects that are accepted by ActionServlet after executing. Systematic Structure of the Integration Framework The EIS layer of the multilayer J2EE systematic structure can be partitioned into the data permanence layer and the data resource layer. It means a system can be divided into five layers as a whole. Client Layer: This layer runs in the Browser of users’ machines and handles interaction with users, transmits and shows messages to users. J2EE platform supports different type users including HTML users, Java Applets, Java application, etc. Presentation Layer: This layer works in J2EE Web container, produces the systematic representation logic, handles users’ requests and makes the responses. The entire Web is built on Struts framework, in which the View ponent is posed of JSP/HTML pages whose data is expressed by ActionForm Bean, the Controller ponent is posed of ActionServlet united and Action Classes, and the Model ponent is realized by business logic layer. Business Logic Layer: This layer acplishes the required business of system, provides the required business method to presentation layer. It can receive data from client programs and save them to the storage equipment after proper disposal, read data from the data storage equipment, then send them out to client programs. This layer is posed of Business Objects (BO) such as JavaBean and session EJB. B r o w s e rJ S P ( T a g l i b ) V i e w A c t i o n S e r v l e t( A c t i o n M a p p i n g )A c t i o nJ a v a B e a nE J BA c t i o n F o r mPermanence layerHibernateRelational databaseR e q u e s tR e s p o n s eP r e s e n t a t i o n l a y e rA c t i o n F o r w a r dD a t a v e r i f i c a t i o npages dataM a p p i n gA c t i o n F o r w a r dfill data C o n t r o l B u s i n e s s l o g i c l a y e r M o d e l Figure 3. Flow chart of the integration framework based on Struts and Hibernate 第 1 頁 共 6 頁 1 基于 MVC的 Struts 框架 在傳統(tǒng)的 Web 應(yīng)用程序, Java 服務(wù)器頁面( JSP)頁面負(fù)責(zé)處理所有的事情,例如,接收請求,執(zhí)行業(yè)務(wù)邏輯,選擇下一個(gè)頁面。 MVC可以實(shí)現(xiàn) J2EE 應(yīng)用程序的系統(tǒng)的分層和三層或多層的松散耦合,它是一個(gè)實(shí)現(xiàn)的定向動(dòng)態(tài)內(nèi)容的方式。查看是負(fù)責(zé)生產(chǎn)的,什么是直接對用戶可見,例如網(wǎng)頁。這是一個(gè)強(qiáng)大的,高性能的對象關(guān)系持久性和查詢服務(wù)。 Hibernate 的減輕了開發(fā)人員常見的數(shù)據(jù)持久化相關(guān)的編程任務(wù)的 95%,比手動(dòng)編碼的 SQL 和 JDBC API。雖然 Struts 已經(jīng)被廣泛應(yīng)用,因?yàn)樗膬?yōu)勢。 Struts 和 Hibernate 的集成Hibernate 的解決了模型層, Struts 中,這使得開發(fā) Java 對象,而不是數(shù)據(jù)庫。 第 6 頁 共 6 頁 整合框架的系統(tǒng)結(jié)構(gòu) 在 EIS 層的多層 J2EE 系統(tǒng)結(jié)構(gòu)可以被劃分為數(shù)據(jù)持久層 [7]和數(shù)據(jù)資源層。這層是由如 JavaBean 和會(huì)話 EJB 的業(yè)務(wù)對象( BO)。 表示層:此層工作在 J2EE 的 Web 容器,生產(chǎn)系統(tǒng)表述邏輯,處理用戶的請求,并作出響應(yīng)。 請求進(jìn)程 的行動(dòng)綱領(lǐng) “ 執(zhí)行 ” 的方法轉(zhuǎn)移的方法轉(zhuǎn)移的業(yè)務(wù)邏輯模塊。 Hibernate 可以替代容器管理持久性( CMP)來完成持久的重任,在 J2EE 架構(gòu)中應(yīng)用 EJB 。 第 5 頁 共 6 頁 3 Struts 和 Hibernate 的整合 在開源框架,用于演示的一部分,代理路由算法具有強(qiáng)大能自然的和網(wǎng)頁結(jié)合,其文件是太概念性受益編程的。里面的 Hibernate 包 JDBC,它提供了面向?qū)ο蟮臄?shù)據(jù)庫訪問到上層應(yīng)用的 API訪問數(shù)據(jù)庫的操作。該控制器是被稱為 Servlet 的 J2EE 組件,更具體一個(gè) ActionServlet 的對象,這就決定什么邏輯被執(zhí)行時(shí),應(yīng)該得到控制 。的 Struts 繼承了 MVC