1 / 65
文档名称:

Aspect Oriented Programming with AspectJ.pdf

格式:pdf   页数:65
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

Aspect Oriented Programming with AspectJ.pdf

上传人:kuo08091 2014/3/14 文件大小:0 KB

下载得到文件列表

Aspect Oriented Programming with AspectJ.pdf

文档介绍

文档介绍:Aspect-Oriented Programming with AspectJ
Aspect-Oriented Programming
with AspectJ™

PARC
Erik Hilsdale, Jim Hugunin, Wes Isberg,
Gregor Kiczales, Mik Kersten
partially funded by DARPA under contract F30602-97-C0246
1 (c) Copyright 1998-2002 Palo Alto Research Center Incorporated. All Rights Reserved.
outline
• I AOP and AspectJ overview
– problems, basic concepts, context, adoption
• II AspectJ tutorial
– first example
– language mechanisms
– development environment
– using aspects
• III conclusion
– futures, references, summary
2 (c) Copyright 1998-2002 Palo Alto Research Center Incorporated. All Rights Reserved.
(c) Copyright 1998-2002 Palo Alto Research Center Incorporated. All Rights Reserved.
Aspect-Oriented Programming with AspectJ
good modularity
XML parsing
• XML parsing .
– red shows relevant lines of code
– nicely fits in one box
3 (c) Copyright 1998-2002 Palo Alto Research Center Incorporated. All Rights Reserved.
good modularity
URL pattern matching
• URL pattern matching .
– red shows relevant lines of code
– nicely fits in two boxes (using inheritance)
4 (c) Copyright 1998-2002 Palo Alto Research Center Incorporated. All Rights Reserved.
(c) Copyright 1998-2002 Palo Alto Research Center Incorporated. All Rights Reserved.
Aspect-Oriented Programming with AspectJ
problems like…
logging is not modularized
• where is logging .
– red shows lines of code that handle logging
– not in just one place
– not even in a small number of places
5 (c) Copyright 1998-2002 Palo Alto Research Center Incorporated. All Rights Reserved.
problems like…
session expiration is not modularized
ApplicationSession StandardSession
/* public void invalidate() { .; /**
* ==================================================================== (context); /** * Bind an object to this session, usin