This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
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 ]
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.
Joined: Jul 23, 2007
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 .
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.