Reader small image

You're reading from  Spring Boot and Angular

Product typeBook
Published inDec 2022
Reading LevelBeginner
PublisherPackt
ISBN-139781803243214
Edition1st Edition
Languages
Right arrow
Authors (2):
Devlin Basilan Duldulao
Devlin Basilan Duldulao
author image
Devlin Basilan Duldulao

Devlin Basilan Duldulao is a full-stack engineer with over 8 years of web, mobile, and cloud development experience. He has been a recipient of Microsoft's Most Valuable Professional (MVP) award since 2018 and earned the title of Auth0 Ambassador for his passion for sharing best practices in application security. Devlin has passed some prestigious software and cloud development exams, such as MSCD, Azure Associate Developer, AWS Associate Developer, and Terraform Associate. He has also authored the book ASP.NET Core and Vue.js and coauthored the book Practical Enterprise React in 2020 and 2021, amid the pandemic.
Read more about Devlin Basilan Duldulao

Seiji Ralph Villafranca
Seiji Ralph Villafranca
author image
Seiji Ralph Villafranca

Seiji Ralph Villafranca graduated Cum Laude with a degree of Bachelor of Science In Computer Science at University of Santo Tomas in the Philippines. He has 6 years of experience in Web and Mobile Development and has also earned the title of Auth0 Ambassador for having passions in application securities, He holds several certifications in Angular Development from Beginner to Expert Level. Seiji is also one of the Community Leaders of Angular Philippines which is the largest Angular group in the Philippines, the community has lead him to speak in different meetups of tech communities, workshops and even local and international conferences, he is enthusiastic in sharing knowledge in coding, organizing events and meetups for the community as well as writing content for students and professionals. He also has been a mentor in several hackathons as he loves the startup community. Seiji loves to develop new projects that are on web or mobile, he is currently a senior software engineer in a company based in Malaysia, He is not just a coder but also a mentor, teacher and trainer for students, professionals and companies.
Read more about Seiji Ralph Villafranca

View More author details
Right arrow

Setting Up the Development Environment

In the previous chapter, you learned about Spring Boot in a nutshell and its advantages. We also tackled the latest features of Java 17. The same goes for Angular; you had an overview of Angular and the benefits of using it to develop frontend applications.

This chapter will teach you how to set up your computer’s development environment to develop your full-stack Java and Angular application. We will tackle different IDEs and text editors to write our code and make sure everything has been configured before we start with the development.

Installing everything correctly from the beginning will help us avoid issues and write code without any interruptions.

In this chapter, we will cover the following topics:

  • Installing VS Code and IntelliJ IDEA
  • Installing Java 17
  • Installing SDKMAN
  • Setting up IntelliJ IDEA with Java 17
  • Installing REST Client VS Code or JetBrains and Angular DevTools
  • Installing Git version...

Technical requirements

The following are the links to the software you need to install:

  • Download VS Code (for Windows, Mac, and Linux): https://code.visualstudio.com/download
  • IntelliJ IDEA for Windows: https://www.jetbrains.com/idea/download/#section=windows
  • IntelliJ IDEA for Mac: https://www.jetbrains.com/idea/download/#section=mac
  • IntelliJ IDEA for Linux: https://www.jetbrains.com/idea/download/#section=linux
  • Download Java 17: https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html
  • Angular DevTools: https://chrome.google.com/webstore/detail/angular-devtools/ienfalfjdbdpebioblfackkekamfmbnh
  • Node.js and Node Package Manager: https://nodejs.org/en/
  • PostgreSQL for Windows: https://www.postgresql.org/download/windows/
  • PostgreSQL for Mac: https://www.postgresql.org/download/macosx/
  • PostgreSQL for Linux: https://www.postgresql.org/download/linux/
  • Git Version Control: https://git-scm.com/

Installing VS Code and IntelliJ IDEA

This section will guide you through the installation and configuration of VS Code or IntelliJ IDEA. We will look at the text editor and IDE breakdown of their features and plugins that you can use throughout the development.

VS Code

Download the VS Code installer from https://code.visualstudio.com/download. We suggest installing VS Code regardless of your machine’s OS, because VS Code is lightweight but offers many plugins for Angular development. In addition, VS Code is the most common text editor used by JavaScript developers. The editor supports TypeScript, code formatting, and code navigation and offers many extensions that you can use, especially in developing Angular applications. The following are some of the valuable extensions we can use throughout the development:

  • Code Spell Check: This is an extension for checking the spelling of our source code, which helps us avoid issues caused by typos.
  • Prettier: This is a...

Installing Java 17

This section will explain what Java 17 is and guide you through the installation of the kit on Windows, macOS, and Linux.

Java 17 is a Java Development Kit (JDK) required for building applications and components using the Java programming language. It is the latest long-term support (LTS) release, meaning that the vendor (Oracle) will support the version for a long time, including the patching of security issues.

Windows installation

Execute the following steps to install Java 17 on Windows:

  1. Go to https://www.oracle.com/java/technologies/downloads/#jdk17-windows:
Figure 2.2 – Java 17 installer

Figure 2.2 – Java 17 installer

  1. Select the installer base on your operating system and download it by clicking the link.

After successful download, open the installer and it will prompt you with a step-by-step installation that you can follow.

Figure 2.3 – Java 17 installation setup

Figure 2.3 – Java 17 installation setup

  1. Click Next,...

Installing SDKMAN

