You have ruined JavaScript
I have no idea why the author tries to judge a framework by a stackoverflow post. A lot of the examples are needlessly verbose and some are even wrong, like the "providerprovider" he rightly mocks.<p>Well, how about we look into the actual documentation?<p><a href="https://docs.angularjs.org/guide/providers" rel="nofollow">https://docs.angularjs.org/guide/providers</a><p>What you find is that you define a provider like so:<p><pre><code>    myApp.provider('Car' //...
</code></pre>
and then, if you want to configure it, you inject it with the suffix 'Provider' into your config function (called when launching the app):<p><pre><code>    myApp.config(["CarProvider", function(CarProvider) { //...
</code></pre>
So - what's so ridiculous about that?<p>----<p>Next up he still does not seem to understand the difference between Services, Factories and Providers. That's cool and all and might even prompt some to, you know, investigate further and assume that maybe they haven't understood it correctly yet before clicking "must blog now" button. He jumps the shark (straight to ridicule) by making up his very own nonsense:<p>> <i>Of course we we can configure providers if we need to configure our applications. How else could we configure our applications and make them configurable for our enterprise scale configurable applications.</i><p>You know, actually the distinction makes perfect sense. A provider is an object that you know you will want to configure globally before it is being used (data source providers, url routers etc.). A service sits on the other end of the spectrum and is being called freshly right when you need it (more in the direction of the pure objects he has in mind). Factories sit in between those two - they cannot be configured ahead of the application, but allow for more internal functionality instead of just returning an object.<p>Having the distinction helps people editing the code figure out what they want to do and others, in turn, to understand what the other programmer was up to. Yes, you can use them somewhat interchangeably, but that's life for you: things overlap. How well and strict they are used <i>is up to the programmer</i>.<p>Now, I'm not bashing plain, custom OOP Javascript - If that's your thing, by all means do it, knock yourself out! But what's with the hating on people who seem to have a different approach? Wouldn't it be healthier to first try to understand where <i>they</i> are coming from? Surely they can't all be totally in love with wasting their time on "ruining it".<p>----<p>In the end what this comes down to is that the author doesn't seem to have sufficient experience with the kinds of environments that make the structures in AngularJS not just pleasant, but actually a life saver. That's fine - we don't need to all have the same perspective. I just don't get this style of argumentation that boils down to "don't understand, must bash".<p>He also makes fun (as does one of the SO comments) of this quote from the (old?) angular docs:<p>> <i>An Angular "service" is a singleton object created by a "service factory". These service factories are functions which, in turn, are created by a "service provider". "The service providers are constructor functions". When instantiated they must contain a property called $get, which holds the service factory function.</i><p>You know what? Fuck it. When I tried to understand the Servicy/Factory/Provider distinction, I stumbled upon the same SO post and you know what ended up being the perfect way of understanding it? Forcing myself to go back to that paragraph right there <i>until I understood it</i>.<p>> <i>No, you are not reading a thesis, you are reading the angular docs apparently. If it were a thesis it would probably be trying to explain a solution to some sort of problem instead of describing a made up solution to a made up problem. (Actually, that's not strictly true because academics are in a world of their own too but close enough).</i><p>> <i>It's okay, I don't really do enterprise any more.</i><p>I'm as sceptical as the next guy about frameworks, hate "enterprise" with a fiery passion and I escaped academia before it fried my brain.<p>But I don't think myself too cool to do my due dilligence before dismissing something that I very obviously don't understand yet.