The first development build (2.0.1) of Apache Struts 2 project has been released.
From Planet Struts News:
Struts 2 was originally known as WebWork 2. After working independently for several years, the WebWork and Struts communities joined forces to create Struts 2. This new version of Struts is designed to be simpler to use and closer to how Struts was always meant to be. Some key changes are:
- Smarter!
- Improved Design - All Struts 2 classes are based on interfaces. Core interfaces are HTTP independent.
- Intelligent Defaults - Most configuration elements have a default value that we can set and forget.
- Enhanced Results - Unlike ActionForwards, Struts 2 Results can actually help prepare the response.
- Enhanced Tags - Struts 2 tags don’t just output data, but provide stylesheet-driven markup, so that we can create consistent pages with less code.
- First-class AJAX support - The AJAX theme gives interactive applications a significant boost.
- Stateful Checkboxes - Struts 2 checkboxes do not require special handling for false values.
- QuickStart - Many changes can be made on the fly without restarting a web container.
- Easier!
- Easy-to-test Actions - Struts 2 Actions are HTTP independent and can be tested without resorting to mock objects.
- Easy-to-customize controller - Struts 1 lets us customize the request processor per module, Struts 2 lets us customize the request handling per action, if desired.
- Easy-to-tweak tags - Struts 2 tag markup can be altered by changing an underlying stylesheet. Individual tag markup can be changed by editing a FreeMarker template. No need to grok the taglib API! Both JSP and FreeMarker tags are fully supported.
- Easy cancel handling - The Struts 2 Cancel button can go directly to a different action.
- Easy Spring integration - Struts 2 Actions are Spring-aware. Just add Spring beans!
- Easy plugins - Struts 2 extensions can be added by dropping in a JAR. No manual configuration required!
- POJO-ier!
- POJO forms - No more ActionForms! We can use any JavaBean we like or put properties directly on our Action classes. No need to use all String properties!
- POJO Actions - Any class can be used as an Action class. We don’t even have to implement an interface!
Struts 2 key features
- A flexible, plain old Java object (POJO)-based architecture to structure your code and pages, yet stay out of your way.
- A theme-enabled tag library supporting JSP, Velocity, and Freemarker.
- Built in support for complex Javascript and Ajax widgets.
- A simple plugin framework to integrate with third-party libraries like JavaServer Faces, JasperReports, and JFreeChart.
- Built-in debugging tools supporting profiling, problem reports, and interactive object model queries.
- Automatic portlet support allowing portal and servlet deployments with no code changes
- Quick start development tools like Maven archetypes, automatic reloading configuration files, and bootstrap tutorials.
Other Resources
- Apache Struts 2 Documentation
- Migrating to Struts 2
- Migrating Struts Apps to Struts 2 from InfoQ
- Migrating to Struts 2 - Part II from InfoQ
- Migrating to Struts 2 - Part III from InfoQ
One simple question…
Is it more model driven?…or is it simply a great enhacement of the struts model? Struts is/was verbose, ok, but that was not the only thing that was wrong with it. Struts acts far away from the domain model, and doesn’t integrate different domain-model driven components.
For example in a traditional struts application using Hibernate, simple validation has to be defined two to three times (one in the validator.xml, one in the DB with contraints, and possibly one in the ORM mapping file/ORM mapping tags, (ok you’ll say the latest two can be combined but its still verbose)).
In another subject are there new abstractions (other than request and session)? old struts really lacked that.
A simple makeover of the struts model might make developing in struts more productive, but is light years away from the productiveness of other WebDev tools that integrate domain-driven components with a simple sintax, both inducing less code and less complex code.
Just my €0.02.
what is this term : Stateful Checkboxes
How to make Stateful Checkboxes
How can we use Stateful Checkboxes
There is no such info provided in any document
if such a document found please supply the link
Thanks
Sourabh