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
AOP,
Design
Tags
Spring,
AspectJ,
Refactoring,
Design Patterns
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

3 comments

Reply

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.

Exclusive Content

Rob Windsor on WCF with REST, JSON and RSS

WCF is not just for SOAP based services and can be used with popular protocols like RSS, REST and JSON. Join Rob Windsor as he introduces WCF 3.5 and its new native support for non-SOAP services.

Christophe Coenraets Discusses Flex 3, AIR, and BlazeDS

Christophe Coenraets discusses Flex 3, Flex Builder, AIR, BlazeDS, Adobe and open source, integrating Flex with existing applications, and integrating RIAs with search engines and browsers.

Debunking Common Refactoring Misconceptions

Danijel Arsenovski attempts to dispel some of the myths around refactoring and how it applies to .NET developers.

REST Eye for the SOA Guy

In this presentation, recorded at QCon San Francisco, CORBA guru Steve Vinoski explains REST from the view of someone who comes to SOA from a traditional, RPC-oriented background.

Choose Feature Teams over Component Teams for Agility

Feature teams are key to scaling agility for large teams. In an excerpt from "Scaling Lean and Agile Development," Larman & Vodde show how feature teams resolve traditional problems & raise new issues

Billy Newport explains Virtualization

Billy Newport talks about virtualization, eXtreme Transaction Processing (XTP) and WebSphere Virtual Enterprise. He discusses hardware, hypervisor, JVM, application and data virtualization.

Virtualization and Security

While virtualization provides many benefits, security can not be a forgotten concept in its application.

Introduction to Agile for Traditional Project Managers

This session is specifically aimed at traditionally trained project managers who are new to Agile, and who would like to be able to relate the PMI's best practices to their Agile equivalents.