On 11/23/06, Jeevan Kumar Kade <[EMAIL PROTECTED]> wrote:
I worked on Struts 1.1 for around 1 year. 1. Architecture changes are more and complex to understand between the different layers
From the perspective of coding Struts application, the architecture is
easier. The Struts 2 configuraiton files are simplier and cleaner than the Struts 2 equivalents. See * http://strutsuniversity.org/Migrating+Tutorial for a 1:1 comparison of Struts 1 and Struts 2.0.1. For Struts 2.0.2, we've simplied more of the tag syntax.Almost everything in Struts 2 is easier to code than Struts 2, both on the Action level or the page level.
From the perspective of extending the Struts framework, the
architecture is much simpler. Extending the Struts 2 request processor is a delicate operation, even with the addition of the Struts Chain, and it can be difficult to use more than one internal extension at once. Struts 2 can be easily extended by adding an Interceptor class, which works just like a servlet filter. You can add your own Interceptors to all the actions, or just one, or just some; it's your choice. Struts 2 can also be extended using drop-and-go plugins. A Struts 2 plugin can install itself, and an application can use as many plugins as it needs, much like Eclipse or Maven plugins. Most any extension can be written using Interceptors and Plugins, or maybe a new Result. (Results are like ActionForwards, only smarter and more powerful.) We're proving that by bundling eleven plugins of our own with Struts 2.
2. Code for Action class has been changed(Action has been replaced by ActionSupport and also signature of execute() method)
True. The execute signature is simplier. The ActionSupport base class is optional, but usually helpful. It's also much easier to call alternate methods in Struts 2. For example, if you want a button to call a different action, you can just add "action=" to the button markup, and submit to an entirely different action -- without Javascript.
3. Form is missing
Input properties can be added to the Action instead
4. In JSP the taglibs are replaced by struts-tags
True. The struts-tags syntax is similar but simplier. Aside from the usual HTML 4.0 tags, there are also a number of add-value tags, like a treeview, and an Ajax theme. Struts 2 tags also emit standard markup, based on a theme, so that there is less to code in a page.
5. The big one is struts-config.xml replaced by struts.xml and the structure of the xml has been changed adding <result> instead of <forward> and some other tags like <packages> etc If this is the case, then how struts 2.0.1 will support the comptability?
Struts 1 is stable, and we don't recommend that teams migrate working Struts 1 Actions and pages to Struts 2. The codebases do not conflict, and applications can run both Struts 1 and Struts 2 at the same time. There is a compatability layer that run Struts 1 Action classes in Struts 2, but no such thing for the pages. I think more could be done with compatability layers and migration tools, but someone has to volunteer to do the work. Right now, most of us are letting our Struts 1 application lie, and using Struts 2 for new development.
As per my knowledge, things have to get change a lot and the learning curve will be challenging for developers.
Everyone I've worked with reports that the learning curve is gentle. If there were no learning curve, there would be no learning, and no improvement.
I need your suggestions/advices on this Thanks in Advance Jeevan
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]