Posts tagged with 'aop'
I really enjoyed Cammy's brief talk on AOP in Ruby, and I think she successfully shows that even software written in a dynamically-typed language like Ruby can still benefit from AOP. There is some sort of technical issue early in the video that caused the sound not to be recorded, but it is fixed about 20 seconds in.
Hello, again! "Weekly Concerns" is a post-a-week series of interesting links, relevant to programming and programmers. You can check out previous Weekly Concerns posts in the archive.
- Pete Shearer from the Pete on Software podcast kindly invited me to be on his show so I could shamelessly plug AOP in .NET:
- Episode 5 of the Pete on Software podcast
- AOP with Matthew Groves blog post, from Pete's blog.
- Pete also did an Intro to AOP with PostSharp blog post.
- "Pete, Pete, Pete, enough about Pete already!" Okay, okay.
- I was reminded again recently how bad I am with regular expressions and how much I don't like them. Well, I came across a "fluent" interface for regular expressions called VerbalExpressions. I haven't used it yet, but it's something to keep an eye on.
- These sorts of questions aren't common on Stack Overflow anymore, but check out the answers for Strangest Language Feature. There are some answers that I found very cool and some that were real head-scratchers. Not a lot of C# answers in there; I guess C# isn't a very strange language :)
- Another tool to help remote pair programming: go-pty-screen
In a previous post, I showed off prototype's 'wrap' function, which gives JavaScript some AOP capabilities.
jQuery, a tool that I'm more familiar with, doesn't have an equivalent function that I know of. But there is a jQuery AOP plugin that provides a great AOP framework to your JavaScript.
While 'wrap' is akin to 'interception' style AOP, jQuery-aop includes some 'boundary' style aspects (as well as replacement/interception), including:
- before a method
- after a method
- when a method throws an exception
- when a method completes (exception or not)
- "around" a method
- replace a method (i.e. an "introduction")
There is some good API documentation available. Here's a little 101 example using "before" and "after":
Just paste that into an HTML file and run it in your browser, and you should get two alert messages. Since it's JavaScript, you can apply AOP to built-in functions like String.replace, or jQuery functions, just as easily as you can functions that you've written.
Week #2 is coming to an end here at CrossCuttingConcerns, which means it's time for another link dump post.
- LIDNUG (Linked-in .NET user group) recently posted video of Gael Fraiteur at their user group meeting. This was recorded in November 2010, so it's a bit behind the times as far as PostSharp goes, but it's still an informative video.
- Here's a white paper comparing AOP to composition filters (CF). I've not heard of CF before this paper, but it seems that like AOP, CF aims to address the same limitations with cross-cutting concerns that AOP does. (PDF link)
- Taking the Single Responsibility Principle (SRP) seriously. A deep dive into SRP, and just what is a "responsibility" anyway?
- Another white paper, but this one is about an interesting use case of AOP. It's based on a project to "trace" an application: not in the traditional developer sense of tracing through the code, but rather tracing a user's actions as she uses the interface to a system. And then using that information for later analysis (perhaps a usability study?).
- A blog post from Kristijan Rebernišak about using AOP to check user permissions: he uses Google Guice with AOPAlliance.
- Chad England has started a blog post series on AOP with PostSharp.
Thanks for reading, and please leave a comment or use the contact link above if there's something you'd like to see covered here on CrossCuttingConcerns.com (or if you have something to say and want it published here).