Background image
logologo symbol

5 - Back-end & Infrastructure

Back end - Next.js with Postgres

Description

Hello everyone and happy new year! I hope you are happy to start this hard core coding module in this darkest time of the year with a style.
This first guide on a new year is all about getting to know Next.js. We used to have Express as the first thing to learn in the back end but recently express has been losing popularity and nobody is using it in the working life in Iceland while almost everyone is using Next.js. With the App Router, which has been the recommended way to build Next.js apps since 2023, it has become one of the most sophisticated frameworks for React. io.vefskoli.is is also made with that framework. Although, when we go to Las Palmas, be prepared that the Danish and the Spanish students will probably want to use Express since they know that much better...
Their official guide is very good and touches on everything that is so important in web development except for REST API but we will do a guide on that later in this module. It even has a "Learn React Foundations" precourse in case you would like to recap a bit what we were doing last year.

Topics

Client side
  • Server side
  • SSR (Server Side Rendering)
  • SR (Static Rendering)
  • CSR (Client Side Rendering)
  • Databases
  • Hosting
  • Relational Database
  • Goals

    Knowledge

    Understand the difference between client side and server side
    Understand what a database is
    Understand the journey of data from the database, through the server side and to the client side
    Understand different ways of rendering data
    Understand what Authentication is

    Skills

    Be able to make a full stack application
    Be able to create, edit and remove entries in a database
    Be able to connect a database to a client
    Be able to read documentation and follow official tutorials

    Idea for return

    The journey of data in a Next.js app: the browser sends a request to the Next.js server, which queries Postgres and sends HTML back. Below that, the three places HTML can be built: static rendering ahead of time, server rendering per request, and client rendering in the browser.
    This guide is all about doing the tutorial on the official Next.js page. The link is in the materials section, or you can just click here. You can skip chapter 10 if you would like but all the other chapters are very important.
    When you have finished the tutorial play a bit around with the final solution, change it a bit or add some data to the database and then return it here.