Moreover, as your projects grow, maintaining a strict discipline about
dependencies is the only reliable way to prevent loops.
I *think* this is actually published somewhere in official Oracle material
as a best practice. But in any case, I agree with you: Your Model project
should never refer directly to anything in your ViewController project,
and should never use any APIs intended for UI development (e.g., Faces
APIs).
I'll go a step farther--while your ViewController project certainly can
(indeed, must) depend on your Model project, you should keep these
couplings as loose as possible. With only a *very* small number of
exceptions, code references to anything in any jbo.* package except
domains and Exceptions don't belong in your ViewController project outside
of your bindings files; all business access should go through those
bindings.
Best,
Avrom
--
Avrom’s Java EE and Oracle ADF Blog
http://www.avromroyfaderman.com