wood burning stoves 2.0*
The moose likes Struts and the fly likes Difference between Struts1.2 and Struts2? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Difference between Struts1.2 and Struts2?" Watch "Difference between Struts1.2 and Struts2?" New topic
Author

Difference between Struts1.2 and Struts2?

Tejas Jain
Ranch Hand

Joined: Mar 04, 2008
Posts: 119
Would like to know the difference in architecture, API, and configuration.
I heard that Struts2's performance is only about 1/10 of Struts1.2. Any comments.
Can DOJO in Struts2 compete with FLEX or GWT?
Can I still use tags from struts1.2 in struts2?


"Knowing is not enough, you must apply... Willing is not enough, you must do."
--Bruce Lee
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Originally posted by Todd Jain:
Would like to know the difference in architecture, API, and configuration.

This link has a pretty good comparison.
Originally posted by Todd Jain:
I heard that Struts2's performance is only about 1/10 of Struts1.2.
Where did you hear that? That hasn't been my experience at all, particularly if you follow the tuning guidelines for production systems. Besides, in my years of experience developing web applications, I have found that which web application framework you're using is usually the least important factor when it comes to performance. The bottlenecks are much more likely to occur in the database and model layers.
Originally posted by Todd Jain:
Can I still use tags from struts1.2 in struts2?

No, you can't. However, if you want to slowly migrate an applicatoin from Struts 1 to Struts 2, there's nothing wrong with having the Struts 1 servlet and the Struts 2 interceptors active in the same application. That way some pages can use the old tags, and some the new.
[ April 06, 2008: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
Tejas Jain
Ranch Hand

Joined: Mar 04, 2008
Posts: 119
Originally posted by Merrill Higginson:

No, you can't. However, if you want to slowly migrate an applicatoin from Struts 1 to Struts 2, there's nothing wrong with having the Struts 1 servlet and the Struts 2 interceptors active in the same application. That way some pages can use the old tags, and some the new.
[ April 06, 2008: Message edited by: Merrill Higginson ]


How much the difference is? Even the tags' name and attributes?
Should we really think Struts2 is a completely different framework from
Struts1 even they have the same name?
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Originally posted by Todd Jain:
How much the difference is? Even the tags' name and attributes?

In Struts 2 there is only one tag library. The functions are similar, but not all the attributes are the same.
Originally posted by Todd Jain:

Should we really think Struts2 is a completely different framework from
Struts1 even they have the same name?

That is exactly correct. It's a completely different framework.
Tejas Jain
Ranch Hand

Joined: Mar 04, 2008
Posts: 119
Originally posted by Merrill Higginson:

That is exactly correct. It's a completely different framework.


Then the legacy experience with Struts1 will not help in Struts2.

For a new rich internet application, we have to select among Struts2, Spring webflow+GWT, JBoss Seam, Flex, ...

What advantages Struts2 has over other options?
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Originally posted by Todd Jain:

Then the legacy experience with Struts1 will not help in Struts2.

That's not entirely true. I may have overstated my point by saying that it's a completely different framework. There are certainly some things in common. You still have the concept of Action classes and forwards. There is no ActionForm in Struts 2, because it's sort of merged with the Action class. That is to say, the properties you refer to you in your tags are all in the Action class or in other objects referenced in the Action class. Even though the tags are different, they will look familiar to someone who knows Struts 1.
Originally posted by Todd Jain:

For a new rich internet application, we have to select among Struts2, Spring webflow+GWT, JBoss Seam, Flex, ...

What advantages Struts2 has over other options?

You have a good point. These days there are almost too many web application frameworks to choose from. Back when Struts was first created, it was by far the best of only a few frameworks available. Now there's a lot of good stuff to choose from. They all have their advantages and disadvantages. All I can say is do your research and make your choice based on solid evidence and your personal preferences, ignoring the bluster of the bloggers as much as possible.
[ April 07, 2008: Message edited by: Merrill Higginson ]
 
Don't get me started about those stupid light bulbs.
 
subject: Difference between Struts1.2 and Struts2?
 
Similar Threads
struts2
Struts2
Struts2
Good books on Struts2
Struts2