Separate controller+state from page bean?
Hi. I'm new to jsf web applications and look for a good practice on how to compose a tiny application.
What I have:
1) business logic class:
- holds application scope state
- public Result doSomething(with something)
(This would be a managed bean with application scope?)
2) page bean w/ gui set up by the IDE
My experience is that the latter page bean code gets cluttered quite easily. My intention is to write a controller/adapter class (session scope) which:
- handles gui actions (1:1) and do needed calls to model + evaluation
- holds session state
- provides "ready to use" output properties for use with jsf value binding
In my page bean generated by Studio Creator, I would basically only forward actions to the controller class and bind gui components to properties of the same class.
Would that be a usual way to write web apps?
Should the controller class be instantiated as managed session bean and get access to the model using the getBean(String) mechanism? (How does it get access to that mechanism - implement some provided bean class?)
Is it appropriate to call the above class a "controller"?
Thanks.

