문제

In a web application that respects a 3-tier architecture, who is responsible for the implementation of a user logging module: the presentation tier or the application one?

I'm asking that question because a user logging module isn't really part of the logic tier of an application, but neither of the presentation one.

도움이 되었습니까?

해결책

Logging is cross-cutting concern, so doesn't belong in any one tier. I advise you to avoid creating a logging module if at all possible. It is unlikely to add any value and will just duplicate existing logging frameworks. Just use something like SLF4J consistently.

다른 팁

Logging exceptions help identify and eliminate flaws in programming logic. The best judge of what is an application flaw should be the actual method itself. The view tier should just display information; it shouldn't be charged with figuring out what is and what isn't a programming logic flaw. Thus, would be the logic tier (model/controller, in mvc parlance).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top