Utility functions and Aspect Oriented
Andrew Hurst asked a question about Utility Functions last Friday. (http://discuss.fogcreek.com/joelonsoftware/default.asp?cmd=show&ixPost=31915&ixReplies=16)
From my reading of Aspect Oriented Programming, it seems more suited to the "insert debug statements" type programming. Thats the clearest example I've heard it used for. They don't affect the flow of the program since they don't change anything if removed. I wasn't too fond of the example where the routine that started writing out the page in his JSP's would have an aspect to check for the user being logged in. Didn't seem too intuitive to me.
In case Aspect Programming is not limited to Java, will you let us know what other language allows for aspect programming?
Li-fan, perhaps this would help you...
AOP has been researched in many different environments. In the .NET world there has been some buzz recently on Clemens Vasters' AOP ServicedComponents work.
Just me (Sir to you)
Check out this ( http://www.iunknown.com/Weblog/WhatsupwithCLAW.html ) response from John Lam on AOP. Personally I'm working on an AOP-like framework ( http://pinetree-tech.com/weblog/archives/2003/02/18.shtml#000215 ) that doesn't magically add in aspects. When debugging you would actually step threw the code. Also you might want to check out extensible C# ( http://www.resolvecorp.com/products.htm ). It uses attributes to inject code into your objects before a complete compile. XC# isn't complete AOP, but it gives quite a bit of the benefit without hiding anything.
Actually, the impact on control flow reminds me of INTERCAL's COME FROM construct.
The general goal of AOP is to isolate system concerns (security, persistence, threading and synchronization, transactions, resource pooling, logging) from the core "business" concerns (manipulating data, business rules) and doing it in a transparent way. This simplifies code maintainence and makes it easy to integrate new system services with existing business code at deployment time.
Beware of Aspect-Oriented programming. It is patented.
"It is patented"
Just me (Sir to you)
It's patented by Xerox. If ever a company was guaranteed to drop the ball on innovative technology, it's them.
Fog Creek Home