計算機外文翻譯---j2ee web應用架構分析_第1頁
已閱讀1頁,還剩4頁未讀 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、<p><b>  附錄一:文獻資料</b></p><p><b>  原文</b></p><p>  J2EE WEB應用架構分析</p><p><b>  1、架構概述</b></p><p>  J2EE體系包括java server pages(JSP)

2、 ,java SERVLET, enterprise bean,WEB service等技術。這些技術的出現(xiàn)給電子商務時代的WEB應用程序的開發(fā)提供了一個非常有競爭力的選擇。怎樣把這些技術組合起來形成一個適應項目需要的穩(wěn)定架構是項目開發(fā)過程中一個非常重要的步驟。完成這個步驟可以形成一個主要里程碑基線。形成這個基線有很多好處:</p><p>  各種因數初步確定:為了形成架構基線,架構設計師要對平臺(體系)中的技

3、術進行篩選,各種利弊的權衡。往往架構設計師在這個過程中要閱讀大量的技術資料,聽取項目組成員的建議,考慮領域專家的需求,考慮贊助商成本(包括開發(fā)成本和運行維護成本)限額。一旦架構設計經過評審,這些因數初步地就有了在整個項目過程中的對項目起多大作用的定位。</p><p>  定向技術培訓:一旦架構師設計的架構得到了批準形成了基線,項目開發(fā)和運行所采用的技術基本確定下來了。眾多的項目經理都會對預備項目組成員的技術功底

4、感到擔心;他們需要培訓部門提供培訓,但就架構師面對的技術海洋,項目經理根本就提不出明確的技術培訓需求。怎不能夠對體系中所有技術都進行培訓吧!有了架構里程碑基線,項目經理能確定這個項目開發(fā)會采用什么技術,這是提出培訓需求應該是最精確的。不過在實際項目開發(fā)中,技術培訓可以在基線確定之前與架構設計并發(fā)進行。</p><p>  角色分工:有了一個好的架構藍圖,我們就能準確劃分工作。如網頁設計,JSP 標簽處理類設計,S

5、ERVLET 設計,session bean設計,還有各種實現(xiàn)。這些任務在架構藍圖上都可以清晰地標出位置,使得項目組成員能很好地定位自己的任務。一個好的架構藍圖同時也能規(guī)范化任務,能很好地把任務劃分為幾類,在同一類中的任務的工作量和性質相同或相似。這樣工作量估計起來有一個非常好的基礎。</p><p>  運行維護:前面說過各個任務在架構圖上都有比較好的定位。任何人能借助它很快地熟悉整個項目的運行情況,錯誤出現(xiàn)時

6、能比較快速地定位錯誤點。另外,有了清晰的架構圖,項目版本管理也有很好的版本樹軀干。</p><p>  擴展性:架構猶如一顆參天大樹的軀干,只要軀干根系牢,樹干粗,長一些旁支,加一些樹葉輕而易舉無疑。同樣,有一個穩(wěn)定的經得起考驗的架構,增加一兩個業(yè)務組件是非??焖俸腿菀椎摹?lt;/p><p>  大家都知道這些好處,一心想形成一個這樣的J2EE應用程序架構(就像在windows平臺中的MFC

7、)。在這個路程中經歷了兩個大的階段:</p><p><b>  模型1</b></p><p>  模型1其實不是一個什么穩(wěn)定架構,甚至談不上形成了架構。模型1的基礎是JSP文件。它從HTTP的請求中提取參數,調用相應的業(yè)務邏輯,處理HTTP會話,最后生成HTTP文檔。一系列這樣的JSP文件形成一個完整的模型1應用,當然可能會有其他輔助類或文件。早期的ASP 和 P

8、HP 技術就屬于這個情況。</p><p>  總的看來,這個模型的好處是簡單,但是它把業(yè)務邏輯和表現(xiàn)混在一塊,對大應用來說,這個缺點是令人容忍不了的。</p><p><b>  模型2</b></p><p>  在經過一番實踐,并廣泛借鑒和總結經驗教訓之后,J2EE應用程序終于迎來了MVC(模型-視圖-控制)模式。MVC模式并不是J2EE

9、行業(yè)人士標新立異的,所以前面我談到廣發(fā)借鑒。MVC的核心就是做到三層甚至多層的松散耦合。這對基于組件的,所覆蓋的技術不斷膨脹的J2EE體系來說真是福音和救星。</p><p>  它在瀏覽器(本文對客戶代理都稱瀏覽器)和JSP或SERVLET之間插入一個控制組件。這個控制組件集中了處理瀏覽器發(fā)過來的HTTP請求的分發(fā)邏輯,也就是說,它會根據HTTP請求的URL,輸入參數,和目前應用的內部狀態(tài),把請求分發(fā)給相應的W

