Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8450567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:00:12+00:00 2026-06-10T11:00:12+00:00

Is it correct/ a best practice to have a commonBean for operations that are

  • 0

Is it correct/ a best practice to have a commonBean for operations that are common to the application? In my case this would be a logout function that clears the logged value of a session bean.

One of my coworkers told me that only one controller bean should be used per view, however it seems like a waste to have the same method replicated in multiple beans.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:00:15+00:00Added an answer on June 10, 2026 at 11:00 am

    Your colleague is referring to the seperation of View and Controller as a loosely defined principle in a pure MVC pattern. The Managed Bean in a JSF application lends itself well to the role of a Controller, however this should not be considered a hard and fast rule for the very reasons that you have stated.

    I quote Martin Fowler from Patterns of Enterprise Application Architecture:

    As I said, the value of MVC lies in its two separations. Of these are
    the separation of presentation and model is one of the most important
    design principles in software, and the only time you shouldn’t follow
    it is in very simple systems where the model has no real behavior in
    it anyway. As soon as you get some nonvisual logic you should apply
    the separation. Unfortunately, a lot of UI frameworks make it
    difficult, and those that don’t are often taught without a separation.

    The separation of view and controller is less important, so I’d only
    recommend doing it when it is really helpful. For rich-client
    systems, that ends up being hardly ever, although it is common in Web
    front ends where the controller is separated out. Most of the
    patterns on Web design here are based on that principle.

    Essentially Fowler states that binding view to controller is not as important as binding model to view, so utilizing controllers across views or multiple controllers per view is certainly acceptable if it is helpful to do so.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have a function that looks like this: @SuppressWarnings(unchecked) public static <E> Set<E>
What is the best/correct practice to specify version within your source code tree? What
Is this the correct/best SPARQL query to get the count of items in rdf:list:
When defining a new class within a project what is the correct/best practice for
I need your help to understand this better. This is my case. I have
I just have a quick best practice question regarding custom cells in a UITableView.
Not sure if this is considered best practice or if you should even do
Although this probably isn't best practice, I am trying to clear a series of
I have decided to follow best practice and only build my artifacts once and
From what I have read best practice is to have classes based on an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.