LOOM.NET

The LOOM.NET project aims to investigate and promote the usage of AOP in the context of the Microsoft .NET framework.

The concept of aspect-oriented programming (AOP) offers an interesting alternative for the specification of non-functional component properties (such as fault-tolerance properties or timing behaviour), as well as other crosscutting concerns. These are implemented as so-called aspects and at some point "weaved" to the other functional parts of the software.

The LOOM.NET approach is an approach that offers both: a static and a dynamic aspect weaver. The project was started in 2001 with the advent of Microsoft.Net and subsequently we released the first available aspect weaver for .NET. Like no other AOP-frameworks LOOM.NET significantly influences the Microsoft.NET AOP community.

Realized as a class library, LOOM.NET allows the language-independend definition of aspect code in the form of standard .NET classes. Both aspect weavers are fully binary compatible. Aspects written for Rapier-LOOM.NET would work with Gripper-LOOM.NET and vice versa.

Gripper-LOOM.NET

Gripper-LOOM.NET is the newest member of the LOOM.NET weaver family. It is based on the Rapier-LOOM.NET weaver library, but allows the weaving to happen statically before runtime by a command line utility, therefore making the result of the weaving process permanent. It operates on binary .NET assemblies and is therefore not restricted to C# (as AspectJ is restricted to Java) but applicable to all .NET languages.

screenshot of LOOM.NET Static Aspect Weaver

The syntax for defining aspects is very similar to the syntax used by Rapier-LOOM.NET. However, Gripper-LOOM.NET overcomes some of the limitations of the dynamic weaver: For instance the weaving of methods is not limited to virtual calls.

A very first version of the weaver is available in our download section. Note that the weaver is still in its early stages and not ready for productive use. It is also quite likely that syntax and semantics for defining aspects and connection points will be extended for the final version. Static Weaver

A forerunner of the Gripper-LOOM.NET project was an aspect weaver working by extension through class inheritance. This weaver is an application in stable beta state, but will not be developed any further. The screenshot shows the GUI of this static weaver that we also plan to include in a future version of Gripper-LOOM.NET.

Rapier-LOOM.NET

Rapier-LOOM.NET is a dynamic aspect weaver. It provides its functionality through an assembly which has to be linked to your .NET project. Aspect weaving happens during runtime. You can define aspect classes and interweave them with target classes by using a the weavers factory method Create.

Woven Type built from Target and Aspect Class

An aspect class is a special .NET class with methods constructors and fields as well. At defined join points an aspect class becomes interwoven with a target class. Interweaving, strictly speaking, means that an aspect method will be interwoven with a target class method. The aspect method itself contains the aspect code and is defined within the aspect class. It has a special aspect method attribute applied. This aspect method attribute declares a method in the aspect class as an aspect method. Not necessarily every method in an aspect class is an aspect method and has this attribute applied. Methods without this attribute will not be considered for the weaving process.

Beside the aspect method attributes, Rapier-LOOM.NET defines nearly a dozen of pointcut attributes. These attributes are used to describe which methods should become interwoven with the aspect method. Examples for these attributes are Include, Exclude and IncludeAll.

A target class is a regular .NET class. The one and only restriction is that target class methods (which should become interwoven) either have to be virtual or to be defined via an interface. The weaving process will be initiated during runtime with a factory. Instead of using the new operator one uses the weavers factory method to produce interwoven objects.

