But, I don't agree that navigation rules should be implemented with annotations.
I agree with Gary on this.
My general philosophy is that annotations make sense when they represent configuration information that affects how you actually code something. In JSF, the classic example is managed beans. What scope you put them in has an impact on the code you write (request scope beans do not have to care about thread safety, but session/application scope beans do, and you will likely want to ensure that session scope beans are Serializable). Having the scope setting separated from the source code risks accidental or innocent mismatches if someone changes the scope setting without thinking through the implications on the code.
In EJB, you see similar sorts of issues around the transaction model that is used.
Regarding navigation rules, I personally believe that action methods should report "what happened" (i.e. logical outcomes), not "go here next". Given that philosophy, you should be able to change the navigation rules without modifying the code. Ergo, navigation rules should not be implemented in annotations (and they are not in Shale :-).
Gary
Craig
