1 / 116
文档名称:

Aspect-Oriented Programming with AspectJ:面向方面的编程方法.ppt

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

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

分享

预览

Aspect-Oriented Programming with AspectJ:面向方面的编程方法.ppt

上传人:薄荷牛奶 2016/1/31 文件大小:0 KB

下载得到文件列表

Aspect-Oriented Programming with AspectJ:面向方面的编程方法.ppt

相关文档

文档介绍

文档介绍:Aspect-Oriented Programming with AspectJ?Julie Waterhouse and Mik /ASCON '042outline?I AOP and AspectJ overview –problems, basic concepts, context?II AspectJ tutorial –first example–language mechanisms–using aspects?III examples and demo?IV conclusion CASCON '043good modularity?XML parsing .–red shows relevant lines of code–nicely fits in one boxXML parsingCASCON '044good modularity?URL pattern matching .–red shows relevant lines of code–nicely fits in two boxes (using inheritance)URL pattern matchingCASCON '045problems like…?where is logging .–red shows lines of code that handle logging –not in just one place–not even in a small number of placeslogging is not modularizedCASCON '047problems like…HTTPRequestHTTPResponseServletgetCookies()getRequestURI()(doc)getSession()getRequestedSessionId()...getRequest()setContentType(contentType)getOutptutStream()setSessionId(id)...SessionInterceptorrequestMap(request)beforeBody(req, resp)...SessiongetAttribute(name)setAttribute(name, val)invalidate()...session tracking is not modularizedCASCON '048the problem of crosscutting concerns?critical aspects of large systems don’t fit in traditional modules–logging, error handling–synchronization–security–power management–memory management–performance optimizations?tangled code has a cost–difficult to understand–difficult to change–increases with size of system–maintenance costs are huge?good programmers work hard to get rid of tangled code–the last 10% of the tangled code causes 90% of the development and maintenance headacheslogging, security, optimizationsCASCON '049the AOP idea?crosscutting is inherent plex systems?crosscutting concerns–have a clear purpose–have a natural structure?defined set of methods, module boundary crossings, points of resource utilization, lines of dataflow…?so, let’s capture the structure of crosscutting concerns explicitly...–in a modular way–with linguistic and tool support?aspects are–well-modularized crosscutting co