I'm a little bit confused about an example found on the web - spring & hibernate (point 4. Model & BO & DAO
). There are Model, DAO and BO classes (+ DAO and BO interfaces). What I do not clearly understand is why DAO and BO are separated into different classes if they share exactly the same functionalities (only difference is that BO has a DAO setter).
The author explains only, that the pattern:
is useful to identify the layer clearly to avoid mess up the project structure
but it seems over-engineered to me (at least in this case). I know this example is very simple, but what this class separation could be useful for? Could someone provide an example?