Today downloaded JIVE 3.0 to try, prepare to study the new features of Jive, and do some reference for Jute next development. The discovery in the study will be collected with everyone to share. Title: Comparison of between Jive3.0 Webwork and Jute1.0 Action Mapping: Rainmanzhu Time: 2002-11-29 from: http: //www.cjsdn.com content: Jive3.0, the framework includes a webwork of Look at naming, it is understood that it is used to handle web links to complete a series of related tasks. Because the HTTP protocol is stateless, if the task is to perform step-by-step execution, it is necessary to define the protocol to put multiple link strings (chain), and the task processing will have an error or successful branch, such as the new topic such a task. If the article is too long, you need to display the error page to the user; if you join the topic, you need to prompt the user to post success, in Jive, this action is defined in Actions.xml:
Of course, ATTACH Actions are also defined in Actions.xml:
By the way, WebWork defines a set of labels for JSP: such as the homepage: <% - print info message if the exist -%>
ww: if> by using a tag, the controllability of the interface becomes good jive up. I will focus later to analyze the performance of Webwork, I hope to learn some good ways to learn. Jute 1.0 is also a very mature three-layer structure. The intermediate layer uses servlet mapping action mapping to distinguish between different functional groups through the URL prefix, select the new servlet or select a new Action according to the complexity of the function. To separate the code. Using inheritance and abstract methods to reuse code, Jute All servlets are inherited from JuteServlet. In fact, other servlets are defined actions! Each servlet has Perform (CONTEXT CONTEXT, CGI CGI) method, is default action; then other Actions can be defined to complete different action, Jute's CGI class similar to Jive's ActionContext, Request, Cookie, Session through CGI objects Get, in order to improve performance, the CGI class is created by object pool; Jive creates new actionContext each time, and saves in Threadlocal! This is what I didn't think of it before, and later studied. The CONTEXT class of Jute is actually a TemplateContext or to save the control layer state, but more to provide data to the interface layer. There is an ExcuteAction method in the base class JuteServlet. After the method is executed, return the interface template, this is very similar to JIVE! ! ! But the difference is also very big! Jive is a static mapping action, and Jute is a running moment, and the event is to speed up the action by cache, but the jive can define various views of Action Chain, and Action, and save the previous action, for Errors generated during the Action implementation can also be saved in the action and configured the configuration extension. Jute's action mapping can save the last state through the CGI class, similar to the viewState in ASP.NET. When you create an action chain, you should pay attention to saving the previous state of each process, and this URL has become very long! JIVE defaults can nested 10 floors. JIVE can write this: "> Go back to get the previous URL. I think in the future, I can modify the JUTE to improve the HTTP status. Jute's return interface does not use the mapping method as JIVE, but directly written in the respective action method, because the interface and the Action relationship is close, generally cannot transform, but in the interface template can be embedded into sub-templates.