面向切面编程

  • aims to increase modularity by allowing the separation of cross-cutting concerns.
    • 几乎所有的编程思想都涉及代码功能的分类,将各个关注点(Concern)封装成独立的抽象模块(如函数、过程、模块、类以及方法等),后者又可供进一步实现、封装和重写。
    • 部分关注点“横切”程序代码中的数个模块,即在多个模块中都有出现,它们即被称作横切关注点(Cross-cutting concerns, Horizontal concerns)

Support

  • .NET Framework languages (c# / VB.NET)
    • PostSharp is a commercial AOP implementation with a free but limited edition.
    • Unity provides an API to facilitate proven practices in core areas of programming including data access, security, logging, exception handling and others.
  • ActionScript
  • Ada
  • AutoHotkey
  • C / C++
  • COBOL
  • The Cocoa Objective-C frameworks
  • ColdFusion
  • Common Lisp
  • Delphi
  • Delphi Prism
  • e (IEEE 1647)
  • Emacs Lisp
  • Groovy
  • Haskell
  • Java
  • AspectJ
  • JavaScript
  • Logtalk
  • Lua
  • make
  • Matlab
  • ML
  • Nemerle
  • Perl
  • PHP
  • Prolog
  • Python
  • Racket
  • Ruby
  • Squeak Smalltalk
  • UML 2.0
  • XML

Refs