My questions concern consistency of the JSF application and how to manage it. Many references in JSF are only made using strings.
Most (if not all) of these strings are evaluated during runtime, and can cause problems there. Of course extensive testing can detect some of these problems, but it occurs to me that many of these references can be checked even before the first testing starts. Indeed i already wrote some scripts implementing such checks. But i get the feeling that the problems i see must have been seen by many programmers before me, and by writing these scripts i am just re-inventing the wheel.
The checks i am referring to are:
1. html files can contain entries like <h:comandButton action="result" ... > such an action must exist as a <from-outcome> in a <navigation-case>
2. html files can contain entries like <h:comandButton action="#{Bean.method}" ... > This Bean and its method must exist, and the value it returns must exist as a <from-outcome> in a <navigation-case>
3. the <to-view-id> in a <navigation-case> refers to a page to which the user will be navigated. This page must exist in the application
4. <from-outcome> values in a <navigation-case> that never occur as either an action value or as a return value from a bean indicate a 'loose end'. This can never cause a runtime error, but indicates sloppiness on the part of the programmer: either it is part of an execution path he intended to build, and never finished, or it is part of a deprecated excution path which should be removed as undesirable.
5. pages in the application that never occur as a <to-view-id> in a <navigation-case> also indicate a loose end, see the reasoning on 4.
Doubtless there are many more of these checks that could be done, and i would expect that there are already several tools on the market that cover them. Only i have been unable to find them. If you know of any you can recommend i would love to hear about them.
Well, I would think they would be plugins for the major IDES like Eclipse and IntelliJ. I know in IntelliJ I have struts and tiles interactivity, where it checks, and I can Hit the CTRL button and click on a tile insert in a jsp page and it take me to the tile definition for it, and from a tile definition that points to a jsp page, I can hit the CTRL button and click on it to get to the jsp page.
For JSF, I think Netbeans, Excadel (Eclipse), and IntelliJ also have built in support for JSF.
I am using a plugin for eclipse, but that only offers runtime support. There are no checking functions that I am aware of. Can anybody advise a plugin that does offer the kind of checking that I am looking for?