1

I'm a little confused about the usage of Backing and Management Beans. Based off my understand a Backing Bean is associated with a view and contains UI logic, while a Managed Bean is basically just a standard bean.

I almost want to compare them to a form and bean like I would use in a struts application, though the form wouldn't contain any UI logic.

So lets say I have a page in a JSF application from which a user can enter information on a Car. The Car has a backing bean with all the information contained in the form and the UI logic.

Now every [n] hours I send this information to an external service that does various different things with it. Should I have a separate Car managed bean for utilized by background process, or should I reuse the Car backing bean?

Is the backing bean in this example part of the view and the managed bean a model?

I plan on delegating business logic to a helper class, would I create a managed bean using the information in the backing bean and then send the managed bean to the helper class? Or should I send individual field values?

I guess that's three questions not one. Sorry for the complexity of the question, I'm really not sure how to simplify it.

John87
  • 603
  • 1
  • 5
  • 9
  • Ha! Yes, this same article is responsible for my current headache. I could still use some assistance to figure this out. I may go a little off topic and introduce some new questions, please bare with me. I would only have a Car Backing Bean and not a manged bean? So in the backend when I retrieve the objects information i'll need a DAO object correct? Even if I am manually writing queries instead of using an ORM tool like hibernate? – John87 Jun 02 '15 at 17:14
  • Check the links to examples at bottom of the answer on that duplicate. As to "backing bean" versus "managed bean"; the "backing bean" is the class itself and the "managed bean" is an instance of that class auto-created and managed in a certain scope by the framework (JSF, CDI or Spring). But, that's also answered in that "Communication in JSF 2.0" link over there. – BalusC Jun 02 '15 at 17:20
  • This was incredibly helpful thanks! Sorry for the late response. I guess I'll just up-vote the other question. – John87 Jun 09 '15 at 15:41

0 Answers0