> -----Original Message----- > If an application has 3 tiers: presentation, business, > backend - in which of > those would you put the JSF Model (the Backing Beans?)
Usual answer: depends... ;-) > > When I read through the www, I have to assume that it belongs in the > business tier while the "rest" of the "JSF stuff" belongs into the > presentation tier, right? I often subdivide the managed beans in two groups: - the usecase beans and - the model beans I allow the usecase beans to depend on javax.faces.**.* classes but the model beans must be kept clean. The usecase beans are used to control the flow within the usecase. The model beans are pure data-keeper. It has worked in a medium-complex application, but I consider it as "just ONE working" model... > > But if you want a "good" architecture - shouldn't there be > some sort of > interface or facade centralizing the business tier access? (Like: all > requests go through one gate?) For this we request that all usecase-beans make requests from the backend (persistency,...) through facades. Those facades are not allowed to have framework-dependencies. They use services, which depend on the backend-frameworks to get at the actual data. Usually they return the model-beans from above... > Does anyone have a good JSF based architecture in UML (easier > to talk about > a diagram instead of trying to describe it with words) Not yet ;-) hth (at least (new?) ideas...) Alexander