开发者

Facade goes inside in each package or must have a package only for facades?

Where the Facade classes must go? Supposing I have three packages, Facade A goes inside Package A, Facade B goes inside Package B and Facade C goes inside Package C or I need a separate package only for Facades?

What is more recommended?

I'm using the first solution, but I think is not right. Some classes are using a facade that allocates some objects tha开发者_C百科t the class not uses.


It really depends on how your packages are organized.

Suppose you have payment, hr and contacts packages, then it would make sense to have a façade for each of them.

If you split your package in a less domain driven way, like for example services, dao and web then making a facade only for the service layer would make sense.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