2
In JSF where would be the best place to define business rules? In the model, in the Managed-bean or in a layer of business rules( I am very reluctant to adopt this last approach), or even to implement such rules as being custom JSF validators? I have doubts about implementing a business rule in the model since I don’t know when this method would be called, since the bean will directly access the model sets.
We also use it like this. And a package with all objects. A difficulty is always using BC to perform the validations, but always ends up getting something in Bean... I don’t know if I’m the only one who ends up in this situation.
– Rodrigo
Of course, some things will always land on Bean. In my case, for example, I have separate projects (libraries I would say), that is, one project is the vision layer and the other is the business rule. Some dependencies that I have in the vision layer I don’t have in the business, and I wouldn’t have to have just to make validations... then I make the validations in the same bean. The validations considered standards I do in BC.
– Gilvan André