10、EB 層的JSP 或SERVLET。</p><p>  另外它也負責選擇下一個視圖(在J2EE中,JSP,SERVLET會生成回給瀏覽器的html從而形成視圖)。集中的控制組件也有利于安全驗證,日志紀錄,有時也封裝請求數據給下面的WEB tier層。這一套邏輯的實現(xiàn)形成了一個像MFC的應用框架。</p><p><b>  2、候選方案</b></p>

11、<p>  目前,實現(xiàn)模型2的框架也在不斷的涌現(xiàn),下面列出比較有名的框架。</p><p>  2.1、Apache Struts</p><p>  Struts是一個免費的開源的WEB層的應用框架,apache軟件基金致力于struts的開發(fā)。Struts具是高可配置的性,和有一個不斷增長的特性列表。一個前端控制組件,一系列動作類,動作映射,處理XML的實用工具類,服務器端

12、java bean 的自動填充,支持驗證的WEB 表單,國際化支持,生成HTML,實現(xiàn)表現(xiàn)邏輯和模版組成了struts的靈魂。</p><p>  模型:模型以一個或幾個java bean的形式存在。這些bean分為三種:Form beans(表單Beans),它保存了HTTP post請求傳來的數據,在Struts里,所有的Form beans都是 ActionFrom 類的子類。業(yè)務邏輯beans,專門用來處

13、理業(yè)務邏輯。系統(tǒng)狀態(tài)beans,它保存了跨越多個HTTP 請求的單個客戶的會話信息,還有系統(tǒng)狀態(tài)。</p><p>  視圖:控制組件續(xù)傳HTTP請求給實現(xiàn)了視圖的JSP文件。JSP能訪問beans 并生成結果文檔反饋到客戶。Struts提供JSP 標簽庫: Html,Bean,Logic,Template等來達到這個目的,并有利于分開表現(xiàn)邏輯和程序邏輯。</p><p><b>

14、;  2.2、JATO</b></p><p>  JATO應用程序框架是iPlanet 應用程序框架的舊名。它是一個成熟的、強大的,基于J2EE標準的面向于開發(fā)WEB應用程序的應用框架。結合了顯示字段、應用程序事件、組件層次和以頁面為中心的開發(fā)方法、以及MVC和服務到工作者service-to-workers的設計模式等概念。</p><p>  JATO可適用于中、大、超大

15、規(guī)模的WEB應用。但是它也不是一個企業(yè)層的應用框架,也就是說它不會直接提供創(chuàng)建EJB, WEB services等企業(yè)層組件的方法,但用它可以構造出訪問企業(yè)層組件的客戶應用。</p><p>  這個框架功能主要有三部分組成:iPlanet應用框架核心;iPlanet應用框架組件;iPlanet應用框架擴展。</p><p><b>  譯文</b></p>

16、;<p>  Analysis of J2EE WEB application construction</p><p>  1、the outline of the construction</p><p>  J2EE system includes many technologies such as java server pages (JSP), java SE

17、RVLET, enterprise bean, WEB service and so on. These technologies appeared have provided an extremely competitive choice to the development of WEB application of electronic commerce . How these technologies are combined

18、to form the stable construction which an adaptabl project needs is an importable step in the project development. Completing this step may form a main milestone baseline. It is a advantage to form thi</p><p>

19、;  Many factors determine it initially.In order to form the construction baseline, the construction designer must choose the center technology in the platform and measure each kind of advantages. Often the construction d

20、esigner has to check the massive technical datas in this process, listen to the suggestion of members in the component project, consider the domain expert's demand and consider the sponsor’s cost quota (including dev

21、elopment cost and movement maintenance cost). Once the construction</p><p>  Directional technology training: Once the construction of the construction designer is approved to form the baseline, the technolo

22、gy which the project development and the movement use has basically determined. Multitudinous project managers may worry about basic skills of the component members’ prepared in the project.They need to be trained in

23、the department providing training.But to the technical sea which the construction designer faces on, project manager cannot propose the explicit tech</p><p>  Division of labor: Having a good construction

24、blueprint, we can accurately divide the work such as homepage design, JSP label processing class design, SERVLET design, session bean design and many kinds of realizations. These all duties may be located clearly on

25、the construction blueprint, enabling the project component member to locate own duty well. At the same time a good construction blueprint can also standardize the duty, divide well the duty into several kinds in the sam

