An often posed question is which parts represents model, view and controller in JSF. After reading some different opinions to this topic, i show here the division and naming convention used on this site:
The model contains POJO classes, which only store the data used in the view. I do not use any suffix for the model classes, so its better readable in the pages.
de.icoding.model.forumForum, ForumEntryFor management of master data i use normally two classes:
The view includes the JSF pages and the backing beans, which contain view depending code to control the components. I choose suffix View for this classes because its more readable than Backing inside the pages.
de.icoding.view.forumForumView, ForumListViewFor management of master data i use normally two classes:
The controller part is done by several classes like Filter, JSF Servlet, ViewHandler and also the Business Logic.
de.icoding.controllerServiceFilter, ViewHandlerThe business logic is separated but belong also to the controller, because the logic methods control the navigation with special IDs. For this classes i use the suffix Action.
de.icoding.action.forumForumActionAuthor: Johannes HammoudComments Date: 08.11.2008