This section will explain what the purpose of SDKMAN is in developing Java applications. This section will also guide you through the installation of SDKMAN on Windows, macOS, and Linux.

SDKMAN (Software Development Kit Manager) is a tool for managing parallel versions of Java on our machine. We can have multiple versions of installed Java versions on our computer. You can also install Java directly using SDKMAN. It will automatically install the latest stable version or the version you specify.

SDKMAN is mainly created for Unix operating systems, but it also supports Bash and ZSH shells for other operating systems.

SDKMAN features

The following are the features of SDKMAN:

  • SDKMAN makes the installation of Java easier. We will only execute a command with the version we want to install, and it will do all the work.
  • SDKMAN also supports Java development packages. It can install SDKs for JVM, such as Groovy and Kotlin.
  • SDKMAN can run on all...

Setting up IntelliJ IDEA with Java 17

We have installed our IDE (IntelliJ IDEA) and Java 17 on our machine in the previous sections. Now, we will guide you on how to configure Java 17 on new and existing projects.

Using Java 17 on new projects

We only need the following few steps to use Java 17 on our new Java project:

  1. Open your IntelliJ IDEA terminal and select File | New | New Project.
Figure 2.5 – Creating a new project in IntelliJ IDEA

Figure 2.5 – Creating a new project in IntelliJ IDEA

We will see the preceding modal and select the type of project we need to develop. We can also see that we can choose the SDK version we need for our project.

  1. We will use Java 17, so we need to select OpenJDK-17.
  2. Click Next and configure your project name and directory. This will set up your Java application with the chosen SDK version.

We have now successfully configured our new project with JDK 17. Now we want to configure existing projects with JDK 17.

Using Java 17 on...

Installing REST Client VS Code or JetBrains and Angular DevTools

In this section, we will guide you through the installation of REST Client and Angular DevTools. REST Client is an essential tool in RESTful APIs. It is a tool for sending HTTP requests to the API you develop to debug the flow of your code on the endpoint as well as its response. There are several third-party platforms for API testing, such as Postman, but REST Client can be directly installed in your IDE.

Angular DevTools, on the other hand, is a Chrome extension for Angular that provides debugging and profiling capabilities for Angular applications. The extension supports Angular version 9 and later, and it is also Ivy enabled.

Installing REST Client in VS Code

We only need to follow these steps to install REST Client in VS Code:

  1. First, open VS Code Editor and go to the Extensions tab.
  2. Search for REST client.
  3. Select REST Client developed by Huachao Mao and install the extension.
...

Installing Git version control

Installing Git, a distributed version control system, will be the last thing we need in development. Git is important for developers as it is used to save your project’s different versions and stages of your repository. Git also helps you revert your repository’s recent working version if you made changes in your code that broke your app and you can’t fix them anymore.

Go to http://git-scm.com/ and click the Download button on the screen to download and install Git.

Now you have learned from this final section about Git version control, where to get it, what it does, and why it is crucial. Let’s summarize everything.

Summary

With this, we have reached the end of this chapter. Let’s have a recap of the valuable things you have learned. You have learned how to install VS Code, its features, and the essential extensions we can use in Angular development.

You have also learned how to install IntelliJ IDEA, its features, and the plugins that we will use in Java development. You have also learned how to install Java 17 and configure it with new and existing projects in IntelliJ IDEA.

SDKMAN is a development kit manager and it gives us the capability to switch JDK versions and install Java development packages directly. REST Client is a tool for testing RESTful APIs without downloading any third-party tools on our machine.

Angular DevTools is a Chrome extension for Angular that provides debugging and profiling capabilities for Angular applications. And last but not least, Git version control is a tool for creating histories of your code where you can quickly revert or create a new version...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Spring Boot and Angular
Published in: Dec 2022Publisher: PacktISBN-13: 9781803243214
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Devlin Basilan Duldulao

Devlin Basilan Duldulao is a full-stack engineer with over 8 years of web, mobile, and cloud development experience. He has been a recipient of Microsoft's Most Valuable Professional (MVP) award since 2018 and earned the title of Auth0 Ambassador for his passion for sharing best practices in application security. Devlin has passed some prestigious software and cloud development exams, such as MSCD, Azure Associate Developer, AWS Associate Developer, and Terraform Associate. He has also authored the book ASP.NET Core and Vue.js and coauthored the book Practical Enterprise React in 2020 and 2021, amid the pandemic.
Read more about Devlin Basilan Duldulao

author image
Seiji Ralph Villafranca

Seiji Ralph Villafranca graduated Cum Laude with a degree of Bachelor of Science In Computer Science at University of Santo Tomas in the Philippines. He has 6 years of experience in Web and Mobile Development and has also earned the title of Auth0 Ambassador for having passions in application securities, He holds several certifications in Angular Development from Beginner to Expert Level. Seiji is also one of the Community Leaders of Angular Philippines which is the largest Angular group in the Philippines, the community has lead him to speak in different meetups of tech communities, workshops and even local and international conferences, he is enthusiastic in sharing knowledge in coding, organizing events and meetups for the community as well as writing content for students and professionals. He also has been a mentor in several hackathons as he loves the startup community. Seiji loves to develop new projects that are on web or mobile, he is currently a senior software engineer in a company based in Malaysia, He is not just a coder but also a mentor, teacher and trainer for students, professionals and companies.
Read more about Seiji Ralph Villafranca