Wednesday May 19, 2004

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.
Posted in Java
at May 19 2004, 11:12:29 AM MDT
7 Comments
Search This Site
Recent Entries
- My What's New in Spring 3.1 Presentation
- Twitter's Open Source Summit: Bootstrap 2.0 Edition
- Refreshing AppFuse's UI with Twitter Bootstrap
- 2011 - A Year in Review
- Upgrading AppFuse to Spring Security 3.1 and Spring 3.1
- What have I been working on at Taleo?
- Our Engaging Trip to Paris and Antwerp
- My HTML5 with Play Scala, CoffeeScript and Jade Presentation from Devoxx 2011
- Deploying Java and Play Framework Apps to the Cloud with James Ward
- PhoneGap for Hybrid App Development