• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 457
  • Last Modified:

jsf mvc implementation

I read as below regarding MVC implemention in JSF.

'one managed bean for all the data. This managed bean code handling user input and output data is view or presentation layer

Other managed bean all action event handlers.Other managed bean handling the action event , execution logic, control logic is controller.

Business logic and presentation logic, getters and setters,rest  other managed bean.'

I was not clear on this.

Please advise.

Any links resources ideas highly appreciated. Thanks in advance
2 Solutions
Sharon SethCommented:
Can you restate clearly what you read ?
Pramod KumarCommented:
JSF bean is at the Presentation Layer which actually doing below things
Get-Set JSP/UI data
Control the flow: request/response/redirect etc.

Normally we do not write business logic into bean but there is no restriction. As per multi-tier architecture, we should have a separate layer for business logic where we will be having Service classes which can be called from the JSF Bean. This way the service classes may be associated with Data access layer to communicate with the database.

For further readings you may hit below url:
Different beans have different roles in JSF, that's all. You have beans to manage the logic, beans that are just value holders etc.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now