Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Uses of AOP in running web application

 
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Currently i am working on banking application to be used by the bank stuff now my PM asked me to looked in to the AOP (also Spring, hibrenate, but i have started with AOP)... and tell us where it can add value to our project.

We are using struts at the front-end and oracle at the back we are following the fundamentals of O/R and IoC but not using any framework for the same as leaning curve we take it's time.

Coming back to AOP i know we can use it in logging, connection pool(i dont thik here is the scope as connection has been implemented and quite stable), Exception handling but dont think these are good enough points to approach him i have left pre-checks for setter-getter (which is also not a possibility).

Can you please guide me to some uses which i have missed.
[ March 17, 2008: Message edited by: subodh gupta ]
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

my PM asked me to looked in to the AOP


Wow, it's raining frogs. And did you dare ask him why ?

Can you please something else which i have missed.


Please Use a meaningful subject line
 
subodh gupta
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no i can't ask my manager!!! why? because that was his question and i am supposed to answer this.

Thanks for you kind attention to the post.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've used AOP in Spring (or I should say Spring used AOP for me) for managing transactions. For example, all service classes' methods name starting with "update", "insert", "delete" would run in a transactional context automatically. Everything would rollback automatically if an exception occured. Thanks to AOP, this is not visible in the service class. If you want to read on how it is managed in Spring, check the Reference Documentation.

But I think that your manager's approach is not cool It looks like he wants to put some AOP just for "prestige". Anyway, good luck.
 
subodh gupta
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
actually we might migrate our apllication to spring eventually but first i think we are following approach that would take every body close to understanding the Spring's underlying concepts or may be we never do anything with this application. And me end up doing R&d in Spring technology's .
 
Ranch Hand
Posts: 2107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some of the things AOP can help on Spring, are transaction and logging.

How do you currently implement these on your system?
 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Some of the things AOP can help on Spring, are transaction and logging.


I'd add auditing. You mentioned that it's for a banking application.
Assuming you wanted to track all the user actions, you could do this
by exploiting AOP.
Mo
 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had an odd case where I use the OpenSessionInView pattern to keep the database session open until the view (the JSP) had completely rendered.

I had an entire ViewHelper layer which would handle mundane tasks such as populating DisplayTag tables and Struts HTML tag library <html ptionsCollection> tags.

One day, one of my JSPs would not render, claiming an issue with an expression language (EL) definition. I knew something was up, but did not have a full stacktrace to solve the problem. I spent an entire afternoon trying to figure it out.

The next morning I created an Advice class that implemented ThrowsAdvice on the ViewHelper class. All that was in the method was a simple e.printStackTrace().

Within 5 minutes, I found the problem was a ClassCastException, and within 10 the problem was solved.

There are definitely arguments against using Open Session In View (and this was probably one of them). However, rewriting the entire user interface was not an option.

Jason
 
    Bookmark Topic Watch Topic
  • New Topic