freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

畢業(yè)設計論文外文文獻翻譯jsp軟件struts——mvc的一種開放源碼實現(xiàn)(完整版)

2025-01-19 07:56上一頁面

下一頁面
  

【正文】 作者: Malcolm Davis 來源: Strutsan opensource MVC implementation[J]. IBM Systems 本文介紹 Struts ,它是使用 servlet 和 JavaServer Pages 技術的一種 ModelViewController 實現(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 4 displays the Web adaptation of MVC, also monly known as MVC Model 2 or MVC 2. Figure 4. MVC Model 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 5 displays an overview of Struts. Figure 5. Struts overview 本科生畢業(yè)設計(論文)外文翻譯 3 Struts overview ? 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 6 is a strippeddown UML diagram of the package. Figure 6 shows the minimal relationships among ActionServlet (Controller), ActionForm (Form State), and Action (Model Wrapper). Figure 6. UML diagram of the relationship of the Command (ActionServlet) to the Model (Action amp。網頁設計人員(或者 HTML 開發(fā)人員)必須理解顏色、用戶、生產流程、網頁布局、瀏覽器兼容性、圖像創(chuàng)建和 JavaScript 等等。 模型 視圖 控制器 (MVC) JSP 標記只解決了部分問題。它是應用程序的 外觀 。在 Web 上,為了發(fā)現(xiàn)對應用程序狀態(tài)的修改,瀏覽器必須重新查詢服務器。 對于 Web,需要修改標準的 MVC 形式。就 Struts 而言,控制器是以 servlet 實現(xiàn)的一個命令設計模式。 ? View(視圖) 視圖就是一個 JSP 文件。函數(shù)指針數(shù)組曾經是用 C 語言進行結構化編程的很好方法。在創(chuàng)建 Web 項目時,您將擴展 Action 和 ActionForm 來解決特定的問題。 ActionForm 是一個抽象類,必須為每個輸入表單模型創(chuàng)建該類的子類。 ? 在將它傳遞給 Action 類之前, Struts 還會對 UserActionForm 調用 validation() 方法進行表單狀態(tài)驗證。 Action 類 Action 類是業(yè)務邏輯的一個包裝。通過將業(yè)務邏輯放在單獨的包或 EJB 中,我們就可以提供更大的靈活性和可重用性。(一個有趣的發(fā)現(xiàn)是, Action 是類而不是接 口)??刂破鞑榭摧斎胧录⒄埱蠓峙山o某個 Action 類。這個特性能很好地集成到基于 JSP 的開發(fā)工具中,這些工具允許用標記編寫代碼。問題越來越復雜,并且需要越來越多的管理。 本科生畢業(yè)設計(論文)外文翻譯 15 ? 正確的抽象級別 Struts 是否提供了正確的抽象級別?對于網頁設計人員而言,什么是正確的抽象級別呢?這是一個用 $64K 的文字才能解釋清楚的問題。 Logic Tag 就是這樣的一種庫,它對有條件 地生成輸出進行管理,但這并不能阻止 UI 開發(fā)人員對 Java 代碼的狂熱。 ? 復雜性 在將問題分為幾個部分的同時也引入了復雜性。此外,一個標準 JSP 標記庫即將出現(xiàn)。隨著變化的不斷加入,這有時會令人很沮喪。當然,這項任務真是說起來容易做起來難。在 UI 開發(fā)中限制訪問 Java 有一定的合理性。他們正在向著發(fā)行版本 而努力,但與任何 版本一樣,它不可能盡善盡美。此外,如果您正在學習 JSP 標記技術,則 Struts 為您提供了一個起點。 配置信息被轉換為一組 ActionMapping ,而后者又被放入 ActionMappings 容器中。真是金無足赤。 Action 的用途是 “將類的接口轉換為客戶機所需的另一個接口。要使用 Action ,請創(chuàng)建它的子類并覆蓋 process() 方法。別的網頁或業(yè)務可能使用 UserActionForm ,在這些地方,驗證可能有所不同。例如,您可能有一個由 HTML 表單設置的 UserActionForm 。這種方法有幾個優(yōu)點: ? 應用程序的整個邏輯流程都存儲在一個分層的文本文件中。 Struts 的控制器是將事件(事件通常是 HTTP post)映射到類的一個 servlet。標記是使 Struts 有別于其他框架(如 Velocity)的因素之一。 ? 業(yè)務邏輯 業(yè)務邏輯更新模型的狀態(tài),并幫助控制應用程序的流程。 圖 4. MVC Model 2 Struts, MVC 2 的一種實現(xiàn) Struts 是一組相互協(xié)作的類、 servlet 和 JSP 標記,它們組成一個可重用的 MVC 2 設計。當然,我們可以使用 Java(或者 PERL、 C/C++ 或別的語言)代碼生成 HTML。此外,它對控制器一無所知。這正是 MVC 發(fā)揮作用的地方。JavaServer Pages (JSP) 技術為網頁設計人員和 Java 開發(fā)人員提供了一種聯(lián)系鈕帶。 if not, it will create an instance of the class. ? Struts will set the state of the UserActionForm using corresponding fields from the HttpServletRequest. No more dreadful () calls. For instance, the Struts framework will take fname from request stream and call (). ? The Struts framework updates the state of the UserActionForm before passing it to the business wrapper UserAction. ? Before passing it to the Action class, Struts will also conduct form state validation by calling the validation() method on UserActionForm. Note: This is not always wise to do. There might be ways of using UserActionForm in other pages or business objects, where the validation might be different. Validation of the sta
點擊復制文檔內容
公司管理相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1