Thursday, November 19, 2009
Expired Ativan Effects
the changes we can find between these two versions
are very important, as first impression
can say it is not the same. The main differences are
:
Servlet Unit:
Struts 1 Actions have dependencies on the servlet
(HttpServletRequest and HttpServletResponse)
these objects are passed to the method of execution in Struts 2, "Actions are not
container dependent because they are made simple POJOs.
In Struts 2, servlet contexts are represented as simple maps
, also actions can access the original request
. Acction
class
It solved the problem of abstract classes in Struts 2, Struts 1
the kind of action needs to expand the framework since
depends on the abstract base class. But in the case of Struts 2, Action
class can implement interfaces
For Struts 2, Actions are not container dependent
because they are made simple POJOs.
Struts 2 provides a basis for implementing class ActionSupport common interface.
While the Action interface is not necessary.
Any POJO object with an execution of the signature can be used as a
Struts 2 Action object.
Validation
The two versions can do manual validation in Struts 1
using the method of the ActionForm, or validates through an extension
the Commons Validator. However, Struts 2,
It utuliza the XWork validation framework. The
Xwork validation framework supports chaining validation.
Threading Model
In Struts 1, action resources must be thread-safe or synchronized.
What actions are unique and multi-threaded, The Singleton design pattern
imposes where Struts 2, objects are instantiated
action for each application, so no thread (This creates less impact)
Testability Struts 1 Testing applications are a bit complex , but Struts 2
Actions can be tested.
entry collection Struts 1 uses an ActionForm object to capture input. ActionForms
And all you need to extend a framework dependent base class
. JavaBeans can not be used as
ActionForms, so developers have to create redundant classes to capture
input. However
Struts 2 uses Action properties (as input properties independent
underlying structure)
eliminating the need for an object, thus reducing the redundancy
.
addition, Struts 2, the action properties
can be accessed from the website via the taglibs. Struts 2 also supports
ActionForm pattern, as well as POJO form objects and POJO Actions.
good there are more differences but I believe that these are the most important
, then when I drive over and find another
modificare missing these points.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment