Hands-On Full Stack Development with Spring Boot 2 and React
eBook - ePub

Hands-On Full Stack Development with Spring Boot 2 and React

Build modern and scalable full stack applications using Spring Framework 5 and React with Hooks, 2nd Edition

Juha Hinkula

Condividi libro
  1. 316 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Hands-On Full Stack Development with Spring Boot 2 and React

Build modern and scalable full stack applications using Spring Framework 5 and React with Hooks, 2nd Edition

Juha Hinkula

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

A comprehensive guide to building full stack applications covering frontend and server-side programming, data management, and web security

Key Features

  • Unleash the power of React Hooks to build interactive and complex user interfaces
  • Build scalable full stack applications designed to meet demands of modern users
  • Understand how the Axios library simplifies CRUD operations

Book Description

React Hooks have changed the way React components are coded. They enable you to write components in a more intuitive way without using classes, which makes your code easier to read and maintain. Building on from the previous edition, this book is updated with React Hooks and the latest changes introduced in create-react-app and Spring Boot 2.1.

This book starts with a brief introduction to Spring Boot. You'll understand how to use dependency injection and work with the data access layer of Spring using Hibernate as the ORM tool. You'll then learn how to build your own RESTful API endpoints for web applications. As you advance, the book introduces you to other Spring components, such as Spring Security to help you secure the backend. Moving on, you'll explore React and its app development environment and components for building your frontend. Finally, you'll create a Docker container for your application by implementing the best practices that underpin professional full stack web development.

By the end of this book, you'll be equipped with all the knowledge you need to build modern full stack applications with Spring Boot for the backend and React for the frontend.

What you will learn

  • Create a RESTful web service with Spring Boot
  • Grasp the fundamentals of dependency injection and how to use it for backend development
  • Discover techniques for securing the backend using Spring Security
  • Understand how to use React for frontend programming
  • Benefit from the Heroku cloud server by deploying your application to it
  • Delve into the techniques for creating unit tests using JUnit
  • Explore the Material UI component library to make more user-friendly user interfaces

Who this book is for

If you are a Java developer familiar with Spring, but are new to building full stack applications, this is the book for you.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Hands-On Full Stack Development with Spring Boot 2 and React è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Hands-On Full Stack Development with Spring Boot 2 and React di Juha Hinkula in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Informatica e Programmazione in JavaScript. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2019
ISBN
9781838823269

Section 1: Backend Programming with Spring Boot

The reader will be familiar with the basics of Spring Boot. This section focuses on the knowledge and skills required to use databases and create RESTful web services.
This section covers the following chapters:
  • Chapter 1, Setting Up the Environment and Tools – Backend
  • Chapter 2, Dependency Injection
  • Chapter 3, Using JPA to Create and Access a Database
  • Chapter 4, Creating a RESTful Web Service with Spring Boot
  • Chapter 5, Securing and Testing Your Backend

Setting Up the Environment and Tools - Backend

In this chapter, we will set up the environment and tools needed for backend programming with Spring Boot. Spring Boot is a modern Java-based backend framework that makes development faster than traditional Java-based frameworks. With Spring Boot, you can make a standalone web application that has an embedded application server.
In this chapter, we will look into the following topics:
  • Building an environment for Spring Boot development
  • The basics of the Eclipse IDE and Maven
  • Creating and running Spring Boot projects
  • Problem solving when running Spring Boot applications

Technical requirements

The Java SDK, version 8 or higher, is necessary to use the Eclipse IDE. In this book, we are using the Windows operating system, but all tools are available for Linux and macOS as well.
Download the code for this chapter from GitHub: https://github.com/PacktPublishing/Hands-On-Full-Stack-Development-with-Spring-Boot-2-and-React-Second-Edition/tree/master/Chapter01.

Setting up the environment and tools

There are a lot of different integrated development environment (IDE) tools that you can use to develop Spring Boot applications. In this book, we are using Eclipse, which is an open source IDE for multiple programming languages. We will create our first Spring Boot project by using the Spring Initializr project starter page. The project is then imported into Eclipse and executed. Reading the console log is a crucial skill when developing Spring Boot applications.

Installing Eclipse

Eclipse is an open source programming IDE developed by the Eclipse Foundation. An installation package can be downloaded from https://www.eclipse.org/downloads. Eclipse is available for Windows, Linux, and macOS. You should download the latest version of the Eclipse IDE for Java EE developers.
You can either download a ZIP package of Eclipse or an installer package that executes the installation wizard. If using the ZIP package, you just have to extract the package to your local disk and it will contain an executable Eclipse.exe file that you can run by double-clicking on the file.

The basics of Eclipse and Maven

Eclipse is an IDE for multiple programming languages, such as Java, C++, and Python. Eclipse contains different perspectives for your needs. A perspective is a set of views and editors in the Eclipse workbench. The following screenshot shows common perspectives for Java development:
On the left-hand side, we have Project Explorer, where we can see our project structure and resources. Project Explorer is also used to open files by double-clicking on them. The files will be opened in the editor, which is located in the middle of the workbench. The Console view can be found in the lower section of the workbench. The Console view is really important because it shows application logging messages.
You can get Spring Tool Suite (STS) for Eclipse if you want, but we are not going to use it in this book, because the plain Eclipse installation is enough for our purposes. STS is a set of plugins that makes Spring application development simpler (https://spring.io/tools).
Apache Maven is a software project management tool. The basis of Maven is the Project Object Model (POM). Maven makes the software development process simpler and it also unifies the development process. You can also use another project management tool, called Gradle, with Spring Boot, but in this book, we will focus on using Maven.
The POM is a pom.xml file that contains basic information about the project. There are also all the dependencies that Maven should download to be able to build the project.
Basic information about the project can be found at the beginning of the pom.xml file, which defines, for example, the version of the application, packaging format, and so on.
The minimum version of the pom.xml file should contain the project root, modelVersion, groupId, artifactId, and version.
Dependencies are defined in the dependencies section, as follows:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.packt</groupId>
<artifactId>cardatabase</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>cardatabase</name>
<description>Demo project for Spring Boot</description>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.3.RELEASE</ver...

Indice dei contenuti