3 ms·
Show HN: Aspect-oriented mixins in JavaScript
- own3r 11y agoNice idea! Here's an alternative which uses ES2016 decorators https://github.com/mgechev/aspect.js https://github.com/mgechev/aspect.js
- yangmillstheory 11y agoThanks for sharing! Have you studied aspect-oriented programming formally? I used the term "aspect-oriented" because a co-worker mentioned it and it seemed appropriate, but I don't have a deep understanding of that philosophy. I'll take a look at your code, blog posts, and videos later when I get out of work. :)
- deleted 11y ago[deleted]
- drostie 11y agoVery cool. I'm very interested to see what you'll build with it. With any cross-cutting abstraction like this, it's kind of like developing a new potting soil: I feel like I need to know what flowers you're trying to grow to understand why you made the choices you made.
- yangmillstheory 11y agoThanks. I was writing an application that had unrelated components that all acted like view models. I looked at existing mixin libraries, but found some that either injected themselves into the prototype chain or patched Function.prototype to let mixees customize behavior. I didn't like that, so I thought of this approach. The rest has been a continuous process of simplification, but I never got back to writing that old application :).
- bricss 11y agoIt's everything but AOP
- yangmillstheory 11y agoyeah, i should probably change that tonight