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

正文內(nèi)容

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

2024-12-14 07:56本頁面
  

【正文】 ut together to help control change. MVC decouples interface from business logic and data. Struts is an MVC implementation that uses Servlets and JSP tags, from the J2EE specifications, as part of the implementation. You may never implement a system with Struts, but looking at Struts may give you some ideas on your future Servlets and JSP implementations. ModelViewController (MVC) JSP tags solved only part of our problem. We still have issues with validation, flow control, and updating the state of the application. This is where MVC es to the rescue. MVC helps resolve some of the issues with the single module approach by dividing the problem into three categories: ? Model The model contains the core of the application39。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。 ActionForm) 本科生畢業(yè)設(shè)計(jì)(論文)外文翻譯 4 The ActionServlet class Do you remember the days of function mappings? You would map some input event to a pointer to a function. If you where slick, you would place the configuration information into a file and load the file at run time. Function pointer arrays were the good old days of structured programming in C. Life is better now that we have Java technology, XML, J2EE, and all that. The Struts Controller is a servlet that maps events (an event generally being an HTTP post) to classes. And guess what the Controller uses a configuration file so you don_t have to hardcode the values. Life changes, but stays the same. ActionServlet is the Command part of the MVC implementation and is the core of the Framework. ActionServlet (Command) creates and uses Action, an ActionForm, and ActionForward. As mentioned earlier, the file configures the Command. During the creation of the Web project, Action and ActionForm are extended to solve the specific problem space. The file instructs ActionServlet on how to use the extended classes. There are several advantages to this approach: ? The entire logical flow of the application is in a hierarchical text file. This makes it easier to view and understand, especially with large applications. ? The page designer does not have to wade through Java code to understand the flow of the application. ? The Java developer does not need to repile code when making flow changes. Command functionality can be added by extending ActionServlet. The ActionForm class ActionForm maintains the session state for the Web application. ActionForm is an abstract class that is subclassed for each input form model. When I say input form model, I am saying ActionForm represents a general concept of data that is set or updated by a 本科生畢業(yè)設(shè)計(jì)(論文)外文翻譯 5 HTMLform. For instance, you may have a UserActionForm that is set by an HTML Form. The Struts framework will: ? Check to see if a UserActionForm exists。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 t
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1