Typical mistake I have made so many times. You confuse MVC and layers while they are different things. Layer is an architectural pattern. It divides the whole application. The typical approach is a 3 layers architecture : presentation, business logic and integration (back end). The MVC is layers agnostic, ie you could have a totally different architecture and still use it. I like to think of it as a mini architectural pattern but it is quite debatable. MVC cares only about the UI. In jsf, the view is made of the renderers, the controller is the facesservlet and the lifecycle implementation (by the way is has nothing to do with the application controller pattern, Martin Fowler usually call it input controller to differenciate it). The model can be split into two parts like in the Swing world : the ui model and the data model. The ui model is composed of the different UI components of your page, its purpose is to hold the value used just to change the display. Finally, the data model is made of your backing beans and by extension every business or data objects exposed there (hence the confusion between the layer and the MVC pattern). It is a view helper and its main responsability is to allow the view to work with the application datas and services.
Well I hope it's help and anyone feel free to correct me if I am wrong. On 2/8/06, Julián García <[EMAIL PROTECTED]> wrote: > You shouln't put view dependencies on your model beans. JSF is pure view > technology, and your backing beans will probably include logic strictly > related to presentation (events, actions, etc). Thus, put the model on > other layer, and treat your beans as a bridge between view and the real > model. > > Through (facade-like) services you could still be able to access your > model logic with no dependencies on presentation technology (for > instance, through web services). > > That's my view. but as mentioned before...it always depends. > > Julian > Matthias Klein wrote: > > Thanks for your super quick response. > > Well, that document says that the BackingBeans belong into the presentation > > tier. > > But as far as I understand Backing Beans, they are the Model of the JSF MVC. > > Am I wrong? > > If I am not too far off - what would be the responsibility of the Business > > Objects? > > In many cases applications just take data from a user or present data to a > > user. In that case, the business tier would be pretty empty as it just > > passes data from the frontend to the backend - and vice versa. > > Sorry. I am quite confused right now. > > Matt > > > > > > -----Original Message----- > > From: Julián García [mailto:[EMAIL PROTECTED] > > Sent: Mittwoch, 8. Februar 2006 23:03 > > To: MyFaces Discussion > > Subject: Re: Architecture question > > > > Maybe you could find this useful: > > http://www.javaworld.com/javaworld/jw-07-2004/jw-0719-jsf.html > > > > Julian > > > > Matthias Klein wrote: > > > >>If an application has 3 tiers: presentation, business, backend - in > >>which of those would you put the JSF Model (the Backing Beans?) > >> > >>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? > >> > >>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?) Does anyone have a good JSF based > >>architecture in UML (easier to talk about a diagram instead of trying > >>to describe it with words) > >> > >>Thanks > >> > >>matt > >> > > > > > > > > -- Alexandre Poitras Québec, Canada

