20050917 Saturday September 17, 2005

More on Annotations in JSF

During the last few days, the JSF community seems to be collectively turning its eyes towards annotations. Duncan Mill blogged about it as a response to Ed Burns' blog and a discussion on TheServerSide.

The whole idea of adopting annotations in JSF definitely makes a lot of sense. First of all, annotations and wide addoption of IoC/dependency injection came about at approximately the same time. JSF has always supported the idea of IoC and dependency injection to some extent, and Shale takes it even further by adding support for Spring. It seems only logical that it would only be a matter of time until the JSF community would turn their eye towards the other software trend that crossed the chasm. Apart from that, almost all of the latest JEE specs are considering annotations, so why would JSF be any different?

An application of annotations in JSF that hasn't been mentioned yet is using annotations to configure validators and converters for backing bean attributes. I would love to have that, and it probably wouldn't be hard to do at all. Simply define a couple of annotations that map to the standard validators and converters, add them to your backing bean and rely on JSF to tie all of the relevant objects together at runtime. It would certainly ease development of the JSP pages. Apart from that, it seems like better object oriented design to keep the knowledge about the meaning of attributes with the object, instead of embedding it in the presentation components layered on top of that.

( Sep 17 2005, 04:12:45 PM CEST ) Permalink Comments [1]
Trackback URL: http://blogs.sun.com/wilfred/entry/more_annotations_in_jsf
Comments:

You are totally correct. But now, much of what's done in the JSF-API becomes less relavant and creates wasteful overhead. AJAX itself, has been another way to handle components, but keep your eyes peeled for an announcement this week :-)

Posted by Jacob Hookom on September 18, 2005 at 04:19 PM CEST #

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed