Pages

Wednesday, December 7, 2011

Why struts 2?

Struts 2 is the combination of struts 2 action framework and webwork.

There are some key features in struts 2 as explained below.

1. Simplified design : Most of the Struts 2 classes are based on interfaces and most of its core interfaces are HTTP independent. Struts 2 Action classes are framework independent and are simplified to look as simple POJOs(Plain Old Java Classes). Framework components are tried to keep loosely coupled. 

2. Simplified actions : Actions are simple POJOs. Any java class with execute() method can be used as an Action class. Even we don't need to implement interfaces always. 

3. No more ActionForms  : ActionForms feature is no more known to the struts2 framework. Simple Java-bean flavoured actions are used to put properties directly. No need to use all String properties.

4. Simplified testability : Struts 2 Actions are HTTP independent and framework neutral. This enables to test struts applications very easily without resorting to mock objects.

5. Plumbing code : "Plumbing code" contained within the Struts framework. Mapping HTTP request parameters to Java objects is handled by Struts, for example. You don't have to do it. This allows you to focus more on the domain problem instead of building infrastructure.


 

No comments:

Post a Comment