DEV Community

Discussion on: Gatsby vs Next.JS - What, Why and When?

Collapse
 
stanleysuen profile image
Stanley Suen

Hi, I am one day old in knowing Gatsby and 6 hours new to Next.js. Thanks for your great article. I would like to reconfirm a few questions after reading your article:

1) When you say Gatsby being less suitable for sites with thousands of pages, I suppose you mean page type right? Thousand of blog posts with contents feeding from other CMS such as WordPress and Strapi do not count as thousands of pages right but just one or two pages (listing + post details). So that's why Gatsby can be used for some kind of blog site.

2) If I want to build an industry specialised twitter like site with user able to submit their tweets, Gatsby can be up to the task right? This is a fun project just to give myself a goal to guild my learning. I don't mean to push to production.

3) I am an outdated-programmer. So naturally if I can get away with less coding, it will be better. Based on this constraint, should I start with Gatsby or Next.js?

Thanks a million for anyone helping.

Collapse
 
akshaytolwani123 profile image
akshaytolwani123

I can answer question 2. Gatsby is not suitable for this. It is a dynamic website in every way. Unless you use nift or hugo it is not even a possibility. You see in normal static site generator a user would update a file and wait a few minutes for the site to build. But in this site the user expects the tweet to be visible to everyone instantaneously. The reason I do not recommend gatsby is that a small site takes around 2 seconds to build on netlify. You could run a dev server in hugo and which updates when a change is made and since hugo can build in milliseconds you could do that as a mini project and the site will reload automatically. But if traffic increases you will need to lazy load everything since the html file is extremely large so use next. If you really wanna use gatsby follow this guide netlify.com/blog/2020/06/11/5-opti... and make sure there is not much activity.

Collapse
 
stanleysuen profile image
Stanley Suen

Thanks. I was hoping for something simple for this rusty programmer to build something amazing but deep down I kind of know Gatsby is not the solution. Anyway, it's not Gatsby's fault but mine unrealistic requirements.