Aspect-oriented programming: Difference between revisions

Content deleted Content added
External links: fix broken extlink
Citation bot (talk | contribs)
Alter: pages, journal. Add: s2cid, isbn. Formatted dashes. | You can use this bot yourself. Report bugs here. | Suggested by SemperIocundus | via #UCB_webform
Line 220:
Indeed, the pointcut may depend on runtime condition and thus not be statically deterministic. This can be mitigated but not solved by static analysis and IDE support showing which advices ''potentially'' match.
 
General criticisms are that AOP purports to improve "both modularity and the structure of code", but some counter that it instead undermines these goals and impedes "independent development and understandability of programs".<ref name="steimann">{{Cite journal | doi = 10.1145/1167515.1167514| title = The paradoxical success of aspect-oriented programming| journal = ACM SIGPLAN Notices| volume = 41| issue = 10| pages = 481481–497| year = 2006| last1 = Steimann | first1 = F. | citeseerx = 10.1.1.457.2210}}, ([http://people.dsv.su.se/~johano/ioor/succ_aop.pdf slides] {{webarchive|url=https://web.archive.org/web/20160304060007/http://people.dsv.su.se/~johano/ioor/succ_aop.pdf |date=2016-03-04 }},[http://www.eecs.ucf.edu/~leavens/modular-aop/Discussion.pdf slides 2] {{webarchive|url=https://web.archive.org/web/20150923234021/http://www.eecs.ucf.edu/~leavens/modular-aop/Discussion.pdf |date=2015-09-23 }}, [http://www.oopsla.org/2006/submission/essays/the_paradoxical_success_of_aspect-oriented_programming.html abstract] {{webarchive|url=https://web.archive.org/web/20150924060711/http://www.oopsla.org/2006/submission/essays/the_paradoxical_success_of_aspect-oriented_programming.html |date=2015-09-24 }}), Friedrich Steimann, Gary T. Leavens, [[OOPSLA]] 2006</ref> Specifically, quantification by pointcuts breaks modularity: "one must, in general, have whole-program knowledge to reason about the dynamic execution of an aspect-oriented program."<ref>{{cite web|url=http://www.eecs.ucf.edu/~leavens/modular-aop/|title=More Modular Reasoning for Aspect-Oriented Programs|accessdate=11 August 2015|url-status=live|archiveurl=https://web.archive.org/web/20150812045258/http://www.eecs.ucf.edu/~leavens/modular-aop/|archivedate=12 August 2015}}</ref> Further, while its goals (modularizing cross-cutting concerns) are well understood, its actual definition is unclear and not clearly distinguished from other well-established techniques.<ref name="steimann"/> Cross-cutting concerns potentially cross-cut each other, requiring some resolution mechanism, such as ordering.<ref name="steimann"/> Indeed, aspects can apply to themselves, leading to problems such as the [[liar paradox]].<ref>{{cite web|url=http://www.fernuni-hagen.de/ps/pubs/FOAL2006.pdf|title=AOP and the Antinomy of the Liar|website=fernuni-hagen.de|accessdate=5 May 2018|url-status=live|archiveurl=https://web.archive.org/web/20170809201001/http://www.fernuni-hagen.de/ps/pubs/FOAL2006.pdf|archivedate=9 August 2017}}</ref>
 
Technical criticisms include that the quantification of pointcuts (defining where advices are executed) is "extremely sensitive to changes in the program", which is known as the ''fragile pointcut problem''.<ref name="steimann"/> The problems with pointcuts are deemed intractable: if one replaces the quantification of pointcuts with explicit annotations, one obtains [[Attribute-oriented programming|attribute-oriented programming]] instead, which is simply an explicit subroutine call and suffers the identical problem of scattering that AOP was designed to solve.<ref name="steimann"/>
Line 243:
*[[Emacs Lisp]]<ref>{{cite web|url=https://www.gnu.org/software/emacs/elisp/html_node/Advising-Functions.html|title=Emacs Advice Functions|website=gnu.org|accessdate=5 May 2018|url-status=live|archiveurl=https://web.archive.org/web/20111024211408/http://www.gnu.org/software/emacs/elisp/html_node/Advising-Functions.html|archivedate=24 October 2011}}</ref>
*[[Groovy (programming language)|Groovy]]
*[[Haskell (programming language)|Haskell]]<ref>[[Monad (functional programming)|Monad]]s allow program semantics to be altered by changing the type of the program without altering its code: {{cite journal | citeseerx = 10.1.1.25.8262 | title = Monads As a theoretical basis for AOP |journal = International Workshop on Aspect-Oriented Programming at ECOOP | first = Wolfgang | last = De Meuter | year = 1997}} {{cite journal | url = http://dl.acm.org/citation.cfm?id=2451457 | title = A Typed Monadic Embedding of Aspects | first1 = Nicolas | last1 = Tabareau | first2 = Ismael | last2 = Figueroa | first3 = Éric | last3 = Tanter | journal = Proceedings of the 12th annualAnnual internationalInternational conferenceConference on Aspect-oriented softwareSoftware developmentDevelopment | date = March 2013 | pages = 171–184 | doi = 10.1145/2451436.2451457 | isbn = 9781450317665 | s2cid = 27256161 }} [[Type class]]es allow additional capabilities to be added to a type: {{cite journal | first1 = Martin | last1 = Sulzmann | first2 = Meng | last2 = Wang | url = http://portal.acm.org/citation.cfm?id=1233842 | title = Aspect-oriented programming with type classes | journal = Proceedings of the 6th workshopWorkshop on Foundations of aspectAspect-oriented languagesLanguages | date = March 2007 | pages = 65–74 | doi = 10.1145/1233833.1233842 | isbn = 978-1595936615 | s2cid = 3253858 }}.</ref>
*[[Java (programming language)|Java]]<ref>Numerous others: [http://www.caesarj.org/ CaesarJ] {{webarchive|url=https://web.archive.org/web/20081219181529/http://caesarj.org/ |date=2008-12-19 }}, [http://composestar.sourceforge.net/ Compose*] {{webarchive|url=http://archive.wikiwix.com/cache/20050821193804/http://composestar.sourceforge.net/ |date=2005-08-21 }}, [http://dynaop.dev.java.net/ Dynaop] {{webarchive|url=https://web.archive.org/web/20070724061030/https://dynaop.dev.java.net/ |date=2007-07-24 }}, [http://jac.objectweb.org/ JAC] {{webarchive|url=https://web.archive.org/web/20040619135517/http://jac.objectweb.org/ |date=2004-06-19 }}, [[Google Guice]] (as part of its functionality), [http://www.csg.is.titech.ac.jp/~chiba/javassist/ Javassist] {{webarchive|url=https://web.archive.org/web/20040901095342/http://www.csg.is.titech.ac.jp/~chiba/javassist/ |date=2004-09-01 }}, [http://ssel.vub.ac.be/jasco/ JAsCo (and AWED)] {{webarchive|url=https://web.archive.org/web/20050411010213/http://ssel.vub.ac.be/jasco/ |date=2005-04-11 }}, [http://www.ics.uci.edu/~trungcn/jaml/ JAML] {{webarchive|url=https://web.archive.org/web/20050415091244/http://www.ics.uci.edu/~trungcn/jaml/ |date=2005-04-15 }}, [http://labs.jboss.com/portal/jbossaop JBoss AOP] {{webarchive|url=https://web.archive.org/web/20061017211354/http://labs.jboss.com/portal/jbossaop/ |date=2006-10-17 }}, [http://roots.iai.uni-bonn.de/research/logicaj LogicAJ] {{webarchive|url=https://web.archive.org/web/20060504154852/http://roots.iai.uni-bonn.de/research/logicaj/ |date=2006-05-04 }}, [http://www.objectteams.org/ Object Teams] {{webarchive|url=https://web.archive.org/web/20050831200910/http://objectteams.org/ |date=2005-08-31 }}, [http://prose.ethz.ch/ PROSE] {{webarchive|url=https://web.archive.org/web/20070124094344/http://prose.ethz.ch/ |date=2007-01-24 }}, [http://www.aspectbench.org/ The AspectBench Compiler for AspectJ (abc)] {{webarchive|url=https://web.archive.org/web/20141216200424/http://aspectbench.org/ |date=2014-12-16 }}, [[Spring framework]] (as part of its functionality), [[Seasar]], [http://roots.iai.uni-bonn.de/research/jmangler/ The JMangler Project] {{webarchive|url=https://web.archive.org/web/20051028191025/http://roots.iai.uni-bonn.de/research/jmangler/ |date=2005-10-28 }}, [http://injectj.sourceforge.net/ InjectJ] {{webarchive|url=https://web.archive.org/web/20050405080539/http://injectj.sourceforge.net/ |date=2005-04-05 }}, [http://www.csg.is.titech.ac.jp/projects/gluonj/ GluonJ] {{webarchive|url=https://web.archive.org/web/20070206010219/http://www.csg.is.titech.ac.jp/projects/gluonj/ |date=2007-02-06 }}, [http://www.st.informatik.tu-darmstadt.de/static/pages/projects/AORTA/Steamloom.jsp Steamloom] {{webarchive|url=https://web.archive.org/web/20070818100432/http://www.st.informatik.tu-darmstadt.de/static/pages/projects/AORTA/Steamloom.jsp |date=2007-08-18 }}</ref>
**[[AspectJ]]