Restrict violation of architecture - asp.net MVP -
if had defined hierarchy in application. ex 3 - tier architecture, how restrict subsequent developers violating norms?
for ex, in case of mvp (not asp.net mvc) architecture, presenter should bind model , view. helps in writing proper unit test programs. however, had instances people directly imported model in view , called functions violating norms , hence test cases couldn't written properly.
is there way can restrict classes allowed inherit set of classes? looking @ various possibilities, including adopting different design pattern, new approach should worth code change involved.
i'm afraid not possible. tried achieve of attributes , didn't succeed. may want refer past post on so.
the best can keep checking assemblies ndepend. ndepend shows dependancy diagram of assemblies in project , can track violations , take actions reactively.
Comments
Post a Comment