【正文】
tion J2 the EE the application of the development the process: 1)the antinomy of of data model and logic model. Currently the database of usage basically and all is relation type database, but the Java be essentially a kind of the language which face to object, object at saving with read usage SQL and JDBC carry on a database operation and lowered plait distance of efficiency and system of can maintenance。 the importation feedback model, then realization pute model control, is make model and see diagram to moderate work of parts. Usually 1 see a diagram rightness should a controller. Model, see separate of diagram and controller, make a model be able to have many manifestation to see diagram. If the customer pass a certain see the controller of diagram change the data of model, all other dependence in these see of data diagram all should reflection arrive these variety. When therefore and regardless occurrence what data variety, controller all would variety notice ally see diagram, cause manifestation of renewal. This is actually a kind of variety of modeldissemination mechanism. The Struts Frame The Struts frame is to be the item of Apache Jakarta to constitute part to publish luck to do at the earliest stage, it inherited MVC of each item characteristic, and did according to the characteristics of J2 EE correspond of variety with expand. The Struts frame was good to bine Jsp , Java Servlet , Java Bean, Talia etc. technique. In the Struts, what to undertake the controller role in the MVC be an ActionServlet. The ActionServlet is an in general use control module. This control module provided a processing all HTTP claim which send out Struts of entrance point. Its interception with distribute these claim to arrive correspond of action type.(these action all of type is Action son type)Moreover the control module is also responsible for using to correspond of claim the parameter fill Action Form(FromBean), and pass action type(ActionBean).Action type the business logic of the interview core, then interview Java Bean or adjust to use EJB. End action type control the power pass followup of JSP document, from JSP document born see diagram. All these control logic make use of the document e to allocation. See diagram in the Struts frame main from JSP born page pletion, the Struts provide abundant of JSP label database, this is advantageous to separating performance logic and procedure model is with 1 or the form existence of several Java Bean. In the Struts, main existence three kinds of Bean, respectively BE: Action, ActionForm, EJB perhaps Java Bean. The Struts frame have no concrete definition model layer of realization, in actually the development, model layer usually is close with business logic connect with each other, and want to carry on operation to the first floor data. The underneath39。s general patterns. Nevertheless, replacing the web solution with Struts, WebWork, or the like is easy. Both with Spring39。s JtaTransactionManager if you need distributed transactions but only then, as there are perfect replacements for single databases, like DataSourceTransactionManager or HibernateTransactionManager. Spring39。s no need to implement an interface or derive from a base class. Spring39。s often preferable to bind directly to your business objects. This is another major difference to Struts which is built around required base classes like Action and ActionForm for every type of action. Compared to WebWork, Spring has more differentiated object roles: It supports the notion of a Controller, an optional mand or form object, and a model that gets passed to the view. The model will normally include the mand or form object but also arbitrary reference data. Instead, a WebWork Action bines all those roles into one single object. WebWork does allow you to use existing business objects as part of your form, but just by making them bean properties of the respective Action class. Finally, the same Action instance that handles the request gets used for evaluation and form population in the view. Thus, reference data needs to be modelled as bean properties of the Action too. Regarding views: Spring39。s respective helper method) from within a Struts or WebWork action. Note that there aren39。s web MVC. Spring doesn39。t very good, can pass JNDI will it modification is usage Tomcat of conjunction pond.