Intercepting Scala trait constructors

Michael Kober

Today I was writing an AspectJ aspect for a Scala trait and was wondering why my constructor pointcut definition didn’t work. Having a closer look at the Scala byte code together with my colleague Johan solved the puzzle. Here is what I did (using AspectJ 1.6.8 and Scala 2.8.Beta1): To start with here’s a simplified [...]

Tags: ,

Architectural Enforcement with Aid of AspectJ

Mattias Severson

After working some time within the software industry, you get a feeling for good software architecture. Or, to be more honest, you get a creeping feeling when the architecture is really bad. That is when the code is tangled like a Gordian knot. After some futile refactoring attempts, you consult the software architect at your [...]

Tags: ,

Spring and load-time weaving of Neo4j-based domain objects

Mattias Ask

What do you do when your Spring configuration isn’t in charge of creating your objects that needs to be injected with stuff? This became a real problem for me when I tried doing some non-anemic domain object implementations persisted as Neo4j Nodes. I was playing around with creating a Twitter clone, in my opinion the [...]

Tags: , , , , ,

Transparent bind of JavaFX and POJOs

Magnus Robertsson

When I started coding JavaFX I quickly found that the great bind mechanism doesn’t work together very well with my legacy Java code. In fact, it doesn’t work at all. In my case I wanted to reuse my domain objects and just add a fancy user interface on top of it. This happen to be [...]

Tags: , , , ,

Proxy Based AOP for Cocoa Touch

Fredrik Olsson

UITabBarController is generally used as is, no subclassing required. It creates a UITabBar and manages a list of UIViewControllers, keeping track of the tab in focus, UI creation and everything nice. UITabBarController has a delegate, the UITabBarControllerDelegate protocol. Unfortunately this is not a superset of the UITabBarDelegate protocol, and UITabBarController already implements the UITabBarDelegate protocol [...]

Tags: , , , , , ,

Aspect Oriented Programming In Java ME

Magnus Robertsson

Do you want to structure your Java ME applications better? Aspect Oriented Programming is a cool technology that can modularize your applications and separate the verbose infrastructure code from the application logic. The only catch is that it doesn’t exist for Java ME. Or does it? Introduction Aspect Oriented Programming (AOP) is gaining popularity within [...]

Tags: , , , , ,

Static Mock using AspectJ

Jan Kronquist

After seeing MockME developed by some of my colleagues I started thinking about how this could be made in a generic way.

Tags: , , ,

Indented Tracing Using AspectJ

Ulrik Sandberg

Given inspiration from the book “AspectJ In Action”, I wrote a little aspect that provides indented tracing of method executions. This means that the aspect keeps track of the current indentation level in a call flow

Tags: , , ,

Ytterligare en Aspekt på din kod

Björn Granvik

Har du någonsin kopierat vissa snuttar kod – om, om och om igen? Trots att du redan har en snygg objektorienterad arkitektur? Trots att den är full med de bästa design-mönster som går att uppbringa? Trots att du valt de bästa verktygen och ramverken? Lika förbaskat så sitter vissa rader, som loggning, både i ryggraden [...]

Tags: , , ,