struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sivapatham, Hari" <HSivapat...@empirix.com>
Subject RE: Struts1 and 2
Date Tue, 19 Jun 2007 13:38:13 GMT
Thanks a lot for the information Jason. The pros and cons list will be
very helpful. Jeff's and your response backup my suggestion of going
with struts2 instead of struts1. Thanks again!
Priya 

-----Original Message-----
From: Jason Wyatt [mailto:jwyatt@itree.com.au] 
Sent: Monday, June 18, 2007 10:59 PM
To: 'Struts Users Mailing List'
Subject: RE: Struts1 and 2

Hi Priya,

I had a similar experience to Jeff...  We've used Struts 1 on several
projects and had to choose whether to go with Struts 2 for our current
project. We went with Struts 2 and have been happy with the decision,
but there were pros and cons: 

Pros of Struts2 (IMHO):
- flexible Interceptor stacks mean you can configure different of
interceptors per action... Neat and powerful.

- the Value Stack and OGNL save a lot of coding... No longer any need to
write everything to the request in your Action just access it in your
JSP page. Simply add get functions to your actions (or model bean if you
use
ModelDriven) and the JSP page will be able to access the variables. Very
elegant.

- Struts 2 creates an instance of the target Action per request. This
means no more multithreaded coding restrictions for you Actions! This
has been a great plus... You can now use full inheritance hierarcy for
your actions, which means you can put common member variables /
functions in a common BaseAction class. This reduces clutter in your
actions and makes them much more easy to understand and maintain.

- The HTML that struts 2 tags is template-driven. This means that if you
have any problems with what the struts2 tags are generating, you can
change it.

- community support for Struts 2 has been good.

Cons:
- We've been using Struts 2.0.6, which seems pretty solid, but we had
some problems with advanced features not behaving the way we expected.
We managed to get Ajax DIV refreshes and tabbed panels working after
some time figuring out the exact incantation. But some other
nice-to-have components don't seem to be production-ready, eg
<s:datetimepicker>. Apart from being buggy when not using the standard
US date format, it seems to slow down page rendering by 1-3 seconds.

- OGNL takes a bit of getting used to.

- we got bitten by the dependency on JDK 1.5. Our S2 web app worked fine
on Tomcat 5.5, but our client's production application server (Oracle AS
10.1.2) didn't support JDK 1.5 by default, and I've spent the last 2
weeks coming up with a satisfactory workaround.

Overall, I'm happy we decided to go with Struts 2, as it seems to save
coding time and ends up with neater, more maintainable code.

Regards
Jason


-----
Falun Dafa  Truth - Compassion - Forbearance

A mind & body practice under persecution in China

http://www.faluninfo.net




-----Original Message-----
From: Sivapatham, Hari [mailto:HSivapatham@empirix.com]
Sent: Tuesday, 19 June 2007 1:31 AM
To: Struts Users Mailing List
Subject: RE: Struts1 and 2

Thanks a lot Jeff. You have confirmed my guess (its got to be better and
not all that different to use, right :). I hope other users can chime in
as well.
Priya

-----Original Message-----
From: Jeff Amiel [mailto:jeff.amiel@gmail.com]
Sent: Monday, June 18, 2007 11:23 AM
To: Struts Users Mailing List
Subject: Re: Struts1 and 2

On 6/18/07, Sivapatham, Hari <HSivapatham@empirix.com> wrote:
> Thanks Martin. I did look at the comparison. However as I don't know 
> struts1, I am not able to judge whether a struts1 user would find
> struts2 concepts to be pretty much the same or radically different and

> hard to follow. I am looking for user perspective on how much of the 
> knowledge gained from struts1 can be applied to struts2.

We are/have been a struts 1 shop for years....
While we didn't use all of the struts 1 bells and whistles that  were
available,  we did make good use of it.

Just started experimenting with struts 2 over last few weeks.  You will
feel right at home.  All of the differences (so far) have been welcome
additions.
We were heavy users of dynaaction forms....and not having to establish
all that configuration (just put the elements as class variables for the
action) was a real time-saver.  Plus the ajax theme stuff that makes it
SOOO easy to have the results of an action simply update a div on the
jsp is super slick (we did that before with home grown ajax via dwr, but
with struts2, it is a
breeze.)

It's not as totally different as some people make out.  You have still
have JSP's that submit data to actions which then result in returns to
JSP's.
(or xhtml/freemarker as you see fit).  I have had a very pleasant time
over the last few weeks...making careful note of where I DON'T have to
write code anymore and struts2 asserts it's 'convention over
configuration'  power.

Good luck!

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org






---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message