This page allows you to examine the variables generated by the Edit Filter for an individual change.

Variables generated for this change

VariableValue
Name of the user account (user_name)
'122.165.228.108'
Page ID (page_id)
145329
Page namespace (page_namespace)
0
Page title without namespace (page_title)
'Aspect-oriented programming'
Full page title (page_prefixedtitle)
'Aspect-oriented programming'
Action (action)
'edit'
Edit summary/reason (summary)
'/* Join point models */ '
Whether or not the edit is marked as minor (no longer in use) (minor_edit)
false
Old page wikitext, before the edit (old_wikitext)
'{{Refimprove|date=September 2008}} {{Programming paradigms}} In [[computing]], '''aspect-oriented programming''' ('''AOP''') is a [[programming paradigm]] that aims to increase [[Modularity (programming)|modularity]] by allowing the [[separation of concerns|separation of]] [[cross-cutting concern]]s. AOP forms a basis for [[aspect-oriented software development]]. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code, while "aspect-oriented software development" refers to a whole engineering discipline. ==Overview== Aspect-oriented programming entails breaking down program logic into distinct parts (so-called ''concerns'', cohesive areas of functionality). Nearly all programming paradigms support some level of grouping and [[encapsulation (computer science)|encapsulation]] of concerns into separate, independent entities by providing abstractions (e.g., procedures, modules, classes, methods) that can be used for implementing, abstracting and composing these concerns. But some concerns defy these forms of implementation and are called ''crosscutting concerns'' because they "cut across" multiple abstractions in a program. [[data logging|Logging]] exemplifies a crosscutting concern because a logging strategy necessarily affects every logged part of the system. Logging thereby ''crosscuts'' all logged classes and methods. All AOP implementations have some crosscutting expressions that encapsulate each concern in one place. The difference between implementations lies in the power, safety, and usability of the constructs provided. For example, interceptors that specify the methods to intercept express a limited form of crosscutting, without much support for type-safety or debugging. [[AspectJ]] has a number of such expressions and encapsulates them in a special class, an [[aspect (computer science)|aspect]]. For example, an aspect can alter the behavior of the base code (the non-aspect part of a program) by applying [[Advice in aspect-oriented programming|advice]] (additional behavior) at various [[join point]]s (points in a program) specified in a quantification or query called a [[pointcut]] (that detects whether a given join point matches). An aspect can also make binary-compatible structural changes to other classes, like adding members or parents. ==History== AOP has several direct antecedents:<ref>"Aspect-Oriented Programming" "Kiczales, G.; Lamping, J; Mehdhekar, A; Maeda, C; Lopes, C. V.; Loingtier, J; Irwin, J. Proceedings of the European Conference on Object-Oriented Programming (ECOOP), Springer-Verlag LNCS 1241. June 1997."</ref> reflection and [[Metaobject|metaobject protocols]], [[subject-oriented programming]], Composition Filters and Adaptive Programming.<ref>"Adaptive Object Oriented Programming: The Demeter Approach with Propagation Patterns" ''Karl Liebherr'' 1996 ISBN 0-534-94602-X presents a well-worked version of essentially the same thing (Lieberherr subsequently recognized this and reframed his approach).</ref> [[Gregor Kiczales]] and colleagues at [[Xerox PARC]] developed the explicit concept of AOP, and followed this with the [[AspectJ]] AOP extension to Java. IBM's research team pursued a tool approach over a language design approach and in 2001 proposed [[Hyper/J]] and the [[Concern Manipulation Environment]], which have not seen wide usage. EmacsLisp changelog added AOP related code in version [http://web.mit.edu/dosathena/sandbox/emacs-19.28/src/ChangeLog 19.28]. The examples in this article use [[AspectJ]] as it is the most widely known AOP language.{{Citation needed|date=November 2010}} The [[Microsoft Transaction Server]] is considered to be the first major application of AOP followed by [[Enterprise JavaBean]].<ref name="BoxSells2002">{{cite book|author1=Don Box|author2=Chris Sells|title=Essential.NET: The common language runtime|url=http://books.google.com/books?id=Kl1DVZ8wTqcC&pg=PA206|accessdate=4 October 2011|date=4 November 2002|publisher=Addison-Wesley Professional|isbn=978-0-201-73411-9|page=206}}</ref><ref name="RomanSriganesh2005">{{cite book|last1=Roman|first1=Ed|last2=Sriganesh|first2=Rima Patel|last3=Brose|first3=Gerald|title=Mastering Enterprise JavaBeans|url=http://books.google.com/books?id=60oym_-uu3EC&pg=PA285|accessdate=4 October 2011|date=1 January 2005|publisher=John Wiley and Sons|isbn=978-0-7645-8492-3|page=285}}</ref> == Motivation and basic concepts == Typically, an aspect is ''scattered'' or ''tangled'' as code, making it harder to understand and maintain. It is scattered by virtue of the function (such as logging) being spread over a number of unrelated functions that might use ''its'' function, possibly in entirely unrelated systems, different source languages, etc. That means to change logging can require modifying all affected modules. Aspects become tangled not only with the mainline function of the systems in which they are expressed but also with each other. That means changing one concern entails understanding all the tangled concerns or having some means by which the effect of changes can be inferred. For example, consider a banking application with a conceptually very simple method for transferring an amount from one account to another:<ref>Note: The examples in this article appear in a syntax that resembles that of the [[Java (programming language)|Java]] language.</ref> <source lang="java"> void transfer(Account fromAcc, Account toAcc, int amount) throws Exception { if (fromAcc.getBalance() < amount) { throw new InsufficientFundsException(); } fromAcc.withdraw(amount); toAcc.deposit(amount); } </source> However, this transfer method overlooks certain considerations that a deployed application would require: it lacks security checks to verify that the current user has the authorization to perform this operation; a [[database transaction]] should encapsulate the operation in order to prevent accidental data loss; for diagnostics, the operation should be logged to the system log, etc. A version with all those new concerns, for the sake of example, could look somewhat like this: <source lang="java"> void transfer(Account fromAcc, Account toAcc, int amount, User user, Logger logger) throws Exception { logger.info("Transferring money..."); if (! checkUserPermission(user)){ logger.info("User has no permission."); throw new UnauthorizedUserException(); } if (fromAcc.getBalance() < amount) { logger.info("Insufficient funds, sorry."); throw new InsufficientFundsException(); } fromAcc.withdraw(amount); toAcc.deposit(amount); //get database connection //save transactions logger.info("Successful transaction."); } </source> In this example other interests have become ''tangled'' with the basic functionality (sometimes called the ''business logic concern''). Transactions, security, and logging all exemplify ''cross-cutting concerns''. Now consider what happens if we suddenly need to change (for example) the security considerations for the application. In the program's current version, security-related operations appear ''scattered'' across numerous methods, and such a change would require a major effort. AOP attempts to solve this problem by allowing the programmer to express cross-cutting concerns in stand-alone modules called ''aspects''. Aspects can contain ''advice'' (code joined to specified points in the program) and ''inter-type declarations'' (structural members added to other classes). For example, a security module can include advice that performs a security check before accessing a bank account. The [[pointcut]] defines the times ([[join point]]s) when one can access a bank account, and the code in the advice body defines how the security check is implemented. That way, both the check and the places can be maintained in one place. Further, a good pointcut can anticipate later program changes, so if another developer creates a new method to access the bank account, the advice will apply to the new method when it executes. So for the above example implementing logging in an aspect: <source lang="java"> aspect Logger { void Bank.transfer(Account fromAcc, Account toAcc, int amount, User user, Logger logger) { logger.info("Transferring money..."); } void Bank.getMoneyBack(User user, int transactionId, Logger logger) { logger.info("User requested money back."); } // other crosscutting code... } </source> One can think of AOP as a debugging tool or as a user-level tool. Advice should be reserved for the cases where you cannot get the function changed (user level)<ref>[http://www.gnu.org/software/emacs/elisp/html_node/Advising-Functions.html Emacs documentation]</ref> or do not want to change the function in production code (debugging). ==Join point models== The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: # When the advice can run. These are called ''[[join point]]s'' because they are points in a running program where additional behavior can be usefully joined. A join point needs to be addressable and understandable by an ordinary programmer to be useful. It should also be stable across inconsequential program changes in order for an aspect to be stable across such changes. Many AOP implementations support method executions and field references as join points. # A way to specify (or ''quantify'') join points, called ''[[pointcut]]s''. Pointcuts determine whether a given join point matches. Most useful pointcut languages use a syntax like the base language (for example, [[AspectJ]] uses Java signatures) and allow reuse through naming and combination. # A means of specifying code to run at a join point. [[AspectJ]] calls this ''[[advice in aspect-oriented programming|advice]]'', and can run it before, after, and around join points. Some implementations also support things like defining a method in an aspect on another class. Join-point models can be compared based on the join points exposed, how join points are specified, the operations permitted at the join points, and the structural enhancements that can be expressed. ===AspectJ's join-point model=== {{Main|AspectJ }} * The join points in AspectJ include method or constructor call or execution, the initialization of a class or object, field read and write access, exception handlers, etc. They do not include loops, super calls, throws clauses, multiple statements, etc. * Pointcuts are specified by combinations of ''primitive pointcut designators'' (PCDs). :"Kinded" PCDs match a particular kind of join point (e.g., method execution) and tend to take as input a Java-like signature. One such pointcut looks like this: execution(* set*(*)) :This pointcut matches a method-execution join point, if the method name starts with "<code>set</code>" and there is exactly one argument of any type. "Dynamic" PCDs check runtime types and bind variables. For example this(Point) :This pointcut matches when the currently executing object is an instance of class <code>Point</code>. Note that the unqualified name of a class can be used via Java's normal type lookup. "Scope" PCDs limit the lexical scope of the join point. For example: within(com.company.*) : This pointcut matches any join point in any type in the <code>com.company</code> package. The ''<code>*</code>'' is one form of the wildcards that can be used to match many things with one signature. Pointcuts can be composed and named for reuse. For example pointcut set() : execution(* set*(*) ) && this(Point) && within(com.company.*); :This pointcut matches a method-execution join point, if the method name starts with "<code>set</code>" and <code>this</code> is an instance of type <code>Point</code> in the <code>com.company</code> package. It can be referred to using the name "<code>set()</code>". * Advice specifies to run at (before, after, or around) a join point (specified with a pointcut) certain code (specified like code in a method). The AOP runtime invokes Advice automatically when the pointcut matches the join point. For example: after() : set() { Display.update(); } : :This effectively specifies: "if the ''<code>set()</code>'' pointcut matches the join point, run the code <code>Display.update()</code> after the join point completes." ===Other potential join point models=== There are other kinds of JPMs. All advice languages can be defined in terms of their JPM. For example, a hypothetical aspect language for [[Unified Modeling Language|UML]] may have the following JPM: * Join points are all model elements. * Pointcuts are some boolean expression combining the model elements. * The means of affect at these points are a visualization of all the matched join points. ===Inter-type declarations=== ''Inter-type declarations'' provide a way to express crosscutting concerns affecting the structure of modules. Also known as ''open classes'', this enables programmers to declare in one place members or parents of another class, typically in order to combine all the code related to a concern in one aspect. For example, if a programmer implemented the crosscutting display-update concern using visitors instead, an inter-type declaration using the [[visitor pattern]] might look like this in AspectJ: <source lang="java"> aspect DisplayUpdate { void Point.acceptVisitor(Visitor v) { v.visit(this); } // other crosscutting code... } </source> This code snippet adds the <code>acceptVisitor</code> method to the <code>Point</code> class. It is a requirement that any structural additions be compatible with the original class, so that clients of the existing class continue to operate, unless the AOP implementation can expect to control all clients at all times. ==Implementation== AOP programs can affect other programs in two different ways, depending on the underlying languages and environments: # a combined program is produced, valid in the original language and indistinguishable from an ordinary program to the ultimate interpreter # the ultimate interpreter or environment is updated to understand and implement AOP features. The difficulty of changing environments means most implementations produce compatible combination programs through a process known as ''weaving'' - a special case of [[program transformation]]. An [[aspect weaver]] reads the aspect-oriented code and generates appropriate object-oriented code with the aspects integrated. The same AOP language can be implemented through a variety of weaving methods, so the semantics of a language should never be understood in terms of the weaving implementation. Only the speed of an implementation and its ease of deployment are affected by which method of combination is used. Systems can implement source-level weaving using preprocessors (as C++ was implemented originally in [[CFront]]) that require access to program source files. However, Java's well-defined binary form enables bytecode weavers to work with any Java program in .class-file form. Bytecode weavers can be deployed during the build process or, if the weave model is per-class, during class loading. [[AspectJ]] started with source-level weaving in 2001, delivered a per-class bytecode weaver in 2002, and offered advanced load-time support after the integration of [[AspectWerkz]] in 2005. Any solution that combines programs at runtime has to provide views that segregate them properly to maintain the programmer's segregated model. Java's bytecode support for multiple source files enables any debugger to step through a properly woven .class file in a source editor. However, some third-party decompilers cannot process woven code because they expect code produced by Javac rather than all supported bytecode forms (see also "[[#Problems|Problems]]", below). [[Deploy-time]] weaving offers another approach.<ref>http://www.forum2.org/tal/AspectJ2EE.pdf</ref> This basically implies post-processing, but rather than patching the generated code, this weaving approach ''subclasses'' existing classes so that the modifications are introduced by method-overriding. The existing classes remain untouched, even at runtime, and all existing tools (debuggers, profilers, etc.) can be used during development. A similar approach has already proven itself in the implementation of many [[Java EE]] application servers, such as [[IBM]]'s [[WebSphere]]. ===Terminology=== Standard terminology used in Aspect-oriented programming may include: ;Cross-cutting concerns: Even though most classes in an OO model will perform a single, specific function, they often share common, secondary requirements with other classes. For example, we may want to add logging to classes within the data-access layer and also to classes in the UI layer whenever a thread enters or exits a method. Even though each class has a very different primary functionality, the code needed to perform the secondary functionality is often identical. ;Advice: This is the additional code that you want to apply to your existing model. In our example, this is the logging code that we want to apply whenever the thread enters or exits a method. ;Pointcut: This is the term given to the point of execution in the application at which cross-cutting concern needs to be applied. In our example, a pointcut is reached when the thread enters a method, and another pointcut is reached when the thread exits the method. ;Aspect: The combination of the pointcut and the advice is termed an aspect. In the example above, we add a logging aspect to our application by defining a pointcut and giving the correct advice. == Comparison to other programming paradigms == Aspects emerged out of [[object-oriented programming]] and [[computational reflection]]. AOP languages have functionality similar to, but more restricted than [[Metaobject|metaobject protocols]]. Aspects relate closely to programming concepts like [[subjects (programming)|subjects]], [[mixin]]s, and [[delegation (programming)|delegation]]. Other ways to use aspect-oriented programming paradigms include [[Composition Filters]] and the [[Hyper/J|hyperslices]] approach. Since at least the 1970s, developers have been using forms of interception and dispatch-patching that resemble some of the implementation methods for AOP, but these never had the semantics that the crosscutting specifications provide written in one place. Designers have considered alternative ways to achieve separation of code, such as [[C Sharp (programming language)|C#]]'s partial types, but such approaches lack a quantification mechanism that allows reaching several join points of the code with one declarative statement. == Adoption issues == Programmers need to be able to read code and understand what is happening in order to prevent errors.<ref>[[Edsger Dijkstra]], [http://www.cs.utexas.edu/users/EWD/ewd02xx/EWD249.PDF ''Notes on Structured Programming''], pg. 1-2</ref> Even with proper education, understanding crosscutting concerns can be difficult without proper support for visualizing both static structure and the dynamic flow of a program.<ref>[http://pp.info.uni-karlsruhe.de/uploads/publikationen/constantinides04eiwas.pdf ''AOP Considered Harmful''] </ref>Beginning in 2002, AspectJ began to provide IDE plug-ins to support the visualizing of crosscutting concerns. Those features, as well as aspect code assist and [[Code refactoring|refactoring]] are now common. Given the power of AOP, if a programmer makes a logical mistake in expressing crosscutting, it can lead to widespread program failure. Conversely, another programmer may change the join points in a program &ndash; e.g., by renaming or moving methods &ndash; in ways that the aspect writer did not anticipate, with [[unintended consequence]]s. One advantage of modularizing crosscutting concerns is enabling one programmer to affect the entire system easily; as a result, such problems present as a conflict over responsibility between two or more developers for a given failure. However, the solution for these problems can be much easier in the presence of AOP, since only the aspect needs to be changed, whereas the corresponding problems without AOP can be much more spread out. ==Implementations== The following [[programming language]]s have implemented AOP, within the language, or as an external library: *[[.NET Framework]] languages ([[C Sharp (programming language)|C#]] / [[Visual Basic .NET|VB.NET]])<ref>Numerous: [https://github.com/vc3/Afterthought Afterthought], [http://www.rapier-loom.net/ LOOM.NET], [http://www.codeplex.com/entlib Enterprise Library 3.0 Policy Injection Application Block], [http://sourceforge.net/projects/aspectdng/ AspectDNG], [http://www.castleproject.org/aspectsharp/ Aspect#], [http://composestar.sourceforge.net/ Compose*], [http://www.postsharp.org/ PostSharp], [http://www.seasar.org/en/dotnet/ Seasar.NET], [http://dotspect.tigris.org/ DotSpect (.SPECT)], [http://www.springframework.net/ Spring.NET] (as part of its functionality), [http://www.cs.columbia.edu/~eaddy/wicca Wicca and Phx.Morph], [http://setpoint.codehaus.org/ SetPoint]</ref> *[[ActionScript]]<ref>[http://www.as3commons.org/as3-commons-bytecode as3-commons-bytecode]</ref> *[[Ada (programming language)|Ada]]<ref>[http://www.adacore.com/uploads/technical-papers/Ada2012_Rational_Introducion.pdf Ada2012 Rationale]</ref> *[[AutoHotkey]]<ref>[http://www.autohotkey.com/forum/viewtopic.php?p=243426 Function Hooks]</ref> *[[C (programming language)|C]] / [[C++]]<ref>Several: [[AspectC++]], [http://wwwiti.cs.uni-magdeburg.de/iti_db/forschung/fop/featurec/ FeatureC++], [http://www.cs.ubc.ca/labs/spl/projects/aspectc.html AspectC], [http://www.aspectc.net/ AspeCt-oriented C], [http://www.bramadams.org/aspicere/index.html Aspicere]</ref> *[[COBOL]]<ref>[http://homepages.vub.ac.be/~kdeschut/cobble/ Cobble]</ref> *The [[Cocoa (API)|Cocoa]] [[Objective-C]] frameworks<ref>[http://www.ood.neu.edu/aspectcocoa/ AspectCocoa]</ref> *[[ColdFusion]]<ref>[http://www.coldspringframework.org/ ColdSpring]</ref> *[[Common Lisp]]<ref>[http://common-lisp.net/project/closer/aspectl.html AspectL]</ref> *[[Borland Delphi|Delphi]]<ref>[http://code.google.com/p/infra/ InfraAspect]</ref><ref>[http://code.google.com/p/meaop/ MeAOP in MeSDK]</ref><ref>[http://code.google.com/p/delphisorcery/ DSharp]</ref> *[[Delphi Prism]]<ref>[http://prismwiki.codegear.com/en/Cirrus RemObjects Cirrus]</ref> *[[E (verification language)|e]] (IEEE 1647) *[[Emacs Lisp]]<ref>[http://www.gnu.org/software/emacs/elisp/html_node/Advising-Functions.html Emacs Advice Functions]</ref> *[[Groovy (programming language)|Groovy]] *[[Haskell (programming language)|Haskell]]<ref>[[monad (functional programming)]] ({{cite paper | id = {{citeseerx|10.1.1.25.8262}} | title = Monads As a theoretical basis for AOP }}) and [http://portal.acm.org/citation.cfm?id=1233842 Aspect-oriented programming with type classes.]</ref> *[[Java (programming language)|Java]]<ref>Numerous others: [http://www.caesarj.org/ CaesarJ], [http://composestar.sourceforge.net/ Compose*], [http://dynaop.dev.java.net/ Dynaop], [http://jac.objectweb.org/ JAC], [[Google Guice]] (as part of its functionality), [http://www.csg.is.titech.ac.jp/~chiba/javassist/ Javassist], [http://ssel.vub.ac.be/jasco/ JAsCo (and AWED)], [http://www.ics.uci.edu/~trungcn/jaml/ JAML], [http://labs.jboss.com/portal/jbossaop JBoss AOP], [http://roots.iai.uni-bonn.de/research/logicaj LogicAJ], [http://www.objectteams.org/ Object Teams], [http://prose.ethz.ch/ PROSE], [http://www.aspectbench.org/ The AspectBench Compiler for AspectJ (abc)], [[Spring framework]] (as part of its functionality), [[Seasar]], [http://roots.iai.uni-bonn.de/research/jmangler/ The JMangler Project], [http://injectj.sourceforge.net/ InjectJ], [http://www.csg.is.titech.ac.jp/projects/gluonj/ GluonJ], [http://www.st.informatik.tu-darmstadt.de/static/pages/projects/AORTA/Steamloom.jsp Steamloom]</ref> **[[AspectJ]] *[[JavaScript]]<ref>Many: [http://i.gotfresh.info/2007/12/7/advised-methods-for-javascript-with-prototype/ Advisable], [http://code.google.com/p/ajaxpect/ Ajaxpect], [http://plugins.jquery.com/project/AOP jQuery AOP Plugin], [http://aspectes.tigris.org/ Aspectes], [http://www.aspectjs.com/ AspectJS], [http://www.cerny-online.com/cerny.js/ Cerny.js], [http://dojotoolkit.org/ Dojo Toolkit], [http://humax.sourceforge.net/ Humax Web Framework], [http://code.google.com/p/joose-js/ Joose], [[Prototype.js|Prototype]] - [http://www.prototypejs.org/api/function/wrap Prototype Function#wrap], [http://developer.yahoo.com/yui/3/api/Do.html YUI 3 (Y.Do)]</ref> *[[Logtalk (programming language)|Logtalk]]<ref>Using built-in support for categories (which allows the encapsulation of aspect code) and event-driven programming (which allows the definition of ''before'' and after ''event'' handlers).</ref> *[[Lua (programming language)|Lua]]<ref>[http://luaforge.net/projects/aspectlua/ AspectLua]</ref> *[[Matlab]]<ref>[http://www.sable.mcgill.ca/mclab/aspectmatlab/index.html]</ref> *[[make (software)|make]]<ref>[http://www.bramadams.org/makao/ MAKAO]</ref> *[[ML (programming language)|ML]]<ref>[http://www.cs.princeton.edu/sip/projects/aspectml/ AspectML]</ref> *[[PHP]]<ref>Several: [http://code.google.com/p/phpaspect/ PHPaspect], [http://www.aophp.net/ Aspect-Oriented PHP], [http://www.seasar.org/en/php5/index.html Seasar.PHP], [http://php-aop.googlecode.com/ PHP-AOP], [http://flow3.typo3.org/ FLOW3], [https://github.com/AOP-PHP/AOP AOP PECL Extension], [https://github.com/lisachenko/go-aop-php Go! AOP library]</ref> *[[Racket (programming language)|Racket]]<ref>[http://planet.racket-lang.org/display.ss?package=aspectscheme.plt&owner=dutchyn AspectScheme]</ref> *[[Perl]]<ref>[http://search.cpan.org/dist/Aspect/lib/Aspect.pm The Aspect Module]</ref> *[[Prolog]]<ref>[http://www.bigzaphod.org/whirl/dma/docs/aspects/aspects-man.html "Whirl"]</ref> *[[Python (programming language)|Python]]<ref>Several: [http://peak.telecommunity.com/ PEAK], [http://old.aspyct.org Aspyct AOP], [http://www.cs.tut.fi/~ask/aspects/aspects.html Lightweight Python AOP], [http://www.logilab.org/projects/aspects Logilab's aspect module], [http://pythius.sourceforge.net/ Pythius], [http://springpython.webfactional.com/reference/html/aop.html Spring Python's AOP module], [http://pytilities.sourceforge.net/doc/1.1.0/guide/aop/ Pytilities' AOP module]</ref> *[[Ruby (programming language)|Ruby]]<ref>[http://aspectr.sourceforge.net/ AspectR]</ref><ref>[http://aspectr-fork.sourceforge.net/ AspectR-Fork]</ref><ref>[http://aquarium.rubyforge.org/ Aquarium]</ref> *[[Squeak]] [[Smalltalk]]<ref>[http://www.prakinf.tu-ilmenau.de/~hirsch/Projects/Squeak/AspectS/ AspectS]</ref><ref>[http://csl.ensm-douai.fr/MetaclassTalk MetaclassTalk]</ref> *[[UML 2|UML 2.0]]<ref>[http://www.iit.edu/~concur/weavr WEAVR]</ref> *[[XML]]<ref>[http://code.google.com/p/aspectxml/ AspectXML]</ref> ==See also== * [[Aspect-oriented software development]] * [[Distributed AOP]] * [[Attribute grammar]], a formalism that can be used for aspect-oriented programming on top of [[functional programming languages]] * [[Programming paradigm]]s * [[Stability Model]] * [[Subject-oriented programming]], an alternative to Aspect-oriented programming * [[Executable UML]] * [[COMEFROM]]: Some elements of aspect-oriented programming have been compared to the joke [[COMEFROM]] statement.<ref>[[C2:ComeFrom]]</ref> * [[Decorator pattern]] * [[Domain-driven design]] ==Notes and references== {{reflist}} ==Further reading== * {{cite book | first = Gregor | last = Kiczales | coauthors = John Lamping, Anurag Mendhekar, Chris Maeda, Cristina Lopes, Jean-Marc Loingtier, and John Irwin | year = 1997 | title = Proceedings of the European Conference on Object-Oriented Programming, vol.1241 | chapter = Aspect-Oriented Programming | id = {{citeseerx|10.1.1.115.8660}} | pages = 220–242}} The paper generally considered to be the authoritative reference for AOP. * {{cite book | first = Andreas | last = Holzinger | coauthors = [[M. Brugger]], [[W. Slany]] | year = 2011 | title = Applying Aspect Oriented Programming (AOP) in Usability Engineering processes: On the example of Tracking Usage Information for Remote Usability Testing. In: Marca, D. A., Shishkov, B. & Sinderen, M. v. (Eds.) Proceedings of the 8th International Conference on electronic Business and Telecommunications. Sevilla, 53-56}} * {{cite book | first = Robert E. | last = Filman | authorlink = Robert E. Filman | coauthors = [[Tzilla Elrad]], [[Siobhán Clarke]], and [[Mehmet Aksit]] | year = 2004 | title = Aspect-Oriented Software Development | isbn = 0-321-21976-7}} * {{cite book | first = Renaud | last = Pawlak | authorlink = Renaud Pawlak | coauthors = [[Lionel Seinturier]], and [[Jean-Philippe Retaillé]] | year = 2005 | title = Foundations of AOP for J2EE Development | isbn = 1-59059-507-6}} * {{cite book | first = Ramnivas | last = Laddad | authorlink = Ramnivas Laddad | year = 2003 | title = AspectJ in Action: Practical Aspect-Oriented Programming | isbn = 1-930110-93-6}} * {{cite book | first = Ivar | last = Jacobson | authorlink = Ivar Jacobson | coauthors = and [[Pan-Wei Ng]] | year = 2005 | title = Aspect-Oriented Software Development with Use Cases | isbn = 0-321-26888-1}} * [http://www.cmsdevelopment.com/en/articles/aosdinphp/ Aspect-oriented Software Development and PHP, Dmitry Sheiko, 2006] * {{cite book | first = Siobhán | last = Clarke | authorlink = Siobhán Clarke | coauthors = and [[Elisa Baniassad]] | year = 2005 | title = Aspect-Oriented Analysis and Design: The Theme Approach | isbn = 0-321-24674-8}} * {{cite book | first = Raghu | last = Yedduladoddi | authorlink = Raghu Yedduladoddi | year = 2009 | title = Aspect Oriented Software Development: An Approach to Composing UML Design Models | isbn = 3-639-12084-1}} * "Adaptive Object-Oriented Programming Using Graph-Based Customization" – Lieberherr, Silva-Lepe, et al. - 1994 == External links == * Eric Bodden's [http://www.sable.mcgill.ca/aop.net/ list of AOP tools] in .net framework * [http://www.dreamincode.net/forums/blog/gabehabe/index.php?showentry=1016 Programming Styles: Procedural, OOP, and AOP] * [http://forum.codecall.net/java-help/26210-object-reading-writing.html Programming Forum: Procedural, OOP, and AOP] * [http://aosd.net/conference Aspect-Oriented Software Development], annual conference on AOP * [http://aosd.net/wiki AOSD Wiki], Wiki on aspect-oriented software development * [http://www.eclipse.org/aspectj/doc/released/progguide/index.html AspectJ Programming Guide] * [http://www.aspectbench.org/ The AspectBench Compiler for AspectJ], another Java implementation * [http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=AOP@work: Series of IBM developerWorks articles on AOP] * [http://www.javaworld.com/javaworld/jw-01-2002/jw-0118-aspect.html A detailed series of articles on basics of aspect-oriented programming and AspectJ] * [http://codefez.com/what-is-aspect-oriented-programming/ What is Aspect-Oriented Programming?], introduction with RemObjects Taco * [http://www.cis.uab.edu/gray/Research/C-SAW/ Constraint-Specification Aspect Weaver] * [http://www.devx.com/Java/Article/28422 Aspect- vs. Object-Oriented Programming: Which Technique, When?] * [http://video.google.com/videoplay?docid=8566923311315412414&q=engEDU Gregor Kiczales, Professor of Computer Science, explaining AOP], video 57 min. * [http://database.ittoolbox.com/documents/academic-articles/what-does-aspectoriented-programming-mean-to-cobol-4570 Aspect Oriented Programming in COBOL] * [http://static.springframework.org/spring/docs/2.0.x/reference/aop.html Aspect-Oriented Programming in Java with Spring Framework] * [http://www.sharpcrafters.com/aop.net Wiki dedicated to AOP methods on.NET] *[http://dssg.cs.umb.edu/wiki/index.php/Early_Aspects_for_Business_Process_Modeling Early Aspects for Business Process Modeling (An Aspect Oriented Language for BPMN)] * [http://www.cs.bilkent.edu.tr/~bedir/CS586-AOSD AOSD Graduate Course at Bilkent University] * [http://www.se-radio.net/podcast/2008-08/episode-106-introduction-aop Introduction to AOP - Software Engineering Radio Podcast Episode 106] * [http://innoli.com/en/Innoli-EN/OpenSource.html An Objective-C implementation of AOP by Szilveszter Molnar] * [https://github.com/forensix/MGAOP Apect-Oriented programming for iOS and OS X by Manuel Gebele] {{aosd}} {{DEFAULTSORT:Aspect-Oriented Programming}} [[Category:Aspect-oriented programming| ]] [[Category:Aspect-oriented software development]] [[Category:Programming paradigms]] [[ar:برمجة جانبية المنحى]] [[ca:Programació orientada a aspectes]] [[cs:Aspektově orientované programování]] [[de:Aspektorientierte Programmierung]] [[es:Programación orientada a aspectos]] [[fr:Programmation orientée aspect]] [[gl:Programación orientada a aspectos]] [[ko:관점 지향 프로그래밍]] [[it:Programmazione orientata agli aspetti]] [[nl:Aspectgeoriënteerd programmeren]] [[ja:アスペクト指向プログラミング]] [[pl:Programowanie aspektowe]] [[pt:Programação orientada a aspecto]] [[ro:Programarea orientată pe aspecte]] [[ru:Аспектно-ориентированное программирование]] [[sv:Aspektorienterad programmering]] [[te:ఆస్పెక్ట్ ఓరియెంటెడ్ ప్రోగ్రామింగ్]] [[th:การเขียนโปรแกรมเชิงลักษณะ]] [[tr:Cephe yönelimli programlama]] [[uk:Аспектно-орієнтоване програмування]] [[zh:面向侧面的程序设计]]'
New page wikitext, after the edit (new_wikitext)
'{{Refimprove|date=September 2008}} {{Programming paradigms}} In [[computing]], '''aspect-oriented programming''' ('''AOP''') is a [[programming paradigm]] that aims to increase [[Modularity (programming)|modularity]] by allowing the [[separation of concerns|separation of]] [[cross-cutting concern]]s. AOP forms a basis for [[aspect-oriented software development]]. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code, while "aspect-oriented software development" refers to a whole engineering discipline. ==Overview== Aspect-oriented programming entails breaking down program logic into distinct parts (so-called ''concerns'', cohesive areas of functionality). Nearly all programming paradigms support some level of grouping and [[encapsulation (computer science)|encapsulation]] of concerns into separate, independent entities by providing abstractions (e.g., procedures, modules, classes, methods) that can be used for implementing, abstracting and composing these concerns. But some concerns defy these forms of implementation and are called ''crosscutting concerns'' because they "cut across" multiple abstractions in a program. [[data logging|Logging]] exemplifies a crosscutting concern because a logging strategy necessarily affects every logged part of the system. Logging thereby ''crosscuts'' all logged classes and methods. All AOP implementations have some crosscutting expressions that encapsulate each concern in one place. The difference between implementations lies in the power, safety, and usability of the constructs provided. For example, interceptors that specify the methods to intercept express a limited form of crosscutting, without much support for type-safety or debugging. [[AspectJ]] has a number of such expressions and encapsulates them in a special class, an [[aspect (computer science)|aspect]]. For example, an aspect can alter the behavior of the base code (the non-aspect part of a program) by applying [[Advice in aspect-oriented programming|advice]] (additional behavior) at various [[join point]]s (points in a program) specified in a quantification or query called a [[pointcut]] (that detects whether a given join point matches). An aspect can also make binary-compatible structural changes to other classes, like adding members or parents. ==History== AOP has several direct antecedents:<ref>"Aspect-Oriented Programming" "Kiczales, G.; Lamping, J; Mehdhekar, A; Maeda, C; Lopes, C. V.; Loingtier, J; Irwin, J. Proceedings of the European Conference on Object-Oriented Programming (ECOOP), Springer-Verlag LNCS 1241. June 1997."</ref> reflection and [[Metaobject|metaobject protocols]], [[subject-oriented programming]], Composition Filters and Adaptive Programming.<ref>"Adaptive Object Oriented Programming: The Demeter Approach with Propagation Patterns" ''Karl Liebherr'' 1996 ISBN 0-534-94602-X presents a well-worked version of essentially the same thing (Lieberherr subsequently recognized this and reframed his approach).</ref> [[Gregor Kiczales]] and colleagues at [[Xerox PARC]] developed the explicit concept of AOP, and followed this with the [[AspectJ]] AOP extension to Java. IBM's research team pursued a tool approach over a language design approach and in 2001 proposed [[Hyper/J]] and the [[Concern Manipulation Environment]], which have not seen wide usage. EmacsLisp changelog added AOP related code in version [http://web.mit.edu/dosathena/sandbox/emacs-19.28/src/ChangeLog 19.28]. The examples in this article use [[AspectJ]] as it is the most widely known AOP language.{{Citation needed|date=November 2010}} The [[Microsoft Transaction Server]] is considered to be the first major application of AOP followed by [[Enterprise JavaBean]].<ref name="BoxSells2002">{{cite book|author1=Don Box|author2=Chris Sells|title=Essential.NET: The common language runtime|url=http://books.google.com/books?id=Kl1DVZ8wTqcC&pg=PA206|accessdate=4 October 2011|date=4 November 2002|publisher=Addison-Wesley Professional|isbn=978-0-201-73411-9|page=206}}</ref><ref name="RomanSriganesh2005">{{cite book|last1=Roman|first1=Ed|last2=Sriganesh|first2=Rima Patel|last3=Brose|first3=Gerald|title=Mastering Enterprise JavaBeans|url=http://books.google.com/books?id=60oym_-uu3EC&pg=PA285|accessdate=4 October 2011|date=1 January 2005|publisher=John Wiley and Sons|isbn=978-0-7645-8492-3|page=285}}</ref> == Motivation and basic concepts == Typically, an aspect is ''scattered'' or ''tangled'' as code, making it harder to understand and maintain. It is scattered by virtue of the function (such as logging) being spread over a number of unrelated functions that might use ''its'' function, possibly in entirely unrelated systems, different source languages, etc. That means to change logging can require modifying all affected modules. Aspects become tangled not only with the mainline function of the systems in which they are expressed but also with each other. That means changing one concern entails understanding all the tangled concerns or having some means by which the effect of changes can be inferred. For example, consider a banking application with a conceptually very simple method for transferring an amount from one account to another:<ref>Note: The examples in this article appear in a syntax that resembles that of the [[Java (programming language)|Java]] language.</ref> <source lang="java"> void transfer(Account fromAcc, Account toAcc, int amount) throws Exception { if (fromAcc.getBalance() < amount) { throw new InsufficientFundsException(); } fromAcc.withdraw(amount); toAcc.deposit(amount); } </source> However, this transfer method overlooks certain considerations that a deployed application would require: it lacks security checks to verify that the current user has the authorization to perform this operation; a [[database transaction]] should encapsulate the operation in order to prevent accidental data loss; for diagnostics, the operation should be logged to the system log, etc. A version with all those new concerns, for the sake of example, could look somewhat like this: <source lang="java"> void transfer(Account fromAcc, Account toAcc, int amount, User user, Logger logger) throws Exception { logger.info("Transferring money..."); if (! checkUserPermission(user)){ logger.info("User has no permission."); throw new UnauthorizedUserException(); } if (fromAcc.getBalance() < amount) { logger.info("Insufficient funds, sorry."); throw new InsufficientFundsException(); } fromAcc.withdraw(amount); toAcc.deposit(amount); //get database connection //save transactions logger.info("Successful transaction."); } </source> In this example other interests have become ''tangled'' with the basic functionality (sometimes called the ''business logic concern''). Transactions, security, and logging all exemplify ''cross-cutting concerns''. Now consider what happens if we suddenly need to change (for example) the security considerations for the application. In the program's current version, security-related operations appear ''scattered'' across numerous methods, and such a change would require a major effort. AOP attempts to solve this problem by allowing the programmer to express cross-cutting concerns in stand-alone modules called ''aspects''. Aspects can contain ''advice'' (code joined to specified points in the program) and ''inter-type declarations'' (structural members added to other classes). For example, a security module can include advice that performs a security check before accessing a bank account. The [[pointcut]] defines the times ([[join point]]s) when one can access a bank account, and the code in the advice body defines how the security check is implemented. That way, both the check and the places can be maintained in one place. Further, a good pointcut can anticipate later program changes, so if another developer creates a new method to access the bank account, the advice will apply to the new method when it executes. So for the above example implementing logging in an aspect: <source lang="java"> aspect Logger { void Bank.transfer(Account fromAcc, Account toAcc, int amount, User user, Logger logger) { logger.info("Transferring money..."); } void Bank.getMoneyBack(User user, int transactionId, Logger logger) { logger.info("User requested money back."); } // other crosscutting code... } </source> One can think of AOP as a debugging tool or as a user-level tool. Advice should be reserved for the cases where you cannot get the function changed (user level)<ref>[http://www.gnu.org/software/emacs/elisp/html_node/Advising-Functions.html Emacs documentation]</ref> or do not want to change the function in production code (debugging). ==Implementation== AOP programs can affect other programs in two different ways, depending on the underlying languages and environments: # a combined program is produced, valid in the original language and indistinguishable from an ordinary program to the ultimate interpreter # the ultimate interpreter or environment is updated to understand and implement AOP features. The difficulty of changing environments means most implementations produce compatible combination programs through a process known as ''weaving'' - a special case of [[program transformation]]. An [[aspect weaver]] reads the aspect-oriented code and generates appropriate object-oriented code with the aspects integrated. The same AOP language can be implemented through a variety of weaving methods, so the semantics of a language should never be understood in terms of the weaving implementation. Only the speed of an implementation and its ease of deployment are affected by which method of combination is used. Systems can implement source-level weaving using preprocessors (as C++ was implemented originally in [[CFront]]) that require access to program source files. However, Java's well-defined binary form enables bytecode weavers to work with any Java program in .class-file form. Bytecode weavers can be deployed during the build process or, if the weave model is per-class, during class loading. [[AspectJ]] started with source-level weaving in 2001, delivered a per-class bytecode weaver in 2002, and offered advanced load-time support after the integration of [[AspectWerkz]] in 2005. Any solution that combines programs at runtime has to provide views that segregate them properly to maintain the programmer's segregated model. Java's bytecode support for multiple source files enables any debugger to step through a properly woven .class file in a source editor. However, some third-party decompilers cannot process woven code because they expect code produced by Javac rather than all supported bytecode forms (see also "[[#Problems|Problems]]", below). [[Deploy-time]] weaving offers another approach.<ref>http://www.forum2.org/tal/AspectJ2EE.pdf</ref> This basically implies post-processing, but rather than patching the generated code, this weaving approach ''subclasses'' existing classes so that the modifications are introduced by method-overriding. The existing classes remain untouched, even at runtime, and all existing tools (debuggers, profilers, etc.) can be used during development. A similar approach has already proven itself in the implementation of many [[Java EE]] application servers, such as [[IBM]]'s [[WebSphere]]. ===Terminology=== Standard terminology used in Aspect-oriented programming may include: ;Cross-cutting concerns: Even though most classes in an OO model will perform a single, specific function, they often share common, secondary requirements with other classes. For example, we may want to add logging to classes within the data-access layer and also to classes in the UI layer whenever a thread enters or exits a method. Even though each class has a very different primary functionality, the code needed to perform the secondary functionality is often identical. ;Advice: This is the additional code that you want to apply to your existing model. In our example, this is the logging code that we want to apply whenever the thread enters or exits a method. ;Pointcut: This is the term given to the point of execution in the application at which cross-cutting concern needs to be applied. In our example, a pointcut is reached when the thread enters a method, and another pointcut is reached when the thread exits the method. ;Aspect: The combination of the pointcut and the advice is termed an aspect. In the example above, we add a logging aspect to our application by defining a pointcut and giving the correct advice. == Comparison to other programming paradigms == Aspects emerged out of [[object-oriented programming]] and [[computational reflection]]. AOP languages have functionality similar to, but more restricted than [[Metaobject|metaobject protocols]]. Aspects relate closely to programming concepts like [[subjects (programming)|subjects]], [[mixin]]s, and [[delegation (programming)|delegation]]. Other ways to use aspect-oriented programming paradigms include [[Composition Filters]] and the [[Hyper/J|hyperslices]] approach. Since at least the 1970s, developers have been using forms of interception and dispatch-patching that resemble some of the implementation methods for AOP, but these never had the semantics that the crosscutting specifications provide written in one place. Designers have considered alternative ways to achieve separation of code, such as [[C Sharp (programming language)|C#]]'s partial types, but such approaches lack a quantification mechanism that allows reaching several join points of the code with one declarative statement. == Adoption issues == Programmers need to be able to read code and understand what is happening in order to prevent errors.<ref>[[Edsger Dijkstra]], [http://www.cs.utexas.edu/users/EWD/ewd02xx/EWD249.PDF ''Notes on Structured Programming''], pg. 1-2</ref> Even with proper education, understanding crosscutting concerns can be difficult without proper support for visualizing both static structure and the dynamic flow of a program.<ref>[http://pp.info.uni-karlsruhe.de/uploads/publikationen/constantinides04eiwas.pdf ''AOP Considered Harmful''] </ref>Beginning in 2002, AspectJ began to provide IDE plug-ins to support the visualizing of crosscutting concerns. Those features, as well as aspect code assist and [[Code refactoring|refactoring]] are now common. Given the power of AOP, if a programmer makes a logical mistake in expressing crosscutting, it can lead to widespread program failure. Conversely, another programmer may change the join points in a program &ndash; e.g., by renaming or moving methods &ndash; in ways that the aspect writer did not anticipate, with [[unintended consequence]]s. One advantage of modularizing crosscutting concerns is enabling one programmer to affect the entire system easily; as a result, such problems present as a conflict over responsibility between two or more developers for a given failure. However, the solution for these problems can be much easier in the presence of AOP, since only the aspect needs to be changed, whereas the corresponding problems without AOP can be much more spread out. ==Implementations== The following [[programming language]]s have implemented AOP, within the language, or as an external library: *[[.NET Framework]] languages ([[C Sharp (programming language)|C#]] / [[Visual Basic .NET|VB.NET]])<ref>Numerous: [https://github.com/vc3/Afterthought Afterthought], [http://www.rapier-loom.net/ LOOM.NET], [http://www.codeplex.com/entlib Enterprise Library 3.0 Policy Injection Application Block], [http://sourceforge.net/projects/aspectdng/ AspectDNG], [http://www.castleproject.org/aspectsharp/ Aspect#], [http://composestar.sourceforge.net/ Compose*], [http://www.postsharp.org/ PostSharp], [http://www.seasar.org/en/dotnet/ Seasar.NET], [http://dotspect.tigris.org/ DotSpect (.SPECT)], [http://www.springframework.net/ Spring.NET] (as part of its functionality), [http://www.cs.columbia.edu/~eaddy/wicca Wicca and Phx.Morph], [http://setpoint.codehaus.org/ SetPoint]</ref> *[[ActionScript]]<ref>[http://www.as3commons.org/as3-commons-bytecode as3-commons-bytecode]</ref> *[[Ada (programming language)|Ada]]<ref>[http://www.adacore.com/uploads/technical-papers/Ada2012_Rational_Introducion.pdf Ada2012 Rationale]</ref> *[[AutoHotkey]]<ref>[http://www.autohotkey.com/forum/viewtopic.php?p=243426 Function Hooks]</ref> *[[C (programming language)|C]] / [[C++]]<ref>Several: [[AspectC++]], [http://wwwiti.cs.uni-magdeburg.de/iti_db/forschung/fop/featurec/ FeatureC++], [http://www.cs.ubc.ca/labs/spl/projects/aspectc.html AspectC], [http://www.aspectc.net/ AspeCt-oriented C], [http://www.bramadams.org/aspicere/index.html Aspicere]</ref> *[[COBOL]]<ref>[http://homepages.vub.ac.be/~kdeschut/cobble/ Cobble]</ref> *The [[Cocoa (API)|Cocoa]] [[Objective-C]] frameworks<ref>[http://www.ood.neu.edu/aspectcocoa/ AspectCocoa]</ref> *[[ColdFusion]]<ref>[http://www.coldspringframework.org/ ColdSpring]</ref> *[[Common Lisp]]<ref>[http://common-lisp.net/project/closer/aspectl.html AspectL]</ref> *[[Borland Delphi|Delphi]]<ref>[http://code.google.com/p/infra/ InfraAspect]</ref><ref>[http://code.google.com/p/meaop/ MeAOP in MeSDK]</ref><ref>[http://code.google.com/p/delphisorcery/ DSharp]</ref> *[[Delphi Prism]]<ref>[http://prismwiki.codegear.com/en/Cirrus RemObjects Cirrus]</ref> *[[E (verification language)|e]] (IEEE 1647) *[[Emacs Lisp]]<ref>[http://www.gnu.org/software/emacs/elisp/html_node/Advising-Functions.html Emacs Advice Functions]</ref> *[[Groovy (programming language)|Groovy]] *[[Haskell (programming language)|Haskell]]<ref>[[monad (functional programming)]] ({{cite paper | id = {{citeseerx|10.1.1.25.8262}} | title = Monads As a theoretical basis for AOP }}) and [http://portal.acm.org/citation.cfm?id=1233842 Aspect-oriented programming with type classes.]</ref> *[[Java (programming language)|Java]]<ref>Numerous others: [http://www.caesarj.org/ CaesarJ], [http://composestar.sourceforge.net/ Compose*], [http://dynaop.dev.java.net/ Dynaop], [http://jac.objectweb.org/ JAC], [[Google Guice]] (as part of its functionality), [http://www.csg.is.titech.ac.jp/~chiba/javassist/ Javassist], [http://ssel.vub.ac.be/jasco/ JAsCo (and AWED)], [http://www.ics.uci.edu/~trungcn/jaml/ JAML], [http://labs.jboss.com/portal/jbossaop JBoss AOP], [http://roots.iai.uni-bonn.de/research/logicaj LogicAJ], [http://www.objectteams.org/ Object Teams], [http://prose.ethz.ch/ PROSE], [http://www.aspectbench.org/ The AspectBench Compiler for AspectJ (abc)], [[Spring framework]] (as part of its functionality), [[Seasar]], [http://roots.iai.uni-bonn.de/research/jmangler/ The JMangler Project], [http://injectj.sourceforge.net/ InjectJ], [http://www.csg.is.titech.ac.jp/projects/gluonj/ GluonJ], [http://www.st.informatik.tu-darmstadt.de/static/pages/projects/AORTA/Steamloom.jsp Steamloom]</ref> **[[AspectJ]] *[[JavaScript]]<ref>Many: [http://i.gotfresh.info/2007/12/7/advised-methods-for-javascript-with-prototype/ Advisable], [http://code.google.com/p/ajaxpect/ Ajaxpect], [http://plugins.jquery.com/project/AOP jQuery AOP Plugin], [http://aspectes.tigris.org/ Aspectes], [http://www.aspectjs.com/ AspectJS], [http://www.cerny-online.com/cerny.js/ Cerny.js], [http://dojotoolkit.org/ Dojo Toolkit], [http://humax.sourceforge.net/ Humax Web Framework], [http://code.google.com/p/joose-js/ Joose], [[Prototype.js|Prototype]] - [http://www.prototypejs.org/api/function/wrap Prototype Function#wrap], [http://developer.yahoo.com/yui/3/api/Do.html YUI 3 (Y.Do)]</ref> *[[Logtalk (programming language)|Logtalk]]<ref>Using built-in support for categories (which allows the encapsulation of aspect code) and event-driven programming (which allows the definition of ''before'' and after ''event'' handlers).</ref> *[[Lua (programming language)|Lua]]<ref>[http://luaforge.net/projects/aspectlua/ AspectLua]</ref> *[[Matlab]]<ref>[http://www.sable.mcgill.ca/mclab/aspectmatlab/index.html]</ref> *[[make (software)|make]]<ref>[http://www.bramadams.org/makao/ MAKAO]</ref> *[[ML (programming language)|ML]]<ref>[http://www.cs.princeton.edu/sip/projects/aspectml/ AspectML]</ref> *[[PHP]]<ref>Several: [http://code.google.com/p/phpaspect/ PHPaspect], [http://www.aophp.net/ Aspect-Oriented PHP], [http://www.seasar.org/en/php5/index.html Seasar.PHP], [http://php-aop.googlecode.com/ PHP-AOP], [http://flow3.typo3.org/ FLOW3], [https://github.com/AOP-PHP/AOP AOP PECL Extension], [https://github.com/lisachenko/go-aop-php Go! AOP library]</ref> *[[Racket (programming language)|Racket]]<ref>[http://planet.racket-lang.org/display.ss?package=aspectscheme.plt&owner=dutchyn AspectScheme]</ref> *[[Perl]]<ref>[http://search.cpan.org/dist/Aspect/lib/Aspect.pm The Aspect Module]</ref> *[[Prolog]]<ref>[http://www.bigzaphod.org/whirl/dma/docs/aspects/aspects-man.html "Whirl"]</ref> *[[Python (programming language)|Python]]<ref>Several: [http://peak.telecommunity.com/ PEAK], [http://old.aspyct.org Aspyct AOP], [http://www.cs.tut.fi/~ask/aspects/aspects.html Lightweight Python AOP], [http://www.logilab.org/projects/aspects Logilab's aspect module], [http://pythius.sourceforge.net/ Pythius], [http://springpython.webfactional.com/reference/html/aop.html Spring Python's AOP module], [http://pytilities.sourceforge.net/doc/1.1.0/guide/aop/ Pytilities' AOP module]</ref> *[[Ruby (programming language)|Ruby]]<ref>[http://aspectr.sourceforge.net/ AspectR]</ref><ref>[http://aspectr-fork.sourceforge.net/ AspectR-Fork]</ref><ref>[http://aquarium.rubyforge.org/ Aquarium]</ref> *[[Squeak]] [[Smalltalk]]<ref>[http://www.prakinf.tu-ilmenau.de/~hirsch/Projects/Squeak/AspectS/ AspectS]</ref><ref>[http://csl.ensm-douai.fr/MetaclassTalk MetaclassTalk]</ref> *[[UML 2|UML 2.0]]<ref>[http://www.iit.edu/~concur/weavr WEAVR]</ref> *[[XML]]<ref>[http://code.google.com/p/aspectxml/ AspectXML]</ref> ==See also== * [[Aspect-oriented software development]] * [[Distributed AOP]] * [[Attribute grammar]], a formalism that can be used for aspect-oriented programming on top of [[functional programming languages]] * [[Programming paradigm]]s * [[Stability Model]] * [[Subject-oriented programming]], an alternative to Aspect-oriented programming * [[Executable UML]] * [[COMEFROM]]: Some elements of aspect-oriented programming have been compared to the joke [[COMEFROM]] statement.<ref>[[C2:ComeFrom]]</ref> * [[Decorator pattern]] * [[Domain-driven design]] ==Notes and references== {{reflist}} ==Further reading== * {{cite book | first = Gregor | last = Kiczales | coauthors = John Lamping, Anurag Mendhekar, Chris Maeda, Cristina Lopes, Jean-Marc Loingtier, and John Irwin | year = 1997 | title = Proceedings of the European Conference on Object-Oriented Programming, vol.1241 | chapter = Aspect-Oriented Programming | id = {{citeseerx|10.1.1.115.8660}} | pages = 220–242}} The paper generally considered to be the authoritative reference for AOP. * {{cite book | first = Andreas | last = Holzinger | coauthors = [[M. Brugger]], [[W. Slany]] | year = 2011 | title = Applying Aspect Oriented Programming (AOP) in Usability Engineering processes: On the example of Tracking Usage Information for Remote Usability Testing. In: Marca, D. A., Shishkov, B. & Sinderen, M. v. (Eds.) Proceedings of the 8th International Conference on electronic Business and Telecommunications. Sevilla, 53-56}} * {{cite book | first = Robert E. | last = Filman | authorlink = Robert E. Filman | coauthors = [[Tzilla Elrad]], [[Siobhán Clarke]], and [[Mehmet Aksit]] | year = 2004 | title = Aspect-Oriented Software Development | isbn = 0-321-21976-7}} * {{cite book | first = Renaud | last = Pawlak | authorlink = Renaud Pawlak | coauthors = [[Lionel Seinturier]], and [[Jean-Philippe Retaillé]] | year = 2005 | title = Foundations of AOP for J2EE Development | isbn = 1-59059-507-6}} * {{cite book | first = Ramnivas | last = Laddad | authorlink = Ramnivas Laddad | year = 2003 | title = AspectJ in Action: Practical Aspect-Oriented Programming | isbn = 1-930110-93-6}} * {{cite book | first = Ivar | last = Jacobson | authorlink = Ivar Jacobson | coauthors = and [[Pan-Wei Ng]] | year = 2005 | title = Aspect-Oriented Software Development with Use Cases | isbn = 0-321-26888-1}} * [http://www.cmsdevelopment.com/en/articles/aosdinphp/ Aspect-oriented Software Development and PHP, Dmitry Sheiko, 2006] * {{cite book | first = Siobhán | last = Clarke | authorlink = Siobhán Clarke | coauthors = and [[Elisa Baniassad]] | year = 2005 | title = Aspect-Oriented Analysis and Design: The Theme Approach | isbn = 0-321-24674-8}} * {{cite book | first = Raghu | last = Yedduladoddi | authorlink = Raghu Yedduladoddi | year = 2009 | title = Aspect Oriented Software Development: An Approach to Composing UML Design Models | isbn = 3-639-12084-1}} * "Adaptive Object-Oriented Programming Using Graph-Based Customization" – Lieberherr, Silva-Lepe, et al. - 1994 == External links == * Eric Bodden's [http://www.sable.mcgill.ca/aop.net/ list of AOP tools] in .net framework * [http://www.dreamincode.net/forums/blog/gabehabe/index.php?showentry=1016 Programming Styles: Procedural, OOP, and AOP] * [http://forum.codecall.net/java-help/26210-object-reading-writing.html Programming Forum: Procedural, OOP, and AOP] * [http://aosd.net/conference Aspect-Oriented Software Development], annual conference on AOP * [http://aosd.net/wiki AOSD Wiki], Wiki on aspect-oriented software development * [http://www.eclipse.org/aspectj/doc/released/progguide/index.html AspectJ Programming Guide] * [http://www.aspectbench.org/ The AspectBench Compiler for AspectJ], another Java implementation * [http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=AOP@work: Series of IBM developerWorks articles on AOP] * [http://www.javaworld.com/javaworld/jw-01-2002/jw-0118-aspect.html A detailed series of articles on basics of aspect-oriented programming and AspectJ] * [http://codefez.com/what-is-aspect-oriented-programming/ What is Aspect-Oriented Programming?], introduction with RemObjects Taco * [http://www.cis.uab.edu/gray/Research/C-SAW/ Constraint-Specification Aspect Weaver] * [http://www.devx.com/Java/Article/28422 Aspect- vs. Object-Oriented Programming: Which Technique, When?] * [http://video.google.com/videoplay?docid=8566923311315412414&q=engEDU Gregor Kiczales, Professor of Computer Science, explaining AOP], video 57 min. * [http://database.ittoolbox.com/documents/academic-articles/what-does-aspectoriented-programming-mean-to-cobol-4570 Aspect Oriented Programming in COBOL] * [http://static.springframework.org/spring/docs/2.0.x/reference/aop.html Aspect-Oriented Programming in Java with Spring Framework] * [http://www.sharpcrafters.com/aop.net Wiki dedicated to AOP methods on.NET] *[http://dssg.cs.umb.edu/wiki/index.php/Early_Aspects_for_Business_Process_Modeling Early Aspects for Business Process Modeling (An Aspect Oriented Language for BPMN)] * [http://www.cs.bilkent.edu.tr/~bedir/CS586-AOSD AOSD Graduate Course at Bilkent University] * [http://www.se-radio.net/podcast/2008-08/episode-106-introduction-aop Introduction to AOP - Software Engineering Radio Podcast Episode 106] * [http://innoli.com/en/Innoli-EN/OpenSource.html An Objective-C implementation of AOP by Szilveszter Molnar] * [https://github.com/forensix/MGAOP Apect-Oriented programming for iOS and OS X by Manuel Gebele] {{aosd}} {{DEFAULTSORT:Aspect-Oriented Programming}} [[Category:Aspect-oriented programming| ]] [[Category:Aspect-oriented software development]] [[Category:Programming paradigms]] [[ar:برمجة جانبية المنحى]] [[ca:Programació orientada a aspectes]] [[cs:Aspektově orientované programování]] [[de:Aspektorientierte Programmierung]] [[es:Programación orientada a aspectos]] [[fr:Programmation orientée aspect]] [[gl:Programación orientada a aspectos]] [[ko:관점 지향 프로그래밍]] [[it:Programmazione orientata agli aspetti]] [[nl:Aspectgeoriënteerd programmeren]] [[ja:アスペクト指向プログラミング]] [[pl:Programowanie aspektowe]] [[pt:Programação orientada a aspecto]] [[ro:Programarea orientată pe aspecte]] [[ru:Аспектно-ориентированное программирование]] [[sv:Aspektorienterad programmering]] [[te:ఆస్పెక్ట్ ఓరియెంటెడ్ ప్రోగ్రామింగ్]] [[th:การเขียนโปรแกรมเชิงลักษณะ]] [[tr:Cephe yönelimli programlama]] [[uk:Аспектно-орієнтоване програмування]] [[zh:面向侧面的程序设计]]'
Whether or not the change was made through a Tor exit node (tor_exit_node)
0
Unix timestamp of change (timestamp)
1354527076