【文章內(nèi)容簡介】
Java code to achieve the same result. Both approaches are often considered inadequate for large projects because they mix application logic with presentation and make maintenance difficult. ? The goal of Struts is to separate the model (application logic that interacts with a database) from the view (HTML pages presented to the client) and the controller (instance that passes information between view and model). Struts provides the controller (a servlet known as ActionServlet) and facilitates the writing of templates for the view or presentation layer (typically in JSP, but XML/XSLT and Velocity are also supported). The web application programmer is responsible for writing the model code, and for creating a central configuration file that binds together model, view and controller. 樣例文本 C ? 在 Struts中,已經(jīng)由一個名為 ActionServlet的 Servlet充當(dāng) 控制器( Controller)的角色,根據(jù)描述模型、視圖、控制器對應(yīng)關(guān)系的,轉(zhuǎn)發(fā)視圖( View)的請求,組裝響應(yīng)數(shù)據(jù)模型( Model)。在 MVC的 模型( Model)部分,經(jīng)常劃分為兩個主要子系統(tǒng)(系統(tǒng)的內(nèi)部數(shù)據(jù)狀態(tài)與改變數(shù)據(jù)狀態(tài)的邏輯動作)