InfoQ

Interview

Ramnivas Laddad on AOP Design, Modelling, and Policy Enforcement

Interview with Ramnivas Laddad on Apr 17, 2007 11:24 AM

Community
Java
Topics
Design ,
AOP
Tags
AspectJ ,
Spring ,
Design Patterns ,
Refactoring
Summary
Ramnivas Laddad talks about domain aspects, how aspects fit in the design phase, how to model aspects in UML, how to enforce policies with Aspects, how he used Aspects to diagnose production problems including touch threading problems, and using aspects to simplify design pattern implementation.

Bio
Ramnivas Laddad is an author, speaker, consultant, and trainer specializing in aspect-oriented programming and J2EE. His most recent book, "AspectJ in Action: Practical aspect-oriented programming" (Manning, 2003), has been labeled as the most useful guide to AOP/AspectJ. Ramnivas works for Interface21, providers of Spring.
Can you tell us something about yourself?
What book are you writing?
How should architects think about Aspects when considering their business requirements?
Do Aspects have any place for encapsulating business logic?
Tell us about a project where you used domain specific Aspects.
But that sounds more like infrastructure, it's like checking if something is in the cache. Do you have shopping cart examples?
Should Aspects be considered during design or can they be refactored in later?
How do you integrate Aspects into the modeling process?
Do you have any advice for people trying to do Aspects modeling with UML?
Some people say Aspects are all about policy. What's your take on that?
Give us an example of a policy enforcement aspect that you've used.
How do you see people using introductions?
What impact is Aspects having on design patterns landscape?
What about observer pattern in other event notification patterns, can those be done in a transparent fashion using Aspects?
show all  show all
Concrete example of Business aspects by Karthik N Posted Apr 17, 2007 10:19 PM
Re: Concrete example of Business aspects by Rickard Öberg Posted Apr 18, 2007 8:33 AM
Re: Concrete example of Business aspects by Floyd Marinescu Posted Apr 19, 2007 9:06 AM
  1. Back to top

    Concrete example of Business aspects

    Apr 17, 2007 10:19 PM by Karthik N

    Anyone know of any more Elaborate examples of using AOP/Aspectj for business aspects? I know the interview can over only so much in-depth.

  2. Back to top

    Re: Concrete example of Business aspects

    Apr 18, 2007 8:33 AM by Rickard Öberg

    We use AOP for our entire domain model in our app. Currently we have 168 mixins that are used in various combinations in objects, and here are some examples: * ACL * Metadata * User info (matches user, group, container in LDAP) * Parent/child relationships (one for child, one for parent/container) * Icon and displayname (there are lots of different variants of this, for different objects) * File info * Site/Page/Layout/Portlet and other CMS-related mixins * Hit counter (also CMS related) and so on... That was mixins. Then we also have 130+ interceptor style aspects that maintain various domain rules. Many are related to lifecycle management of aggregated objects (e.g. remove aggregated objects when owning object is removed), and many are related to maintaining various rules (e.g. if an object is added to a container, then the child->parent relationship must be properly updated). These interceptors are all specific to some few number of methods in some specific mixin (i.e. they are not widely applicable to many different mixins and methods), but they ARE heavily reused anyway since the mixins are reused in many domain objects. We also sometimes use interceptor aspects to define method parameter validation rules, so that these are not hardcoded in the various methods and mixins.

  3. Back to top

    Re: Concrete example of Business aspects

    Apr 19, 2007 9:06 AM by Floyd Marinescu

    On InfoQ.com's code base Alexandru Popescu used AspectJ to add things like discussion threads and the topic/tag categorization to content items at runtime. It's a nice implementation - domain objects (articles, videos, books) don't need to know about the discussion threads associated with them or how they are categorized, those get added in as introductions afterwards. We can even do some cool things like havin articles and news posts announcing them share the same discussion threads.

Educational Content

Bindings, Platforms, and Innovation

This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.

Orchestrating Long Running Activities with JBoss / JBPM

This article explores the use of JBoss and jBPM to implement design solutions that effectively address the issue of orchestrating long running activities.

Neo4j - The Benefits of Graph Databases

This presentation covers the use of graph databases as an optimal solution for data that is difficult to fit in static tables, rapidly evolving data or data that has a lot of optional attributes.

Realistic about Risk: Software development with Real Options

This session introduces Real Options and shows how it can help in running your project. Real Options is a decision-making process that can be used to manage risk.

Communication Flexibility Using Bindings

This article discusses the use of bindings on services and references (including the instance of non-configured bindings) as the means to implement SCA communications in a Web and SOA environment.

Writing DSLs in Groovy

After a short introduction to DSLs, Scott Davis plays with the keyboard showing how to approach the creation of a DSL by typing working snippets of Groovy code that get executed.

Scaling Agile with C/ALM (Collaborative Application Lifecycle Management)

IBM Rational and InfoQ present, Scaling Agile with C/ALM, an eBook showing organizations how to become “finely tuned software delivery machines” by enabling team integration and scaling.

Concurrent Programming with Microsoft F#

Amanda Laucher presents a real life enterprise application written in F#. She shows actual code snippets, explaining design decisions and suggesting how to use some of the F# constructs.