Full Stack Development with JHipster
eBook - ePub

Full Stack Development with JHipster

Deepu K Sasidharan, Sendil Kumar N

Share book
  1. 380 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Full Stack Development with JHipster

Deepu K Sasidharan, Sendil Kumar N

Book details
Book preview
Table of contents
Citations

About This Book

Discover the world of Full Stack Development with real-world examples.

Key Features

  • Leverage the full power of the JHipster platform to build complex web applications
  • Create microservices from scratch and convert JHipster monolith apps into microservices
  • Build and deploy applications locally, in Docker and on various cloud platforms.

Book Description

JHipster is a development platform to generate, develop, and deploy Spring Boot and Angular/React applications and Spring microservices. It provides you with a variety of tools that will help you quickly build modern web applications. This book will be your guide to building full stack applications with Spring and Angular using the JHipster tool set.

You will begin by understanding what JHipster is and the various tools and technologies associated with it. You will learn the essentials of a full stack developer before getting hands-on and building a monolithic web application with JHipster. From here you will learn the JHipster Domain Language with entity modeling and entity creation using JDL and JDL studio. Moving on, you will be introduced to client side technologies such as Angular and Bootstrap and will delve into technologies such as Spring Security, Spring MVC, and Spring Data. You will learn to build and package apps for production with various deployment options such as Heroku and more. During the course of the book, you will be introduced to microservice server-side technologies and how to break your monolithic application with a database of your choice. Next, the book takes you through cloud deployment with microservices on Docker and Kubernetes. Going forward, you will learn to build your client side with React and master JHipster best practices.

By the end of the book, you will be able to leverage the power of the best tools available to build modern web applications.

What you will learn

  • Build business logic by creating and developing entity models us the JHipster Domain Language
  • Customize web applications with Angular, Bootstrap and Spring
  • Tests and Continuous Integration with Jenkins
  • Utilize the JHipster microservice stack, which includes Netflix Eureka, Spring Cloud config, HashiCorp Consul, and so on.
  • Understand advanced microservice concepts such as API rout, load balancing, rate limit, circuit break, centralized configuration server, JWT authentication, and more
  • Run microservices locally using Docker and Kubernetes (in production)

Who this book is for

This book will appeal to developers who would like to build modern web applications quickly. A basic knowledge of the Spring ecosystem would be an added advantage.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Full Stack Development with JHipster an online PDF/ePUB?
Yes, you can access Full Stack Development with JHipster by Deepu K Sasidharan, Sendil Kumar N in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in Java. We have over one million books available in our catalogue for you to explore.

Information

Year
2018
ISBN
9781788470186
Edition
1

Building Monolithic Web Applications with JHipster

Let's get into action and build a production-grade web application using JHipster. Before we start, we need a use case. We will be building an e-commerce web application that manages products, customers, and their orders and invoices. The web application will use a MySQL database for production and will have an Angular front end. The UI for the actual shopping website will be different from the back office features, which will only be available for employees who have an administrator role. For this exercise, we will only be building a simple UI for the client-facing part. We will talk about other option as we go through this chapter.
In this chapter, we will:
  • See how to create a monolithic web application using JHipster
  • Walk through important aspects of the generated code
  • See the security aspects of the generated application
  • See how to run the application and tests
  • See the generated frontend screens
  • See the tools included that will ease further development
This chapter will require the use of a terminal (command prompt on windows) app throughout. You can the see previous chapter for more info about that.

Application generation

Before we start generating the application, we need to prepare our workspace as this workspace will be used throughout this book, and you will be creating many Git branches on this workspace as we proceed.
Visit http://rogerdudler.github.io/git-guide/ for a quick reference guide on Git commands.

Step 1 – preparing the workspace

Let's create a new folder for the workspace. Create a folder called e-commerce-app and from the terminal, navigate to the folder:
> mkdir e-commerce-app
> cd e-commerce-app
Now, create a new folder for our application; let's call it online-store and navigate to it:
> mkdir online-store
> cd online-store
Now, we are ready to invoke JHipster. Let's first make sure everything is ready by running the jhipster --version command. It should print a globally installed JHipster version, otherwise you'll need to follow the instructions from the previous chapter to set it up.
It is always better to use the latest versions of the tools as they might include important bug fixes. You can upgrade JHipster anytime using the command yarn global upgrade generator-jhipster

Step 2 – generating code using JHipster

Initialize JHipster by running the jhipster command into the terminal, which will produce the following output:
JHipster will ask a number questions to get input about different options which are required. The first question is about the application type that we want, and we are presented with the following four options:
  • Monolithic application: As the name suggests, it creates a monolithic web application with a Spring Boot-based backend and an SPA frontend.
  • Microservice application: This creates a Spring Boot microservice without any frontend, and is designed to work with a JHipster microservice architecture.
  • Microservice gateway: This creates a Spring Boot application very similar to the monolithic application but geared towards a microservice architecture with additional configurations. It features an SPA frontend.
  • JHipster UAA server: This creates an OAuth2 User authentication and Authorization service. This will not feature any frontend code and is designed to be used in a JHipster microservice architecture.
We will choose the monolithic application for our use case. We will talk and look at the other options in detail in Chapter 8, Introduction to Microservice Server-Side Technologies, of this book.
Run jhipster --help to see all available commands. Run jhipster <command> --help to see help information for a specific command; for example, jhipster app --help will display help information for the main app generation process.

Server-side options

The generator will ...

Table of contents