zoukankan      html  css  js  c++  java
  • The Present AOP Frameworks in .Net


    Return to Contents


    3. The Present AOP Frameworks in .Net

    (This chapter is based on my old article - “.Net AOP Frameworks Research Report v1.1”, for integration of this series of articles, I integrate it here.)

    3.1 Aspect#

    Version: 2.1.1.0 beta

    Link: http://aspectsharp.sourceforge.net/

    Dependency: antlr, Castle.DynamicProxy

    Description:
    Aspect# is an AOP (Aspect Oriented Programming) framework for the CLI (.Net and Mono). It relies on DynamicProxy and offers a built-in language to declare and configure aspects, and is compliant to AopAlliance. It became part of the Castle Project in June 2005.

    Main Features:
    - Custom mini configuration language, not xml.
    - Mix/Intercept classes and methods through dynamic proxy approach. 

    Restrictions:
    - Classes to be created dynamic proxy for shouldn’t be sealed and only virtual methods can be intercepted.
    - Using intercepted classes is not completely transparent to users that users should explicit create the dynamically proxied class through the AspectEngine.
    - No static weaving support. 

    3.2 AspectDNG

    Version: 0.7 beta 

    Link: http://sourceforge.net/projects/aspectdng

    Dependency: mono.petoolkit, rail 

    Description:
    AspectDNG is a .NET aspect weaver, that's to say a tool that can "transplant" code into an existing assembly. This transplant is made after the standard .NET compilation, which means that both aspect and the so called "base" code (the one the transplant will be operated on) can be developed in any programming language that is compatible with .NET CLS. Another way to say that: AspectDNG works on assemblies (EXE or DLL) that may have been created out of C#, VB.NET, Eiffel.NET, Managed C++...  

    Main Features:
    - Xml, XPath based configuration file format.
    - IL level static Weaving.
    - Custom xml based disassembled language ILML which can be used to convert assemblies to and be modified/combined and then converted to assemblies. 

    Restrictions:
    - Static weaving only.
    - Not very stable. 

    3.3 Eos

    Version: 0.3.3 beta 

    Link: http://www.cs.virginia.edu/~eos

    Dependency: none 

    Description:
    Eos is an aspect-oriented extension for C# on Microsoft® .NET Framework™. Eos aims to improve upon the current aspect-oriented language model in three dimensions. First, it generalizes aspect instantiation & advice weaving model to eliminate the need for the work-arounds that are unavoidable today when aspects are used to express certain crosscutting concerns. Second it generalizes the join point model. Third it aims to eliminate the distinction between class and aspect constructs in favor of a single conceptual building block that combines the expressive capabilities of current classes and aspects, significantly improving conceptual integrity and uniformity in language design. The language is very similar to AspectJ except for constructs which are not implemented in Eos and constructs which AspectJ does not provides. 

    Main Features:
    - AspectJ like extended C# language and custom compiler.

    Restrictions:
    - Static weaving only.
    - It seems no source code provided.
    - Not very stable. 

    3.4 Encase

    Version: 0.7 beta 

    Link: http://theagiledeveloper.com/category/15.aspx

    Dependency: none 

    Description:
    Encase is an aspect oriented programming framework for the .NET Platform written in C#. Encase is unique in that it provides aspects to be applied during runtime in managed code rather then being configuration file based that other AOP frameworks rely upon. The advantage of applying aspects in this way is that it promotes productivity to developers new and/or unfamiliar with AOP. 

    Restrictions:
    - Encase cannot mixin multiple classes that implement a shared interface? For instance, if class A implements IAlphabet, and class B implements IAlphabet, classes A and B can not both be mixed in as an aspect.
    - Encase can only provide interception and aspect weaving to virtual (overridable) methods and properties.
    - Encase is unable to apply aspects to sealed (Not Inheritable) classes.
    - Like Aspect#, but more unstable. 

    3.5 Loom.Net

    Version: 1.5 Beta2 

    Link: http://www.dcl.hpi.uni-potsdam.de/research/loom/

    Dependency: none 

    Description:
    The LOOM .NET project aims to investigate and promote the usage of AOP in the context of the Microsoft .NET framework. We have been developing two AOP tools (so called weavers) that all implement different approaches to weaving: A runtime weaver crating weaved objects on the fly and a static weaver. 

    Main Features:
    - Support under .Net Framework 2.0 beta
    - Include both dynamic proxy based dynamic interception and il level rail like static weaving support. 

    Restrictions:
    - The static weaver seems not very stable. 

    3.6 Other Frameworks 

    AspectC# (AspectJ like C# extended compiler)
    Link: http://www.dsg.cs.tcd.ie/index.php?category_id=169

    Weave.NET (provide a load-time il level weaving implementing)
    Link: http://www.dsg.cs.tcd.ie/index.php?category_id=194

  • 相关阅读:
    2017.12.07 postgresql使用with recursive完成迭代查询
    jackson/fastJson boolean类型问题
    postgres sql merge upsert
    postgresql 清除数据并清除自增ID
    elasticsearch7.2深度分页实现(查询全部数据)
    SpringBoot集合SpringSecurity流程及代码详解和导图详解
    SpringBoot整合JWT框架及JWT介绍
    浅析JWT中token过期后解析报错ExpiredJwtException的解决及过期之后如何进行后续业务处理
    SpringSecurity整合JWT一些异常了解及处理io.jsonwebtoken.SignatureException: JWT signature does not match locally computed signature解决及UnsupportedJwtException:Signed Claims JWSs are not supported
    浅析request.getInputStream()得到的流及接参流程
  • 原文地址:https://www.cnblogs.com/teddyma/p/233386.html
Copyright © 2011-2022 走看看