JSP itself provides a Finite State Machine Model (FSM), the web access model is directly reflected in this: action? xxxx. Action corresponds to the method name, XXX is the parameter of the method. In this access model, there is no state storage where it is stored, because it assumes that the background is a whole, constitutes a huge state set. But this model is destined to be excessive simplified, so there will be a lot of development. The direction of development is gradually refining, identifying the relevant part, organizes them together. In fact, this evolution can be seen from the development process of each framework. Struts only has a global configuration file, now there is a concept of a module. WebWork is designed after Struts, providing a so-called Package concept, putting a bunch of action and interceptor organizations together, and it is a bit more eye-catching. The concept is more than the module. This exists before the object, and it is also in line with the development of Struts. It is only a simple module concept, but an object-oriented design, just webwork. There is no separation of type and name, each Action name corresponds to an Action, so Package can also be seen as a completely static object, only one instance, isn't it? We can do a corresponding, package Namespace probably You can correspond to ObjectScope in jsplet, and the package name can probably correspond to ObjectType in jsplet, and the action corresponds to ObjectEvent. The difference is that ObjectScope is fully dynamically, and participates in the web object management, and the package's Namespace is created. The name is different. The follow-up development of Webwork will not do some articles at this point? Look at another place. The front page display needs to get the data from the model. How is the model object managed, and JSP itself provides several management policy Application, Session, Request, Page, how many Actions require sharing status information? The relationship between state and behavior is objective. WebWork2 does not provide an objective means, don't know how the average person is doing, plug all related operations in an action, then map the model object from the session? Sense is not from the session? More and more, is there anyone to manage?
The core of the jsplet is ObjectManager. It uses ObjectFactory to create objects, using ObjectName to manage WebObject, which is independent of the network, and the objects management here do not necessarily need the corresponding web event. Object If you need to respond to events, implement the IEventListener interface, in the default implementation, jsplet uses EventManager to manage the object of ObjectEvent, which is approximately equivalent to the work of xwork, just EventManager is a help object, by WebObject, decide whether it is used, and it is WebObject uses its own EventManager instead of a single EventManager in the system.
The entire ObjectManager level is unrelated to the network, of course, can be tested. WebEngine finally implements the association of ObjectManager with the web environment, just it uses the pull mode. Especially in the view JSP calling WebEngine, the most important role is to inject thisobj variable into the JSP model. The THIS pointer actually reflects the important feature of objectivity: use local names and not the global name. In fact, XWork itself is also available from the Web environment, especially it can be used by View, which is a source of its scalability.