XDoclet vs. JSR 175
Rob Kischuk has a post where he describes what a Struts Action might look like using JSR 175 annotations.
@StrutsAction( @ActionMappings({ @ActionMapping( path="index" @ActionForwards({ @ActionForward( name="success" path="index.jsp" ) @ActionForward( name="failure" path="error.jsp" ) }) ) }) ) public class IndexAction extends Action {
As I read it, I though - "holy crap is that ugly!" Isn't the XDoclet version a bit cleaner?
* @struts.action path="index" * @struts.action-forward name="success" path="index.jsp" * @struts.action-forward name="failure" path="error.jsp"
I'll admit, I don't know much about JSR 175, except that it is designed to replace XDoclet. However, I don't believe that it will generate code like XDoclet does - but rather it will allow your Java code to describe metadata using doclet tags. So what good does that do? Does this mean all my metadata and configuration stuff is hard-coded into my source? With XDoclet, I realize that a lot of this stuff is hard-coded into my source, but at least I can change things by changing an ant property and rebuilding - or changing the generated XML files. Why is JSR 175 better than XDoclet? I guess I just don't see the beauty of it. More typing and uglier javadocs aren't that appealing to me.