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
- The First Day of School
- Happy 8th Birthday to this blog!
- Jess and Lili's Legendary Wedding on The Lost Coast
- Scaling Flash Movies to match Browser Zoom Levels
- My Summer Vacation in Montana
- Another Fun Father's Day at The Great Sand Dunes
- My Incredible Trip to Ireland
- My Presentations from The Irish Software Show 2010
- A Nice Riding Weekend before heading to the Emerald Isle
- Running Selenium Tests on Sauce Labs