4 ms·
This is the common excuse given for bloated JavaScript usage but it ignores the realities of what is happening on the web. People are building simple blogs with
by Touche 8y ago
This is the common excuse given for bloated JavaScript usage but it ignores the realities of what is happening on the web. People are building simple blogs with JavaScript frameworks. People are building their 2 form field login page with JavaScript frameworks.
It's just inaccurate to take the most complex thing you can create and act as though that's the norm; it's not. Websites still exist, and people are using the most complex tech to create those too.
- steve76 8y agoWhat I would like is a way to build static websites programmatically. Javascript builds the page, and I throw in a npm which does all this for me.
- PretzelFisch 8y agoThis is just the problem our industry has. Hammer is popular, everyone learns hammer. Now all problems are solved with a hammer.
- jaredklewis 8y agoI think there is always going to be a certain tension between two conflicting desires: A) The desire to use the right tool for the right job B) The desire to have fewer, more versatile tools It's understandable that people don't want to learn dozens of different languages, frameworks, and libraries. There is a real cost to gaining knowledge and experience with all those tools, and a real benefit to knowing a single tool really well. On the other hand I often find more tailored tools can be much more powerful for their suited tasks. But then again it's also true that the scope of projects is always shifting, so sometimes you can outgrow the specific use case of a tool. Anyway, I would say it isn't clear (to me at least) that our industry has a "problem."
- gorpomon 8y agoI ask in the spirit of friendliness, is this really an issue, or is this something that feels like one? I'm hard pressed to imagine WordPress having login forms done in a JS Framework, and that's a big chunk of the web. If they are doing that, then you're right, it's totally unnecessary. But I'm guessing the folks at Automattic are optimizing this stuff for their clients (but I concede that I could be wrong here). As far as blogs in these tech stacks, if they're developer blogs then that makes total sense. A dev blogging about React would probably choose React for their blog since that's a live production laboratory for any React code. I had a website in Ruby on Rails for years because I was a Rails dev and it was easy to try stuff out. Are there any concrete stats on actual mismatch? Do we know how many recipe blogs are using Angular or React? My guess is their bloat is from tons of scripts and not from a developer using a tool that is wrong for the job. That bloat is at its heart a UI/business problem. Analytics, pop-ups, sharing links, referrals and that entire class of web objects IMO opinion are UI/business concerns, and they'll continue as long as folks find those things valuable.
- Touche 8y agoYes, it's a real issue. There's even a VC funded startup that specializes in a React based blogging tool: https://www.gatsbyjs.org/ https://www.gatsbyjs.org/. If you work as a web developer there's just no denying it; using a SPA framework has become the default for all new projects, full stop, regardless of the type of project. For data, look up often reported stats on JS size.
- jakelazaroff 8y agoWhen did progressive enhancement become a bad thing? Gatsby generates static files with functional markup, then layers React on top of that for an even better experience. Try loading e.g. https://overreacted.io https://overreacted.io with JavaScript disabled. It works perfectly.
- Touche 8y agoPick any article on that page. Scroll to the bottom and refresh. In a tradition site the browser would remember your scroll position. Here it doesn't, likely due to using client-side routing in JavaScript. So instead you're taken to the start of the article each time. It's this type of detail that's really difficult to get right when you choose to opt-out of decades of iteration and do everything yourself.
- jakelazaroff 8y agoSure, but "not retaining scroll position on refresh" is hardly a case of throwing the baby out with the bathwater.
- Touche 8y agoYou can't dismiss this bug like that. Having multiple tabs open and having those tabs get taken out of memory and needing to refresh is a very common thing to happen. This is a bad bug for this particular website. Now, you said that by layering a SPA on top that an "even better experience" is provided. What exactly is the better experience? Just navigating around the site a bit I don't see anything particularly dynamic about it at all.