A monolithic SPA approach turned into too much work when you'd have to throw out a bunch of code one day, replace it the next day with something just similar enough to cause a bunch of refactoring and bugs, etc.
In that context, it's easier to treat each page or major component as its own mini-SPA, then glue them together with a bare minimum of code.
For the same general reason, and to echo other comments, I recently chose Angular over React (or Vue) simply because Angular has a lot of built-in functionality that helps prevent a downward spiral of dependency maintenance from third party libraries and plugins, even if it's a little slower overall on many benchmarks.
That's for highly interactive pages of course, for simple pages that just need some regex validation or something, no framework is the best framework.
I had one project where we built a very beautiful, modern site that had about 50 lines of js in total. Of course your page-change times are going to be around 0.5s with an MPA, but SPAs are often slower than that anyway.
Note you can still use an MPA and have a dynamic UI using React/Knockout/whatever. It is just usually not done that way and most go full SPA.
AKA, a developer that knows the same framework your app uses, only has to learn about your specific application rather than all the background libraries/etc your using. Its the same reason for preferring a C programmer for a C position over a ruby programmer (or flip it). Sure the ruby programmer might be awesome and after a couple years more productive, but in the meantime they will be making a bunch of newbie C mistakes, and generally bootstrapping slower.
This is part of the reason i'm in favor of generally reducing the number of languages/frameworks in general use. Its better for everyone if we all agree on some simple baselines even if they may not be the most optimum for any given problem. The efficiencies of repeatedly avoiding a bunch of rookie mistakes (and then having to debug/fix/test them for the next few years) is well worth it in the long run.
Some sites explicitly don't want that, unfortunately.
I run several websites where advertisers pay to be on the website so that their brand can be associated with the content, and get viewed — just like a billboard or a TV commercial. None of them have Javascript. They're just plain images and links.
Also, a lot of ad content is "rich", animated, etc, also scripted.
In 1990s and early 2000s ads were mostly just images ("banners") served by an ad network, or even text links, without any scripting.
Mobile + desktop support is basically a hard requirement. A tablet-optimized version is nice to have.
This gets very hard to do well with just CSS.
Maybe I've been led astray, but from what i gathered about a year ago, media queries cannot distinguish between desktop and phone, you need JS to do this.
Please tell me I'm wrong about that (at least, if you give me a hint on how to do it).
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
Using that meta-tag, phones will respond to media queries around 240-360 pixels, depending on their screen size.I like to use bootstrap to not be bothered with media queries myself. But I only use small parts from bootstrap, and I opt-in/opt-out from specific parts by removing/adding includes to specific modules from bootstrap. (you can do that with the LESS or SASS version of the package, copy the generic "imports" file, and comment-out everything you don't want/need)
Bootstrap includes many sane defaults and some fixes for weird browsers. By choosing what to include and what not to include, I can choose whether I want bootstrap's opinionated styles or my own, and I can switch later (start out with bootstrap forms, customise them later & finally remove bootstrap form styles)
The alternative of feeding separate style sheets makes it easier to develop, but much harder to test even with the responsive design buttons in ff/chrome. That is probably also why I haven't seen many web apps that try to do everything with a single set of CSS pages recently.
This was once true, but not anymore. Grid and flex coupled with media queries solve this problem almost perfectly.
* Slow
* Bloated
* No images if you block cookies or js
* Paywalled. Asks for $5 membership every other day. Requiring deleting cookies to read articles
* Probably tracks the living shit out of visitors
* Somehow needs a ton of js to render a blog article
* Frequent divs in the middle of the screen asking to create an account
And they don't even produce content. It's all created by users.
I see business opportunity here.
Genuinly curious: do you see one without the annoying aspects you described? How would you monetize it?
> How would you monetize it
I wouldn't. Medium solves a non-problem. It only exists because VC funds have this tendency of pouring money over anything that resembles business.
However, Medium isn't too big to fail and I suspect its grace period is long past and now business decisions are mostly driven by shareholders seeking a favorable exit strategy. [1]
[1] https://marketingland.com/medium-will-eliminate-promoted-sto...
But if I really had to come up with a way to monetize Medium, I'd take a look at Wikipedia business model.
So my suggestion stands: There are lessons to be learned by looking at how Wikipedia manages without ads.
The behaviour of disabling Javascript represents an almost non-existent subset of web users and developers have more pressings things to think about.
This should be the takeaway from the article. There's absolutely no need for javascript on most websites that use javascript. I understand if you're forced into it by the time and economic contingencies of your work but if you bring JS frameworks home to your personal sites you're doing it wrong.