A list of puns related to "Aspect oriented programming"
Hi All,
Anybody know is there intention to introduce aspects into the language? Even with all really nice improvements in C++20, cross-cutting concerns are still issue in the codebases I saw recently. (Logging, etc..)
Thx
I'm reading a book Clean Code by Uncle Bob (it was on my shelf of a while) and he describes Aspect Oriented Programming. Wikipedia say that ELisp advice function is implementation of AOP.
Does any of you was experimenting with Aspect Oriented Programming in lisp language? Does it give any advantage?
Couldn't wrap my head around it even after Googling it numerous times.
Aspect-oriented programming is a very appealing concept for simplifying your codebase, creating clean code, improving modularity, structure of code and minimizing copy-paste errors.
Today, in most cases, weaving aspect's advices is implemented at the bytecode level, i.e. after compilation, a certain tool Β«weaveΒ» an additional byte code with the support of the required logic.
Our approach (as well as the approach of some other tools) is modifying the source code to implement aspect logic. With introduction of the .NET Compiler Platform (aka Roslyn), it is quite easy to achieve this goal, and the result gives certain advantages over the modification of the byte code itself.
You may think that aspect-oriented programming is not for you and does not particularly concern you, just a bunch of incomprehensible words, but in fact it is much easier than it seems, this is about the problems of real world product development and if you are a software developer, then you and your project can definitely get benefit from using it.
Especially in medium-large sized projects of a corporate level, where the requirements for the functionality of the products are formalized. For example, there may be a requirement β when setting the configuration flag, log all input parameters for all public methods. Or for all methods in a project to have a notification functionality that will send a message when a certain threshold of the execution time of a method is exceeded.
How would you do it without AOP? Either you ignore the rule and do it only for the most important parts of your program, or when writing new methods, you do copy-paste of similar code from neighboring methods, and you could imagine what copy-paste approach brings with it.
With AOP, it is very easy, you write an advice an apply it to the whole project's code and the job is done. When you need to update the logic, you will again update just the advice and it will be re-applied on the next transformation. Without AOP, some many updates throughout the project code, that most probably you will implement the changes only to the critical parts and leave everything else as is.
On the plus side is that your code will not look like a crater covered moon landscape, because it is sprinkled with such functionality, the same way as moon sprinkled with craters and when reading the code it looks like mixed with white noise.
It is my feeling that aspect-oriented programming in .Net ecosystem is significantly less popular in c
... keep reading on reddit β‘I had read about AOP at
I found out that AOP also solves the Expression Problem to some extent, but I'm curious about should I include that feature in my programming language?
For some comparison:
So, can anyone pinpoint the advantage and disadvantage of having AOP built into a language?
It seems like Unit Testing is a natural aspect, like logging and error handling.
Has anyone identified good patterns for treating unit tests as aspects of code?
If you like AOP a la AspectJ, please kick the tires on our new library https://www.npmjs.com/package/@scispike/aspectify for exclusively decorator-driven AOP.
We'd like to get your feedback!
Hi guys,
came across PostSharp a couple nights ago and tried the free trial. Im completely blown away by all this. You can hook into methods and inject stuff (though MSIL manupilation it looks like) at runtime. You can intercept methods completely, access runtime parameter values, you can create MI-controller like structures, defer method execution to inner controller objects... All of this is amazing.
I have two small concerns. One being its quite pricey, but thats not really too big of an issue. The main one is maintainability. There seems to be a fair amount of compiler magic and hidden code, which i tend to dislike because its difficult to really predict the behavior of everything.
Any thoughts on this and PostSharp in general?
What do you think about the usage of AOP (http://en.wikipedia.org/wiki/Aspect-oriented_programming) in PHP? I'm collecting use-cases, real life examples and negative experience with this paradigm.
To give your some ideas about AOP I put here some great examples of AOP usage: mocking framework (https://github.com/Codeception/AspectMock), Design-by-Contract programming (https://github.com/lisachenko/php-deal), autowiring (https://gist.github.com/lisachenko/6345683). This list is not full and can be extended with new solutions and possibilities. Java world actively uses this paradigm for logging, caching and transaction control because it's smart and developer-friendly. BTW, your Jira tracker is powered by AOP too )
If you are interested in this question, you can also subscribe to the github issue: https://github.com/lisachenko/go-aop-php/issues/154
Please, share your thoughts or questions to make this technique more transparent for PHP developers or just RT this tweet https://twitter.com/lisachenko/status/486477985974071297. If you have a wish to help me with documentation about AOP in English - you are welcome )
I'm reading a book Clean Code by Uncle Bob (it was on my shelf of a while) and he describes Aspect Oriented Programming. Wikipedia say that ELisp advice function is implementation of AOP.
Does anyone of you have experience with AOP in any other LISP language? Does it give any advantage? Are there any Scheme/Racket/CommonLisp libraries for Aspect Oriented Programming?
I created a really basic project to demonstrate how Aspect Oriented Programming can be used in an Android project.
If you're interested in trying out AOP then it's a pretty simple base project to get started with.
Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.