Hacker News new | ask | show | jobs
by bertolo1988 3187 days ago
Someone please explain me the difference between Override, Extend, Plugin and Mixin.

And what happens when i apply all of them in any order to a given method.

Could you also explain why basing your development on overriding and extending seemed like a good idea? Were people that scared of HTML and CSS?

1 comments

Extend subclasses, mixin composes into a new class (like traits), override and plugin augment existing classes, with override replacing existing methods (which can break with every new release), and plugin fitting into a hook that remains compatible across releases.

All makes perfect sense to me. They’re standard OO techniques, the novelty was introducing them to JS developers.