Published on

Next.js as The Coolest Web Framework

Authors
thumbnail

The use of information technology has become commonplace in society through various means, such as web applications. Web applications are utilized by many people in different sectors, including the trade/e-commerce sector, as seen in platforms like Tokopedia, and in e-learning, exemplified by the web application Scele used by students at the Faculty of Computer Science, University of Indonesia. In its usage, a web application must exhibit good performance when accessed by numerous users to avoid disrupting the workflow within the application. In addition to performance, web applications need to be optimized for search engines (SEO - Search Engine Optimization). There are web frameworks that support both good performance and SEO, and one such example is NextJs.

What Is Next.js ?

Next.js is a framework used by developers to create web applications. It is based on the React Js library, making it easy for users familiar with React Js to transition to Next.js seamlessly. Additionally, Next.js uses the JavaScript programming language for operation. Next.js was developed by a team known as Vercel and is available for developers to use for free. Beginners can refer to the documentation provided by Vercel to learn how to use the framework and can deploy their applications on Vercel's servers.

Advantages

img

The Next.js framework offers numerous advantages for users of web applications. In terms of performance, Next.js provides options that enhance application loading speed, such as:

  • Next Image, reducing the size of image files
  • SSG (Static Site Generator), enabling the user's browser to load files without waiting for the server to render them.
  • Only one HTML file for each request on the web.
  • Next.js also allows developers to configure search keywords, thereby improving the SEO value of applications using the Next SEO feature.

Disadvantages

Despite its many advantages, Next.js does have some drawbacks. The Next.js community is smaller compared to other frameworks like Laravel, mainly because Next.js emerged as a framework in 2016. Next.js does not yet offer State Management for related data, requiring developers to use other libraries such as Redux. Next.js is a feature-rich web application framework that enhances application performance and SEO value. Its use allows applications to be used more effectively by a larger audience without disrupting the smooth flow of business processes. However, developers should be aware of the framework's limitations and seek solutions to address them.

Getting Started with Next.js

img

Vercel, as the creator of the framework, has developed modules that developers can use to create a boilerplate before starting to write code. Additionally, there are several tools that must be installed on the computer, namely:

  • Node.js, checked through node -version in the command line
  • npm, checked through npm -version in the command line

If both of these are installed, users can open the target empty folder and run

npm install -g create-next-app

Wait until the process is finished and then run command :

npx create-next-app

After that, we can run the development server using command :

npm run dev

And the application can be accessed through http://localhost:3000

Reference :