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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 Convention" Watch "Struts 2 Convention" New topic
Author

Struts 2 Convention

Neil Muya
Ranch Hand

Joined: Oct 26, 2009
Posts: 30
Hi , I'm new here in java ranch ,hope you guys can help me.

My team will be developing a struts 2 spring + hibernate using struts 2 mvc. Just wanna ask if there is a tutorial for struts 2 coding convention.

Like is it better to use annotation than xml? or using struts.xml as configuration rather than using zero configuration.

Hope you pro's can help me.

Thanks!
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

The things you mentioned are a matter of preference.
Neil Muya
Ranch Hand

Joined: Oct 26, 2009
Posts: 30
Maybe I was just confused about a concept i heard , that annotations are better than xml.

Because I see validation annotations being used this days instead of validation xml.

And I see examples of using the include element in struts.xml to lessen the code.

hmm maybe I was hoping for a struts 2 conventions that would make the code more readable.

Anyway maybe it really depends on the preference.

Thanks for answering dave , maybe I should experiment on both xml and annotation as well as zero configuration to see what is more readable and maintainable .



Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8933
    
    9

Neil Muya wrote:
maybe I should experiment on both xml and annotation as well as zero configuration to see what is more readable and maintainable .


I think you've answered your own question!


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 2 Convention