• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2 Convention

 
Neil Muya
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The things you mentioned are a matter of preference.
 
Neil Muya
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9340
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic