Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Re: aspectj-users digest, Vol 1 #22 - 4 msgs

Excellent example. In fact, applying a "loyatly discount" was a busniess requirement I implemented for a client recently and I can see how this would have helped. Unfortunately the application was written in such a way that it would require a big overhaul of code to apply this type of aspect (promotions were handled my adding expiration dates to offers). In any case, it should make a good starting point for a discussion with my colleagues.


One possible business "aspect".

I have a Point Of Sale software which allows for many ways of making sales. If I wish to introduce a discount or a discount scheme, I could define an aspect which captures all sales-making calls and applies this discount scheme. I could vary the discount, or the discount scheme itself, based on the customer (loyalty programs), total sales, marked items in the sale etc.

Modeling discount schemes as an aspect allows me to vary the scheme at runtime, transparently and uniformly apply it across all sales, and make it effective even on yet-to-be-defined sales.


MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*

Back to the top