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

正文內(nèi)容

畢業(yè)設(shè)計(jì)論文外文文獻(xiàn)翻譯jsp軟件struts——mvc的一種開放源碼實(shí)現(xiàn)(存儲(chǔ)版)

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

下一頁面
  

【正文】 控制 Web 項(xiàng)目中的變化并提高專業(yè)化水平。s functionality. The model encapsulates the state of the application. Sometimes the only functionality it contains is state. It knows nothing about the view or controller. ? View ? The view provides the presentation of the model. It is the look of the application. The view can access the model getters, but it has no knowledge of the setters. In addition, it knows 本科生畢業(yè)設(shè)計(jì)(論文)外文翻譯 2 nothing about the controller. The view should be notified when changes to the model occur. Controller The controller reacts to the user input. It creates and sets the model. MVC Model 2 The Web brought some unique challenges to software developers, most notably the stateless connection between the client and the server. This stateless behavior made it difficult for the model to notify the view of changes. On the Web, the browser has to requery the server to discover modification to the state of the application. Another noticeable change is that the view uses different technology for implementation than the model or controller. Of course, we could use Java (or PERL, C/C++ or what ever) code to generate HTML. There are several disadvantages to that approach: ? Java programmers should develop services, not HTML. ? Changes to layout would require changes to code. ? Customers of the service should be able to create pages to meet their specific needs. ? The page designer isn39。但是,小學(xué)生的網(wǎng)頁和專業(yè)開發(fā)的網(wǎng)站有質(zhì)的區(qū)別。盡管您可能永遠(yuǎn)不會(huì)用 Struts 實(shí)現(xiàn)一個(gè)系統(tǒng),但了解一下 Struts 或許使您能將其中的一些思想用于您以后的 Servlet 的 JSP 實(shí)現(xiàn)中。 ? View(視圖) 視圖提供模型的表示。這種無狀態(tài)行為使得模型很難將更改通知視圖。 ? 嵌在代碼中的 HTML 很難看。 ? Controller(控制器) 控制器接收來自瀏覽器的請(qǐng)求,并決定將這個(gè)請(qǐng)求發(fā)往何處。 JSP 文件使用 JSP 標(biāo)記讀取來自 ActionForm bean 的信息。如果您對(duì)此比較熟悉,您會(huì)將配置信息放入一個(gè)文件,并在運(yùn)行時(shí)加載這個(gè)文件。如前所述, 文件配置該 Command。 ActionForm 類 ActionForm 維護(hù) Web 應(yīng)用程序的會(huì)話狀態(tài)。 ? Struts 框架在將 UserActionForm 傳遞給業(yè)務(wù)包裝 UserAction 之前將更新它的狀態(tài)。 本科生畢業(yè)設(shè)計(jì)(論文)外文翻譯 13 ? UserActionForm 可跨多頁進(jìn)行映射,以執(zhí)行諸如向?qū)е惖牟僮鳌? Action 類應(yīng)該控制應(yīng)用程序的流程,而不應(yīng)該控制應(yīng)用程序的邏輯。通過擴(kuò)展 Action ,我們使得我們的業(yè)務(wù)接口與 Struts 業(yè)務(wù)接口保持兼容。 圖 7. Command (ActionServlet) 與 Model (Action) 之間的關(guān)系的 UML 圖 ActionMapping 類 本科生畢業(yè)設(shè)計(jì)(論文)外文翻譯 14 輸入事件通常是在 HTTP 請(qǐng)求表單中發(fā)生的, servlet 容器將 HTTP 請(qǐng)求轉(zhuǎn)換為 HttpServletRequest 。 Struts 的優(yōu)點(diǎn) ? JSP 標(biāo)記機(jī)制的使用 標(biāo)記特性從 JSP 文件 獲得可重用代碼和抽象 Java 代碼。當(dāng)然,這是一把雙刃劍。由于 Struts 中的變化,我不得不數(shù)次修改我的示例,但我不保證我的示例能與您下載的 Struts 協(xié)同工作。我會(huì)聽到這樣的話, “既然我可以用 VBScript 直接編寫 COM 對(duì)象,為什么還要等 COM 開發(fā)人員來創(chuàng)建它呢? ”通過使用標(biāo)記庫,Struts 有助于限制 JSP 文件中所需的 Java 代碼的數(shù)量。我建議您在遇到問題時(shí)訪問 Struts 用戶郵件列表的歸檔資料(請(qǐng)參閱 參考資源 )。您可以從 Sun 的網(wǎng)站獲得新的 JSP 和 Servlet 規(guī)范的草案 。歡迎訪問本網(wǎng)站。 ? 有限的適用范圍 Struts 是一種基于 Web 的 MVC 解決方案,所以必須用 HTML、 JSP 文件和 servlet 來實(shí)現(xiàn)它。最重要的是,如果讓網(wǎng)頁設(shè)計(jì)人員使用一 點(diǎn) Java,他將使用大量的 Java。 ? 仍在變化中 這個(gè)框架仍在快速變化。 ? 開放源碼 您可以獲得開放源碼的全部?jī)?yōu)點(diǎn),比如可以查看代碼并讓使用庫的每個(gè)人檢查代碼。(您可能尚未注意到這一點(diǎn),以 s結(jié)尾的類就是容器) ActionMapping 包含有關(guān)特定事件如何映射到特定 Action 的信息。) Error 類 UML 圖(圖 6)還包括 ActionError 和 ActionErrors 。 Adapter 使類能夠協(xié)同工作,如果沒有 Adapter,則這些類會(huì)因?yàn)椴患嫒莸慕涌诙鵁o法協(xié)同工作。 ActionServlet (Command) 使用 perform() 方法將參數(shù)化的類傳遞給 ActionForm 。在 UserAction 類中進(jìn)行狀態(tài)驗(yàn)證可能更好。 Struts 框架將執(zhí)行以下操作: ? 檢查 UserActionForm 是否存在;如果不存在,它將創(chuàng)建該類的一個(gè)實(shí)例。這使得人們更容易查看和理解它,尤其是 對(duì)于大型應(yīng)用程序而言。正如您所料 控制器使用配置文件以使您不必對(duì)這些值進(jìn)行硬編碼。 詳細(xì)分析 Struts 圖 6 顯示的是 包的一個(gè)最簡(jiǎn) UML 圖。就 Struts 而言,這是通過作為實(shí)際業(yè)務(wù)邏輯 “瘦 ”包裝的 Action 類完成的。這個(gè)定義表示 Struts 是一個(gè)框架,而不是一個(gè)庫,但 Struts 也包含了豐富的標(biāo)記庫和獨(dú)立于該框架工作的實(shí)用程序類。這種方法有幾個(gè)缺點(diǎn): ? Java 程序員應(yīng)該開發(fā)服務(wù),而不是 HTML。當(dāng)更改模型時(shí),視圖應(yīng)得到通知。 MVC 通過將問題分為三個(gè)類別來幫助解決單一模塊方法所遇到的某些問題: ? Model(模型) 模型包含應(yīng)用程序的核心功能。 如果您開發(fā)過大型 Web 應(yīng)用程序,您就理解 變化 這個(gè)詞的含義。s perfect.) The Error classes The UML diagram (Figure 6) also included ActionError and ActionErrors. ActionError encapsulates an individual error message. ActionErrors is a container of ActionError classes that the View can access using tags. ActionErrors is Struts way of keeping up with a list of errors. Figure 7. UML diagram of the relationship of the Command (ActionServlet) to the Model (Action) The ActionMapping class An ining event is normally in the form of an HTTP request, which the servlet Container turns into an HttpServletRequest. The Controller looks at the ining event and dispatches the request to an Action class. The determines what Action class the Controller calls. The configuration information is translated into a set of ActionMapping, which are put into container of ActionMappings. (If you have not noticed it, classes that end with s are containers) The ActionMapping contains the knowledge of how a specific event maps to specific Actions. The ActionServlet (Command) passes the ActionMapping to the Action class via the perform() method. This allows Action to access the information to control flow. ActionMappings ActionMappings is a collection of ActionMap
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1