views:

192

answers:

1

I have been asked to formalize the architecture of our front-end JSF code and beans.

My first thoughts were that this would be just like any other class architecture. Fire up visio, make my UML diagrams, and that's that.

However, there is no way that I can think of to express things such as bean scope, page navigation, the way different beans are tied to different portions of pages, the way bean properties can effect navigation and AJAX rendering, etc.

Has anyone else here run into a similar problem? What tools have you used to remedy it?

Thanks in advance, ~Zack

+2  A: 

I can't answer for bean scopes, but you should be able to produce a state diagram illustrating your page flow based on your page navigation in faces-config.xml.

Since JSF has page-centric navigation, your states will likely just be JSF pages, connected by transitions labeled with the event which caused the transition, or with the EL of the action invoked.

You may need to create your own artificial action states. For example, an action might be invoked from a page, but which page you hit next depends on the outcome of the action. An action state might be useful to express an action that's occuring, and you can have transitions from that state based on the outcome.

As a side note, this is much easier to do with a framework like Spring Web Flow (which works with JSF, by the way), but you should still be able to generate state diagrams with just JSF.

InverseFalcon