<meta name='google-adsense-platform-account' content='ca-host-pub-1556223355139109'/> <meta name='google-adsense-platform-domain' content='blogspot.com'/> <!-- data-ad-client=ca-pub-4320963827702032 --> <!-- --><style type="text/css">@import url(https://www.blogger.com/static/v1/v-css/navbar/3334278262-classic.css); div.b-mobile {display:none;} </style> </head><body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d7256432\x26blogName\x3dThe+Frustrated+Programmer\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLACK\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttps://frustratedprogrammer.blogspot.com/search\x26blogLocale\x3den_US\x26v\x3d2\x26homepageUrl\x3dhttp://frustratedprogrammer.blogspot.com/\x26vt\x3d4213664491834773269', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>
| Tuesday, July 13, 2004

-Untyped - In all the Aspect languages I've seen, when you ccode and compile your aspect, there is no type checking to ensure the generated code will run. Strong type checking is one of my favorite pieces of Java, I don't like the idea of loosing this.
-Hard to test - How can you unit test an aspect in isolation? If I can't test it in isolation, I have to system test it. This opens it up for more regressions.
-"Complicated" - The average developer just doesn't get it. Most teams have average and below team members on them. This will be code they will not be able to touch. Every project has these portions, but obviously keeping them to a minimum is going to make less work for you in the long run.
-AOP is also an acronym for Attribute Oriented Programming -- Ala XDoclet, JSR 175 - Annotations

Well, I do think they still have a place on a project, but should be used sparingly. Not just because it makes things easier. Good reasons for using AOP that I've seen:
-Declarative transactions in Spring
-I heard of an aspect that could exceptions at the Facade level of a J2EE application. After it caught the exception it generated a new JUnit test case that could reproduce the exception by storing the arguments passed to the Facade.

What's your favorite aspect?