|
Editor’s Choice -AOP and IoC |
|
AOP : New Programming Design
Paradigm
Aspect Oriented programming (AOP) decomposes a
system into concerns (i.e. term referring to the core
elements required to focus on), instead of objects. It
deals with “aspects” that cross-cuts across the code
which could be difficult or impossible to modularize with
OOP
Seperation of concerns (SoC)
AOP promotes separation of concerns within
the systems where separation of concerns
(SoC) is a process to break a computer program
into distinct features that were previously
overlapping in functionality, as little as possible.
A concern is any piece of interest needed to
focus on while developing a program. Typically,
concerns are synonymous with features or behaviors, lets talk of a credit card
processing system, the related core concern of the
system deals with processing the monetary transactions,
while its application-level concerns handles logging,
transaction integrity, authentication, security,
performance, and so on. Many such concerns are
known as crosscutting concerns. Lets talk of Logging, it
offers one example of a crosscutting concern.
A logging strategy necessarily affects every
single logged part of the system. Logging thereby crosscuts all the logged
classes and methods.
Such crosscutting concerns affect the multiple
implementation modules. With the current programming
methodologies, crosscutting concerns span over multiple
modules causing a system to be complex to design,
understand, implement, evolve and even maintain with
time.
Lets quickly give a glance to the OOPs concept.
OOPs programming model creates programs around the real
world entities. Here the programs are developed around
the objects and data rather than actions and logics. In
OOPs, every real life object has properties and
behavior. This feature is achievable with different
languages like C++, Java, C# etc. However in
the current scenario, object-oriented programming (OOP) seems to be no more
an extra-ordinary programming model where real
world problems are decomposed into objects
|
|
encapsulating behavior and data in a single unit.
Although the developers have met great success
in the past in modeling and implementing complex software
systems, However they faces crucial problems in
maintaining the code while working with large projects.
Most of the time, to make a minor change to a program
may require maintaining several updates to a large
number of unrelated modules. Now with the advent of
AOP, such problems are easily rectified, as it allows the
developers to solve the complex problems involved with
software development that couldn’t be resolved easily
with the object-oriented programming techniques.
However, AOP being a new programming
technique, allows programmers to modularize
crosscutting concerns. It allows the programmers to dynamically
modify the static OO model to create a system that cangrow to
meet new requirements. It allows separating
the crosscutting concerns into the single units
called aspects.
It is a modular unit of crosscutting implementation, which
encapsulates behaviors that affect multiple classes into
reusable modules. AOP is not bound to a specific
programming language. It is a concept that can
be implemented with different languages (for
example C++, Smalltalk, Java etc.).
Aspect-Oriented Software Development (AOSD)
Aspect-Oriented Software Development (AOSD)
attempts to aid programmers in the separation
of concerns, specifically cross-cutting concerns,
as an advance to the modularization. AOP does
so using primarily language changes, while AOSD
uses a combination of language, environment,
and method.
The core construct of AOP is the aspect, which
encapsulates behaviors affecting multiple classes
into reusable modules. Systems are composed
of several components each responsible for a
specific piece of functionality. Irrespective of the
core functionality of a program, the system
services like logging, transaction management,
security etc., must be included in the program.
These system services are commonly referred
to as ‘cross-cutting concerns’ as they tend to
|
|
Nov
2007 | Java Jazz Up | 5 |
|
|
|
View All Topics |
All Pages of this Issue |
Pages:
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53 ,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63 ,
64,
65 ,
66 ,
67 ,
68 ,
69 Download PDF |
|
|
|
|
|
|
|