I wouldn't say cocoon so much as I would say that it's an echo-chamber. The outright LIES used by so many frameworks over how "easy" they make things or how much more "productive" they make you, or even how it "helps collaboration" are endlessly parroted and anyone who DARES to question it, much less JOE FORBID prove that it's a lie ends up as ostracized as a black atheist at a Klan rally.
Simply put the behavior of most people using frameworks -- PARTICULARLY HTML/CSS/JS ones -- is cult-like. It in fact shows signs of actual psychological conditioning such as confirmation bias and cognitive dissonance. They've used it long enough, and been told so many times that it was "easier" they are incapable of accepting any evidence to the contrary. This is only further worsened by the fact that MOST of the fans of these systems NEVER learned enough about the underlying languages to even flap their huffing yap about it!
You see this with HTML all the time, where the vast majority of mouth-breathers vomiting up pages with bootcrap don't know enough HTML to realize how badly they are shtupping themselves by making MORE WORK!!! More work in the form of two to ten times the HTML needed. Same goes for the CSS side with idiocy like LESS/SASS/SCSS that just shows people don't know how to use selectors; or tossing garbage like BEM on top which all-combined results in endlessly and pointlessly slopping classes onto EVERYTHING.
As I often say, if you don't know what's wrong with this:
<nav class="navbar navbar-toggleable-md navbar-inverse fixed-top bg-inverse">
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="#">Site Title</a>
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
You have ZERO damned business writing a website! That ANYONE would call that train wreck of developer ineptitude "easier" or apply any of the other wild unfounded claims about bootcrap to it. The ONLY explanation for said behavior is a confirmation bias having resulted from an echo-chamber of ritualistic indoctrination, and a utter/complete ignorance of how to write HTML or CSS.
Hence why any SANE developer that actually knows how to use HTML and CSS properly would likely not have written anything more than this for that same page:
<div id="top">
<h1><a href="/">Site title</a></h1>
<input type="checkbox" id="mainMenuShowHide">
<label for="mainMenuShowHide"></label>]
<ul id="mainMenu">
<li class="current"><a href="#">Home <span>(current)</span></a></li>
(yes, no NAV -- since that 5-tard tag is redundant to either the first H2 or HR on the page!)
It's why whenever I see someone duped into using bootcrap, my advice is to go find a stick to scrape it off with.
... and again, it all goes back to the core 7 propaganda techniques. Admittedly, a few of them you'll tread into regardless of what side you are on (I fall into name-calling a lot if you couldn't tell -- mostly out of frustration and exasperation) but some are decidedly more prominent on the framework and/or off the shelf solution side of things. I often mention them, but let's actually cover this properly.
1) Name calling -- now, yeah. I do this a lot; mea culpa... but the blatant in your face name calling I do is too crass and direct to actually qualify as the propaganda technique. Words like "dreamer" or "elitist" are far less inflammatory but are common. One of the best you'll see used by framework advocates against people saying "just use the damned languages correctly instead" is to call us "exclusionary" or "snobbish"... more so though is the name-calling by exclusion, by CLAIMING to be "easier" it's saying that the underlying language is hard. Unfounded claims repeatedly parroted about how something great is is both name calling AND our next golden gem:
2) glittering generalities -- what is "easier"? "simpler"? They're very EASY words to use, but can they back that up with working examples? The answer is more often than not no, and if they CAN "back it up" it's usually an outright lie thanks to:
3) Card stacking -- picking and choosing examples that favor their techniques when what they are comparing to no SANE developer would ever use.
A great example of card stacking comes from the audio encoding world and the nutters who insist on FLAC for everything. They ALWAYS compare to 128kbps MP3 as what their over-the-top exceeds human hearing by a factor of 40 format is superior to, saying that MP3 is shit because of it... but MP3 can do variable bitrate, higher bitrates, delivering quite easily at variable with a 256kbps upper limit audio that far exceeds human hearing. Or the BS about how 24 bit audio playback is "better" when the human ear can only distinguish around 28 thousand distinct audio levels below the pain threshold -- meaning unless these bragging rights higher numbers whackjobs are intentionally causing hearing damage to themselves, FIFTEEN BITS EXCEEDS THE NEEDS OF AUDIO ENCODING.
But they have their own little echo-chambers of like-minded head-bobbers and yes men to help reinforce their claims, bringing us to EXACTLY what we're talking about here:
4) BANDWAGON! Everyone else is doing it. Everyone else says it meets the claims, what's wrong with you? Why aren't you like us? Join us! Join us now!
Peer pressure, ritualistic indoctrination, until you end up with a nation of people waving their flags higher than the rest, reciting their SOCIALIST pledge louder and prouder, and shaming those who won't stand for the tone deaf anthem the most -- all whilst being first in line to trample on EVERYTHING those SYMBOLS stand for like a bunch of second-rate idolaters!
You see the same thing in programming, particularly with frameworks. It ends up a bit like the hobbyist who's only tool is a hammer - suddenly everything looks like a nail to them; and whilst yes, you can drive a screw with a hammer (or as Uncle Red would call it, a flathead screwdriver) it's not even going to hold as well as the handyman's secret weapon: duck tape.
Of course, bandwagon relies almost exclusively on:
5) Testimonial. This is pretty obvious given the raging hardon for blockquotes on the websites of various frameworks, libraries, etc -- but it goes deeper than that. Again these symposiums, conventions, and their ilk are platforms by which the people behind these systems and those using it can be exposed to like-minded folk singing its praises. "it worked for me". It's why it goes hand-in-hand with bandwagon, and our NEXT technique as well:
6) Plain folks. Some people incorrectly interpret this to mean "common clay" or "blue collar types" but what it really means is PEERS. People at the same level as you. "Plain folks" for Harvard graduates who show up to work in a different thousand dollar suit a day are people who went to another ivy league school and do the same. (In that way I think the term for this technique is inaccurate). In our case, "plain folks" is just other programmers who are able to talk the talk. Beginners are especially susceptible to this since a plain folks testimonial from another beginner leads them to look deeper, until they find all sorts of other like-minded plain-folks testimonials, leading them down the path to bandwagon!
The final technique is a bit more... intangible. Also, apologies ahead of time for what I'm about to do.
7) Transfer. It is used quite often in politics (again, apologies for going here) where a card stacking glittering generality like "A Real American" can be used as a campaign slogan. Everyone loves a "real american" so they are using the first two techniques to create a transfer of that love. Slogans like "make America Great Again" are a form of transfer, bandwagon, AND is a glittering generality as your idea of great might not be my idea -- but by using such a slogan anyone against it "must not want it to be great". THAT is transfer.
Sometimes even just a visual queue such as a waving flag behind a candidate on a TV spot or a Souza march in the background is designed to prey upon bandwagon and established confirmation bias -- that's transfer.
When it's REALLY used to its best, its so subtle it is hard to recognize. USUALLY it's done by way of those glittering generalities, such as "easier" or "simpler". If you watch a few 3AM infomercials you'll see transfer by way of generalities are the bread and butter of such snake oil peddling.
... and the laugh is? I just used it, in a way you probably didn't even notice. BY MAKING IT POLITICAL. Note, I did NOT say which side I'm for or against above, I just mentioned it in a neutral manner that could stir the emotions of either side for or against. By triggering that emotion, I COULD have said almost anything I wanted using a simile and made it stick like glue. You set up and trigger that emotional response, what follows will be interpreted however the hell you want it to be; and the masses will fall for it EVERY SINGLE TIME!
Transfer done properly is insidious, pervasive, and often invisible if you aren't looking for it. Above I used the ham-fisted version, but you go to some of these conclaves, camps, etc devoted to these subjects, and it's far, far more subtle... but really you'll see ALL of the above seven classic propaganda techniques being slathered on like frosting... but sadly when you cut into it you find out it's that fondant crap everyone scrapes off and throws away; no matter how pretty it looked.
... and I just did it again.
That's why really it's not a cocoon programmers live in at all, it's a bunch of echo-chambers where lies, propaganda, and outright bunko snake oil peddling has taken the place of facts, intelligence, and learning. JUST like a religious extremism, political extremism, or any other extremist social movement. Once they've got you in the hooks of their LIES, it is very difficult to change that BELIEF no matter how many facts you present... and the lame excuses people will come up with and wild accusations about you personally they will resort to in order to preserve that confirmation bias only proves that the psychological failing of cognitive dissonance has taken root.
Of course, as I've said several times, once you learn to recognize the above techniques it is VERY difficult to do much of anything without feeling like you're wearing the sunglasses from the movie "They Live" -- it is everywhere, ALL the time, in EVERYTHING. Consume, Be Happy, Work, Procreate, Stay Asleep.