26、e kind of whi</p><p>  Movement maintenance: each duty has quite good localization in a composition. Anyone can is familiar with the movement in the entire project with the help of it quickly and locate fa

27、st where wrong is when the mistake appears. Moreover, having the clear frame composition, the project edition management also has good edition tree torso.</p><p>  Extension: The construction likes the to

28、rso of a towering big tree.so long as torso root system jail, bough thick, the long some collateral branches, add some leaves to be easy without doubt. Similarly, having stable construction standing the test, it is extr

29、emely fast and easy to increase 12 service modules.</p><p>  Everybody knows these advantage and wants to form a such J2EE application construction as it (like MFC in windows platform). It has experienced

30、two big stages in this process:</p><p><b>  model 1</b></p><p>  Actually model 1 is not stable construction, even far from the construction formed. The foundation of model 1 is

31、JSP document. It withdraws the parameter from the HTTP request, transfers the corresponding service logic, processes the HTTP conversation and finally produces the HTTP documents. A series of such JSP document forms a co

32、mplete model 1 application, certainly possibly having other assistances kind or the document. The earlier ASP and the PHP technology belongs to this situation.</p><p>  To the summary, the advantage of this

33、model is simple, but it mixes the service logic with the performance in the same place. To the big application, this shortcoming is able to be tolerated.</p><p><b>  model 2 </b></p><p

34、>  Through practice, after summarying lesson, the J2EE application has finally welcomed the MVC (model - view pneumatic-control) pattern. The MVC pattern is not something new and different which the J2EE professioner

35、proposes.Therefore in the front I talked about profiting widely. The core of the MVC is to achieve three or even multi-layered loose couplings. To the J2EE system which has to based on the module and which covered the t

36、echnology inflates unceasingly,it really is the gospel and the lib</p><p>  It inserts a control module between in the browser ( in this article all the customer proxys are called browser) and JSP or SERVLET

37、. This control module concentrates HTTP request distribution logic which is sent by the browser processed.In other words, it could input parameter according to HTTP request URL,with the present application internal cond

38、ition, giving the request to distribute the JSP or SERVLET of the corresponding WEB level.</p><p>  Moreover, it also is responsible for choicing next view (in J2EE, JSP and SERVLET can produce html for bro

39、wser to form the view). The centralism control module is also advantageous to the safety certification, the diary record and sometimes also seals the request data to give the following WEB tier level. This set of logical

40、 realization forms one application frame like MFC.</p><p>  2、candidate plan</p><p>  At present, the realization frames of the model 2 also emerge unceasingly. list some famous frames as follow

41、s.</p><p>  2.1、Apache Struts</p><p>  Struts is a free and open application frame of the source WEB level.And the apache software fund devotes to the development of the struts. Struts has the n

42、ature which is highly disposed and has the characteristic tabulation which grows unceasingly. The front controlling module, a series of movements class, the movement mapping, the practical tool class processing XML, t

43、he automatic packing of the server carries java bean, the WEB form supporting confirmation , the international support, the p</p><p>  the struts.</p><p>  Model: Model exists as one or several

44、 java beans. These beans are divided into three kinds. Form beans (form Beans), it has preserved the data which the HTTP post requests to transmit. In Struts, all of the Form beans are the subclass of the ActionFrom cla

45、ss. Service logic beans is to be used to process the service logic specially. System mode beans preserve the conversation information of single customer who surmountes many HTTP requests and the system mode.</p>

46、<p>  View: Continue to pass the HTTP by the Controlled module request realizes the JSP document of view. JSP can visit beans and produce the result documents to feed back to the customer. Struts provides the JSP

47、label storehouse to achieve this goal such as Html, Bean, Logic, Template and so on. And it is advantageous in separating the performance logic and procedure logic.</p><p><b>  2.2、JATO</b></

48、p><p>  The JATO application frame is old name of the iPlanet application frame. It is one mature, formidable application frame which faces to develope WEB application based on the J2EE standard. It unified t

49、he demonstration field, the application event, the module level ,the methods of exploitation taking the page as the center, as well as MVC and designing pattern with service-to-workers concepts and so on.</p><

50、p>  JATO is suitable for big, ultra large-scale WEB application. But it is not application frame of the enterprise level.In other words, it cannot provide directly the methods of Enterprise level module such as foun

51、ding EJB and WEB services. But it may struct the customer application which can visit the enterprise level module.</p><p>  The function of this frame is mainly composed of three parts:the core of iPlanet ap

溫馨提示

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

評論

0/150

提交評論