Overview
STRUTS2.0 is a concrete framework of MVC thought.
the relationship between struts2.0 and struts1.0
To understand the relationship between struts1.0 and struts2.0, first of all to know that Webwork,webwork is a new framework of MVC thought, the framework developed by the Opensymphony organization, a great degree of recognition by everyone, before the WebWork framework, Apache Group Weaving developed a struts1.0, but, because of the webwork framework relative to the struts1.0, there are many advantages, so, Apache has developed a struts2.0,struts2.0 is on the webwork based on the redesign, compatible with struts1.0 a framework, so, very To a large extent, there has been a lot of difference with struts1.0.
The above is the first stage, after the WebWork and struts are merged and so on, there is no excessive query.
the difference between struts2.0 and struts1.0
struts1.0 and struts2.0 are no different in nature, because they are the concrete framework of the realization of MVC thought, to say different words, is its concrete implementation of different, of course, the specific implementation of the difference also brought other aspects of the difference, this difference is mostly for the previous shortcomings of an improvement.
The action class in struts2.0 creates a new object each time it is requested, so that its action object is thread-safe in relation to threads, and the action class in struts1.0, because it inherits the servlet, so its object is unsafe within the thread; struts2 .0 The action class, you can implement the corresponding interface or inherit the corresponding class, or not, The action class in such a program is less dependent on struts2.0, and the struts1.0 action class is an inherited servlet, so its test must require a servlet container, and struts2.0 's action class has no such requirement; strut s1.0 Custom type conversion configuration is only global configuration, no local configuration, and struts2.0 custom type conversion class configuration, both global configuration and local configuration, struts2.0 the entire process of the order is variable, because it is through the filter, but the struts1.0 process can not be modified.
Summary
There are many differences between struts1.0 and struts2.0, but there is no difference in their nature. Struts2.0 is a new design idea of the framework, better than struts1.0, but, in the process of learning, struts1.0 learning is very necessary.
Summary of struts2.0