Saturday, October 18, 2014

Spring AOP Concept & Implementation in real time project


Followed the blog http://briansjavablog.blogspot.in/2013/04/spring-aop-tutorial.html

Really amazing to learn this concept very clearly.

Spring AOP Tutorial
Introduction
Application logic can be broken into 2 distinct areas, core business logic and cross cutting concerns. Business logic is code written to satisfy a functional requirement, while a cross cutting concern is 'utility' logic that is agnostic to any specific business process and required by many parts of the application. Examples include logging, transaction management, performance monitoring and security. While none of these address a functional requirement, they remain fundamental parts of the application runtime.

Cross cutting concerns present 2 main challenges.
  1. They tend to be 'scattered' across the application which can lead to considerable duplicate code. Logging or performance monitoring is a good example. 
  2. They become tangled with application business logic and result in code that is difficult to maintain because there is no clear Separation of Concerns.  
Aspect Oriented Programming (AOP) aims to address these challenges by providing a means of modularising application logic, so that each module addresses a distinct concern. Take performance monitoring as an example - rather than have performance monitoring logic littered across the application, AOP provides a means of modularising this logic, and applying it to various parts of the application at runtime. This provides a clear Separation of Concerns as performance monitoring logic is no longer tangled with business logic throughout the application.

Key Terms
The detailed inner workings of AOP is well beyond the scope of this post. However, I've provided a brief definition of key terms that are referred to throughout this tutorial.

Aspect - A self contained module that attempts to address a specific cross cutting concern. In this tutorial  the Aspect will contain performance monitoring functionality.
Advice - Logic that is invoked at a specific point in a programs execution.
Join Point - A specific point in a programs execution where advice is applied. Note that advice can be applied before and after a Join Point.
Pointcut - An expression that identifies Join Points matching certain criteria. For example we can define a Pointcut that identifies all public methods in a package. These specific points in program execution (JoinPoints) have advice applied to them at runtime.    

Implementation will discuss in next blog...



Important things to know how to survive IT industry

1. Should be smart
2. Good communication skills
3. Must have quality "How  to dominate others"
4. Also always open to talk about different related issues with your reporting manager
5. Need to ask for promotion & hike every time
6. Finally but not at least "Technical skills"