Do AOP violate layered architecture for enterprise apps?

Posted by redzedi on Stack Overflow See other posts from Stack Overflow or by redzedi
Published on 2012-06-07T08:11:02Z Indexed on 2012/06/07 10:40 UTC
Read the original article Hit count: 167

The question(as stated in the title) comes to me as recently i was looking at Spring MVC 3.1 with annotation support and also considering DDD for an upcoming project. In the new Spring any POJO with its business methods can be annotated to act as controller, all the concerns that i would have addressed within a Controller class can be expressed exclusively through the annotations.

So, technically i can take any class and wire it to act as controller , the java code is free from any controller specific code, hence the java code could deal with things like checking security , starting txn etc. So will such a class belong to Presentation or Application layer ??

Taking that argument even further , we can pull out things like security, txn mgmt and express them through annotations , thus the java code is now that of the domain object. Will that mean we have fused together the 2 layers? Please clarify

© Stack Overflow or respective owner

Related posts about spring-mvc

Related posts about aop