News for hackers. Stuff that matters.
Re:Inside a viral website by camillomiller on Wednesday March 31, 2021 @09:29AM (#26647010)
The main takeaway for me:

> In my day job, we use Next.js for almost everything we build. It’s a framework built on top of React that just strips out almost all the complexity of building fairly complicated websites. Obviously, this wasn’t a complicated website, but I went with what I’m most familiar with.

When you have a hammer, everything looks like a nail :D

Edit to say that I think it's an amazing little wholesome project and the author's very funny. Didn't want my comment to sound too harsh. :)

Re:Inside a viral website by _wldu on Wednesday March 31, 2021 @09:33AM (#26647049)
Going with what you know is not always bad. It is the fastest way to get something done (if not the most efficient). And, he did not have time to learn something new.
Re:Inside a viral website by soneca on Wednesday March 31, 2021 @09:42AM (#26647171)
Well, in my view this was actually a very fitting nail for the hammer he had.
Re:Inside a viral website by camillomiller on Wednesday March 31, 2021 @10:52AM (#26648073)
I disagree, most of what the website does wouldn't necessarily need all the next.js superstructure. It's a very simple and modular page. That said, mine definitely wasn't a strong criticism.

I also think the process explanation was very enjoyable.

Re:Inside a viral website by soneca on Wednesday March 31, 2021 @10:56AM (#26648117)
In this sense, I see Nextjs more like a Swiss Army knife than a hammer. And the author (and the Vercel CEO tweets) explained that he used the exact right tools of it.

In the end, it was a static page that handled an incredible amount of traffic.

Re:Inside a viral website by redisman on Wednesday March 31, 2021 @01:33PM (#26650271)
This is a news event related meme site. Of course you should use what you have muscle memory for so you can ship it in one day. Who cares if some other framework the author doesn't know would have done the job
Re:Inside a viral website by camillomiller on Wednesday March 31, 2021 @04:35PM (#26652791)
This comment is gold. Big news: There’s intelligent life outside frameworks.
Re:Inside a viral website by BrandoElFollito on Wednesday March 31, 2021 @11:50AM (#26648783)
I am an amateur dev and since I more or less learned Vue and the Quasar framework, every web site looks like a Vue&Quasar nail to me.

It works - i can pop out sites that work in a mall amount of time. They will never be istheshipstillstuck.com-famous or cnn.com-loaded, or never be used in some countries where loading 10 MB of JS is a problem.

they are used by me, on my 1000/400 Mbps connection, or by my children on a LAN.

So having a hammer that works-sort-of-always-but-not-optimal is better than having a stupendous ultra-refined tool that is the exact fit for the work - but requires 100 hours to learn and 430 pages of docs translated by Google from Swahili to French.

Re:Inside a viral website by camillomiller on Wednesday March 31, 2021 @04:39PM (#26652832)
This is the point. Why do you all think just in damn frameworks!? There’s a thing called HTML5+CSS+JS. You could have built that static page in no time with that, that’s my surprisingly misunderstood point here.
Re:Inside a viral website by dragonwriter on Wednesday March 31, 2021 @05:05PM (#26653180)
> There’s a thing called HTML5+CSS+JS. You could have built that static page

The web platform itself is a framework that consumes static HTML and CSS and calls into your JS. Preferring a higher-level framework for web apps when that is available is no different than preferring a higher level language even though ASM is available for local apps.

Re:Inside a viral website by BrandoElFollito on Wednesday March 31, 2021 @04:51PM (#26653020)
quasar create hello

cd hello

quasar dev

→ I have a page and a dev server

After adding a few lines I have the components all in the right place.

quasar build

→ I have my static page

One line changed, I have a PWA

I will not do a PhD in development, I need to have simple reactive apps quickly.

Of course I could have use HTML/CSS/JS and write everything from scratch (been there, done that). Of course they will load 2 x faster, so I will not have to wait the 200 ms I do now.

Development today is so much easier. When I started 30 years ago it was truly an adventure. Today my children are coding simple stuff after one afternoon of showing them.

So yay to the frameworks, modules and others things that help people who just wish to build something fast.

Have you ever bought furniture or do you start by taking your axe and visiting the nearest forest?

Re:Inside a viral website by herbertl on Wednesday March 31, 2021 @10:00AM (#26647382)
One part of me is a huge proponent of learning, but the other part of me is learning (lol) that a huge part of earning involves figuring out what you already know or have invested energy/time/cost into learning, and finding ways to create value for others from it. This was a nice way of doing that, and this posts squeezes the extra value from that experience by sharing insights on going viral.

In no way am I saying the only reason for learning is business—there's plenty of intrinsic value. But all that learning has to subsidized with something...

From a business perspective, there's a good chance there's more than a handful of earning opportunities right under each of our very noses every day. The key is to find the ones that align with our strengths, personalities, skillsets, etc...

Re:Inside a viral website by MetaWhirledPeas on Wednesday March 31, 2021 @09:58AM (#26647359)
Honest question for someone who is not a web developer: why not use Next.js?
Re:Inside a viral website by BrandoElFollito on Wednesday March 31, 2021 @04:53PM (#26653049)
From someone who codes for pleasure: there are simpler frameworks (my favorite is Quasar and Vue - I needed an afternoon to learn that coming with a crude HTML/CSS/JS basic knowledge)
Re:Inside a viral website by deckard1 on Wednesday March 31, 2021 @03:00PM (#26651505)
if you need a static site, there are a thousand generators out there much easier to use than React+nextjs. Some of these are easy enough that a non-developer can use and update.

Using code to generate static sites is not new or particularly interesting. We have been caching PHP and Perl sites so that they are "static" since the dawn of the web. CDNs are really really old now. It feels like a new batch of developers don't know that caching is a thing and "static" is a hot buzzword.

Re:Inside a viral website by camillomiller on Wednesday March 31, 2021 @04:44PM (#26652927)
A lot of developers are also so caught into framework thinking that they seem to forget that writing html5, with CSS and some lightweight JavaScript library if you need any is an absolutely elegant way to build a modern static website. It seems to me that too many web devs can’t conceive anymore that a static website can be WRITTEN easily and fast and does NOT always have to be generated by a generator or a framework.
Re:Inside a viral website by F_J_H on Wednesday March 31, 2021 @02:50PM (#26651379)
Thank goodness for creative people who think of new and ingenious ways to use tools differently than originally intended. It's the heart of innovation.