ANN: Aquarium v0.1.5 released

September 17th, 2007

This is primarily a bug-fix release. I labeled it "v0.1.5" instead of "v0.1.1", because a non-trivial API change was required; Aquarium no longer automatically adds methods to Object, due to collisions with Rails. This means that users of the "DSL methods" will need to require a new file or include a new module. See the "CHANGES" file in the distribution of "here":http://aquarium.rubyforge.org/changes.html for more information.

4 Responses to “ANN: Aquarium v0.1.5 released”

  1. deanwampler Says:
    Hey Dean, Aquarium is just what I was looking for! Im going to do a mini talk on AOP and was just about to do cook up an example using Aspectj but as we program in Ruby, i'll use this instead. Was thinking about making a small demo app in Rails and was wondering if you knew of good examples of crosscutting concerns that I could use? With Rails before_filters the common examples of authentication etc don't seem as impressive.
  2. deanwampler Says:
    Matthew, Off the top of my head, here are a few suggestions. 1) try a mini "acts_as_*" plug in. Authentication, field validation, etc. might work as examples. Of course, these are already covered by Rails or 3rd-party plug-ins, but you could demonstrate how AOP makes them easy to write, cleaner, closer to God... 2) I've been thinking about ways to refactor ActiveRecord code with aspects. There are ~175 uses of method_alias in Rails, some of which would be cleaner and more modular with aspects. 3) Do the classic example; add an aspect that logs all method calls! ;) HTH.
  3. deanwampler Says:
    Thanks for the advise (pun not intended)! Yeah I was thinking about a mini acts_as plugin. I have a question though, what _is_ the difference between rails filters and Aquariums advice?
  4. deanwampler Says:
    Conceptually, they are similar and the implementations are similar, too. I believe that rails filters use method aliasing: (1) Give the method to be filtered a new name with alias_method, (2) define a new method with the original name, (3) have the new method invoke the filter first, then call the original method. Aquarium does basically the same thing, with a little more sophistication to make it more reliable to add multiple "filters", to remove any one of them dynamically, etc.

Sorry, comments are closed for this article.