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

  1. 316 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et 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

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

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.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Hands-On Full Stack Development with Spring Boot 2 and React est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Hands-On Full Stack Development with Spring Boot 2 and React par Juha Hinkula en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Informatik et Programmierung in JavaScript. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
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...

Table des matiĂšres

  1. Title Page
  2. Copyright and Credits
  3. Dedication
  4. About Packt
  5. Contributors
  6. Preface
  7. Section 1: Backend Programming with Spring Boot
  8. Setting Up the Environment and Tools - Backend
  9. Dependency Injection
  10. Using JPA to Create and Access a Database
  11. Creating a RESTful Web Service with Spring Boot
  12. Securing and Testing Your Backend
  13. Section 2: Frontend Programming with React
  14. Setting Up the Environment and Tools - Frontend
  15. Getting Started with React
  16. Consuming the REST API with React
  17. Useful Third-Party Components for React
  18. Section 3: Full Stack Development
  19. Setting Up the Frontend for Our Spring Boot RESTful Web Service
  20. Adding CRUD Functionalities
  21. Styling the Frontend with React Material-UI
  22. Testing Your Frontend
  23. Securing Your Application
  24. Deploying Your Application
  25. Best Practices
  26. Assessments
  27. Other Books You May Enjoy
Normes de citation pour Hands-On Full Stack Development with Spring Boot 2 and React

APA 6 Citation

Hinkula, J. (2019). Hands-On Full Stack Development with Spring Boot 2 and React (2nd ed.). Packt Publishing. Retrieved from https://www.perlego.com/book/969840/handson-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-pdf (Original work published 2019)

Chicago Citation

Hinkula, Juha. (2019) 2019. Hands-On Full Stack Development with Spring Boot 2 and React. 2nd ed. Packt Publishing. https://www.perlego.com/book/969840/handson-full-stack-development-with-spring-boot-2-and-react-pdf.

Harvard Citation

Hinkula, J. (2019) Hands-On Full Stack Development with Spring Boot 2 and React. 2nd edn. Packt Publishing. Available at: https://www.perlego.com/book/969840/handson-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-pdf (Accessed: 14 October 2022).

MLA 7 Citation

Hinkula, Juha. Hands-On Full Stack Development with Spring Boot 2 and React. 2nd ed. Packt Publishing, 2019. Web. 14 Oct. 2022.