Publications

  • Wolfgang Schult. Architektur Komponenten-basierter Systeme mit Loom: Aspekte, Muster, Werkzeuge. Cuvillier Verlag, June 2009. ISBN 3869550317. URL: https://web.archive.org/web/2023/https://www.hpi.de/forschung/publikationen/dissertationen/dissertation-wolfgang-schult.html. [ PDF | ]
    ×
    @book{schult2009architektur,
    author = "Schult, Wolfgang",
    title = "{Architektur Komponenten-basierter Systeme mit Loom: Aspekte, Muster, Werkzeuge}",
    type = "Dissertation",
    tags = "wolfgang.schult,doctoral-thesis,loom",
    year = "2009",
    month = "June",
    publisher = "Cuvillier Verlag",
    pdf = "https://web.archive.org/web/2023/http://hpi.de/fileadmin/user\_upload/hpi/navigation/10\_forschung/30\_publikationen/15\_dissertationen/diss\_schult.pdf",
    isbn = "3869550317",
    url = "https://web.archive.org/web/2023/https://www.hpi.de/forschung/publikationen/dissertationen/dissertation-wolfgang-schult.html"
    }
  • Andreas Rasche and Wolfgang Schult. Dynamic Updates of Graphical Components in the .NET Framework. In Communication in Distributed Systems-15. ITG/GI Symposium, 1–12. VDE, 2007. [ PDF | ]
    ×
    @inproceedings{rasche2007dynamic,
    author = "Rasche, Andreas and Schult, Wolfgang",
    title = "{Dynamic Updates of Graphical Components in the .NET Framework}",
    tags = "andreas.rasche,wolfgang.schult,loom",
    booktitle = "Communication in Distributed Systems-15. ITG/GI Symposium",
    pages = "1--12",
    year = "2007",
    organization = "VDE",
    pdf = "https://pdfs.semanticscholar.org/60c9/80774f3abe746a6a99db4c351799f8e080a6.pdf"
    }
  • Andreas Rasche, Wolfgang Schult, and Andreas Polze. Self-adaptive Multithreaded Applications: A Case for Dynamic Aspect Weaving. In Proceedings of the 4th workshop on Reflective and adaptive middleware systems. 2005. [ PDF | ]
    ×
    @inproceedings{rasche2005self,
    author = "Rasche, Andreas and Schult, Wolfgang and Polze, Andreas",
    title = "{Self-adaptive Multithreaded Applications: A Case for Dynamic Aspect Weaving}",
    tags = "andreas.rasche,wolfgang.schult,andreas.polze,loom",
    booktitle = "Proceedings of the 4th workshop on Reflective and adaptive middleware systems",
    pdf = "https://dl.acm.org/doi/pdf/10.1145/1101516.1101526",
    year = "2005"
    }
  • Kai Köhne, Wolfgang Schult, and Andreas Polze. Design by Contract in .NET Using Aspect Oriented Programming. 2005. [ PDF | ]
    ×
    @misc{kohne2005design,
    author = {K{\"o}hne, Kai and Schult, Wolfgang and Polze, Andreas},
    title = "{Design by Contract in .NET Using Aspect Oriented Programming}",
    year = "2005",
    tags = "kai.koehne,wolfgang.schult,andreas.polze,loom",
    pdf = "https://citeseerx.ist.psu.edu/document?repid=rep1\&type=pdf\&doi=2e9f7862257191919603241bd2ab511533ce3baf",
    publisher = "Citeseer"
    }
  • Wolfgang Schult, Peter Troeger, and Andreas Polze. LOOM.NET – An Aspect Weaving Tool. In Workshop on Aspect-Oriented Programming, ECOOP, volume 3. 2003. [ PDF | ]
    ×
    @inproceedings{schult2003loom,
    author = "Schult, Wolfgang and Troeger, Peter and Polze, Andreas",
    title = "{LOOM.NET -- An Aspect Weaving Tool}",
    tags = "wolfgang.schult,peter.troeger,andreas.polze,loom",
    booktitle = "Workshop on Aspect-Oriented Programming, ECOOP",
    volume = "3",
    pdf = "https://www.researchgate.net/profile/Peter\_Troeger/publication/266089438\_LOOM\_NET-An\_Aspect\_Weaving\_Tool/links/547b74f30cf293e2da2d71f5/LOOM-NET-An-Aspect-Weaving-Tool.pdf",
    year = "2003"
    }
  • Peter Tröger and Andreas Polze. Object and Process Migration in .NET. In Proceedings of the Eighth International Workshop on Object-Oriented Real-Time Dependable Systems, 2003.(WORDS 2003)., 139–146. IEEE, 2003. [ PDF | ]
    ×
    @inproceedings{tröger2003object,
    author = "Tröger, Peter and Polze, Andreas",
    title = "{Object and Process Migration in .NET}",
    tags = "peter.troeger,andreas.polze,loom",
    booktitle = "Proceedings of the Eighth International Workshop on Object-Oriented Real-Time Dependable Systems, 2003.(WORDS 2003).",
    pages = "139--146",
    year = "2003",
    pdf = "https://www.researchgate.net/profile/Andreas-Polze/publication/4026546\_Object\_and\_process\_migration\_in\_NET/links/09e4150fdb56a1f361000000/Object-and-process-migration-in-NET.pdf",
    organization = "IEEE"
    }
  • Wolfgang Schult and Andreas Polze. Speed vs. Memory Usage – An Approach to Deal with Contrary Aspects. Proceedings of the 2nd International Conference on Aspect-Oriented Software Development (AOSD2003), 2003. [ PDF | ]
    ×
    @article{schult2003speed,
    author = "Schult, Wolfgang and Polze, Andreas",
    title = "{Speed vs. Memory Usage -- An Approach to Deal with Contrary Aspects}",
    journal = "Proceedings of the 2nd International Conference on Aspect-Oriented Software Development (AOSD2003)",
    tags = "wolfgang.schult,andreas.polze,loom",
    year = "2003",
    pdf = "https://www.researchgate.net/profile/Andreas\_Polze/publication/2555933\_Speed\_vs\_Memory\_Usage\_-\_An\_Approach\_to\_Deal\_with\_Contrary\_Aspects/links/09e4150fdb56bb56da000000/Speed-vs-Memory-Usage-An-Approach-to-Deal-with-Contrary-Aspects.pdf",
    publisher = "Citeseer"
    }
  • Wolfgang Schult and Andreas Polze. Dynamic Aspect-weaving with .NET. In Workshop zur Beherrschung nicht-funktionaler Eigenschaften in Betriebssystemen und Verteilten Systemen 2002. 2002. [ PDF | ]
    ×
    @inproceedings{schult2002dynamic,
    author = "Schult, Wolfgang and Polze, Andreas",
    title = "{Dynamic Aspect-weaving with .NET}",
    tags = "wolfgang.schult,andreas.polze,loom",
    booktitle = "Workshop zur Beherrschung nicht-funktionaler Eigenschaften in Betriebssystemen und Verteilten Systemen 2002",
    pdf = "https://osm.hpi.de/publications/downloads/schult2002dynamic.pdf",
    year = "2002"
    }
  • Wolfgang Schult and Andreas Polze. Aspect-oriented Programming with C# and .NET. In Proceedings Fifth IEEE International Symposium on Object-Oriented Real-Time Distributed Computing. ISIRC 2002, 241–248. IEEE, 2002. [ PDF | ]
    ×
    @inproceedings{schult2002aspect,
    author = "Schult, Wolfgang and Polze, Andreas",
    title = "{Aspect-oriented Programming with C\\# and .NET}",
    tags = "wolfgang.schult,andreas.polze,loom,dcl",
    booktitle = "Proceedings Fifth IEEE International Symposium on Object-Oriented Real-Time Distributed Computing. ISIRC 2002",
    pages = "241--248",
    year = "2002",
    pdf = "https://www.researchgate.net/profile/Andreas\_Polze/publication/3948612\_Aspect-Oriented\_Programming\_with\_C\_andNET/links/0046352a03e8893c39000000/Aspect-Oriented-Programming-with-C-andNET.pdf",
    organization = "IEEE"
    }

Source Code

The source code for Rapier-LOOM.NET and Gripper-LOOM.NET is available for download.

License

This License governs use of the accompanying software, and your use of the software constitutes acceptance of this license.

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

You may use this software for any non-commercial purpose, subject to the restrictions in this license. Non-commercial purposes include teaching, academic research, and personal experimentation. You may also distribute this software with books or other teaching materials, or publish the software on websites, that are intended to teach the use of the software.

You may not use or distribute this software or any derivative works in any form for commercial purposes. Commercial purposes include but are not limited to running business operations, licensing, leasing, or selling the software, or distributing the software for use with commercial products.