News for hackers. Stuff that matters.
Re:How we improved our website's performance by brazzy on Sunday January 24, 2021 @03:12PM (#25895423)
"Modern" web development is apparently a game of Jenga.
Re:How we improved our website's performance by wackget on Sunday January 24, 2021 @05:16PM (#25896734)
Only because developers absolutely insist on building things that way, for some reason I will never comprehend.

What's the first thing most people do when starting a new project? They ask "what framework should I build this on?" and start their tiny portfolio site built upon a massively overpowered suite of enterprise-level software with a million features they'll never, ever need.

Then they might drop in ten or fifteen separate external libraries because using vanilla HTML, CSS, and JavaScript is just "so 1995".

Then they start thinking about AJAX and microservices because rendering an entire page on the server side is utterly unthinkable in 2021.

Then they cram the site full of third-party services (because your tiny home-brew website will definitely benefit from Newrelic monitoring).

Then they might start on unit testing.

Finally they package everything up using at least seven different dependency managers, because a Github project without 100 useless ancillary files (grunt.js, app.yaml, travis.yml, composer.json, .gitignore, etc. etc.) is obviously not acceptable.

And this is why I hate modern web development.

Re:How we improved our website's performance by xmprt on Sunday January 24, 2021 @05:32PM (#25896869)
I remember reading a blog post about a fake conversation between two developers about web development and one way telling the other about how "easy" it is and goes through a 5 step process of how to build their 1 page website. That was written at least 5 years ago and things have only gotten worse since then.
Re:How we improved our website's performance by halfmatthalfcat on Sunday January 24, 2021 @07:25PM (#25897661)
This is such a tired take. Logic has been moved from the backend to the frontend (again) which has justified the complexity.
Re:How we improved our website's performance by systemvoltage on Sunday January 24, 2021 @08:22PM (#25898002)
> This is such a tired take

Quite the opposite. It needs to be hammered into people. Your app isn't Notion or Google Docs. Your app is a form with a login menu and a couple of small logic elements and a date picker.

Re:How we improved our website's performance by phist_mcgee on Sunday January 24, 2021 @10:56PM (#25898889)
So what? Just because your application is simple, does not mean you need to use vanilla tools. Do you get mad at a carpenter for using a nail gun because he 'can more easily swing a hammer'? It is the application of tools not the tools themselves that is the problem.

I really can't understand why so many people rag on frontend development as if we (as frontend developers) are just magpies who gather shiny things and don't care about performance or simplicity.

Re:How we improved our website's performance by systemvoltage on Sunday January 24, 2021 @11:31PM (#25899152)
> I really can't understand why so many people rag on frontend development

May be you should try to listen to them more carefully and make an attempt to understand their woes.

Re:How we improved our website's performance by halfmatthalfcat on Sunday January 24, 2021 @11:44PM (#25899269)
The problem is, most of those complaining have never tried to understand the complexity (and why it exists) because they've never built a highly complex frontend application! They're degrees removed and just throw stones from their glass houses.

Guess what, I'm not picking Spring to make a simple REST api when it takes 5 lines in Expressjs. Why? Spring is complete overkill. So along those lines, should you use React/Redux/Redux-{Thunk,Promise,Observable}/Navigation/etc if you need a simple 2 page site? NO! Jesus christ, you pick the right tool for the right job.

There's a reason though, when you have a highly complex app with insane business rules (that could very well be hidden from the airmchair HN crowd) where you need that complexity. And guess what, if you're highly versed in these "complex" frontend tools (spoiler: they're not complex), then it makes building sites, generally, very easy.

So go ahead, believe what you want and continue to parrot the "the frontend ecosystem is hopeless, needlessly complex and godless" while the rest of us continue developing with these "complex" tools because they make our lives as developers easier.

I'll sleep happy while you wait that one more second for the page to load.

Re:How we improved our website's performance by ZephyrBlu on Monday January 25, 2021 @03:32AM (#25900831)
I agree with what you're saying.

I think what most people are frustrated about with the frontend ecosystem (And many other areas of software) is actually misuse of tools.

Re:How we improved our website's performance by zwaps on Sunday January 24, 2021 @08:43PM (#25898113)
I have a slow (apparently) work laptop and the web is horribly slow. Some pages feel like surfin' the pre 2000 web with all that lag and slow loading everytime anything moves.

For myself, I would appreciate more such takes.

Re:How we improved our website's performance by lwansbrough on Sunday January 24, 2021 @03:20PM (#25895512)
It certainly feels that way sometimes. But web is rather unique. There aren't any other platforms that demand you deliver an application for "a device" (specifications unknown!) in under 1 second.
Re:How we improved our website's performance by giantrobot on Sunday January 24, 2021 @04:11PM (#25896088)
That's why there's all kinds of helpful features in HTML/CSS like media queries. You can serve up raw content and let the device make decisions on what resources to use to display the content. You can tell the device the most optimal resources for its particular constraints.

As a for instance you your script tag can just include a bunch of @import statements. Thankfully @import statements support media queries [0]. So you get the utility of external style sheets but can load one optimized for the client device. Unlike media queries on link tags the browser doesn't load style sheets (well they're not supposed to) that don't match the media queries.

It's also trivial to include a tiny bit of base styling with every page in a script tag. It doesn't blow any size budgets and makes sure a page is readable even with no external assets.

[0] https://developer.mozilla.org/en-US/docs/Web/CSS/@import

Re:How we improved our website's performance by majewsky on Sunday January 24, 2021 @03:51PM (#25895872)
Web is indeed unique. No one else would consider a magazine article "an application".
Re:How we improved our website's performance by Frost1x on Sunday January 24, 2021 @04:09PM (#25896074)
There's such a thing as an unreasonable, unrealistic, or downright stupid demand as well. What you often see is a house of cards hacked together to try and support such demands on the web.

Sending reasonably well visually formated text is definitely a reasonable demand though.

Re:How we improved our website's performance by CharlesW on Sunday January 24, 2021 @03:19PM (#25895492)
I don't understand the point you're making. Mind elaborating?
Re:How we improved our website's performance by brazzy on Sunday January 24, 2021 @03:57PM (#25895943)
There is a ridiculous number of moving parts, stacked on top of each other, interacting in unforeseeable ways to allow you to shoot yourself in the foot, and absolutely nothing is straightforward.

OK, that basically describes any kind of software development, but web seems so much worse than anything else. And I say that as someone doing mainly Java backend development who's learned to live with the AbstractProxyFactoryManagerFactory jokes.

Re:How we improved our website's performance by CharlesW on Monday January 25, 2021 @11:31AM (#25905064)
Thanks! I appreciate the explanation.
Re:How we improved our website's performance by WillPostForFood on Sunday January 24, 2021 @08:05PM (#25897896)
And designing to please Google.