Full Stack Development with JHipster
eBook - ePub

Full Stack Development with JHipster

Build full stack applications and microservices with Spring Boot and modern JavaScript frameworks, 2nd Edition

Deepu K Sasidharan, Sendil Kumar N

Compartir libro
  1. 428 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Full Stack Development with JHipster

Build full stack applications and microservices with Spring Boot and modern JavaScript frameworks, 2nd Edition

Deepu K Sasidharan, Sendil Kumar N

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

Written by the core development team of JHipster and fully updated for JHipster 6, Java 11, and Spring Boot 2.1, this book will show you how to build modern web applications with real-world examples and best practices

Key Features

  • Build full stack applications with modern JavaScript frameworks such as Angular, React, and Vue.js
  • Explore the JHipster microservices stack, which includes Spring Cloud, Netflix OSS, and the Elastic Stack
  • Learn advanced local and cloud deployment strategies using Docker and Kubernetes

Book Description

JHipster is an open source development platform that allows you to easily create web apps and microservices from scratch without spending time on wiring and integrating different technologies. Updated to include JHipster 6, Java 11, Spring Boot 2.1, Vue.js, and Istio, this second edition of Full Stack Development with JHipster will help you build full stack applications and microservices seamlessly.

You'll start by understanding JHipster and its associated tools, along with the essentials of full stack development, before building a monolithic web app. You'll then learn the JHipster Domain Language (JDL) with entity modeling using JDL-Studio. With this book, you'll create production-ready web apps using Spring Boot, Spring Framework, Angular, and Bootstrap, and run tests and set up continuous integration pipelines with Jenkins. As you advance, you'll learn how to convert your monoliths to microservices and how to package your application for production with various deployment options, including Heroku and Google Cloud. You'll also learn about Docker and Kubernetes, along with an introduction to the Istio service mesh. Finally, you'll build your client-side with React and Vue.js and discover JHipster's best practices.

By the end of the book, you'll be able to leverage the best tools available to build modern web apps.

What you will learn

  • Create full stack apps from scratch using the latest features of JHipster 6 and Spring Boot 2.1
  • Build business logic by creating and developing entity models using JDL
  • Understand how to convert a monolithic architecture into a full-fledged microservices architecture
  • Build and package your apps for production using Docker
  • Deploy your application to Google Cloud with Kubernetes
  • Create continuous integration/continuous delivery pipelines with Jenkins
  • Create applications using Angular, React, and Vue.js client-side frameworks

Who this book is for

This book is for full stack developers who want to build web applications and microservices speedily without writing a lot of boilerplate code. If you're a backend developer looking to learn full stack development with JavaScript frameworks and libraries such as Angular, React, and Vue.js, you'll find this book useful. Experience in building Java web applications is required. Some exposure to the Spring Framework would be beneficial but not necessary to get the most out of this book.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Full Stack Development with JHipster un PDF/ePUB en línea?
Sí, puedes acceder a Full Stack Development with JHipster de Deepu K Sasidharan, Sendil Kumar N en formato PDF o ePUB, así como a otros libros populares de Computer Science y Computer Science General. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2020
ISBN
9781838820244
Edición
2

Section 1: Getting Started with the JHipster Platform

In this section, you will be introduced to the modern web application development architecture and the JHipster platform. Here, you will learn about the two widely used full stack web application development architectures and have a brief overview of different server-side, client-side, and database technology options.
This section comprises the following chapters:
  • Chapter 1, Introduction to Modern Web Application Development
  • Chapter 2, Getting Started with JHipster

Introduction to Modern Web Application Development

According to the Stack Overflow developer survey 2019 (https://insights.stackoverflow.com/survey/2019#developer-roles), full stack developer is the most popular developer title. The software industry defines a full stack developer as someone who can work on different areas of an application stack. The term stack refers to the different components and tools that make up an application.
In terms of web application development, the stack can be broadly classified into two areas—frontend and backend stack, also known as the client-side and server-side stack. The term frontend generally refers to the part of the code that is responsible for the user interface, and the term backend refers to the part that is responsible for the business logic, database interactions, user authentication, server configuration, and so on. There is also the DevOps part of the application, which includes continuous integration, production deployment, and so on. A full stack Java web application developer is expected to work on both frontend and backend technologies, ranging from writing HTML/JavaScript for the user interface to writing Java class files for business logic and SQL queries for database operations. They are also expected to work on DevOps, ranging from production deployments to setting up continuous integration and continuous delivery (CI/CD) as required.
With an ever-evolving software architecture landscape, the scope of technologies that a full stack web developer is expected to work with has increased dramatically. It is no longer enough that we can write HTML and JavaScript to build a user interface—we are expected to know client-side frameworks, such as Angular, React, and Vue.js. It is also not enough that we are proficient in enterprise Java and SQL—we are expected to know server-side frameworks, such as Spring, Hibernate, Play, and Quarkus.
In this chapter, we will introduce the following topics:
  • Modern full stack web development
  • Web architecture patterns
  • Choosing the right pattern

Modern full stack web development

The life of a full stack developer would be worthy of a whole book by itself, so let's leave that topic for another day.
Instead, let's look at a user story from a full stack Java web application and see what is involved.
Let's use an example of developing a user management module for a typical Java web application. Let's assume that you would be writing unit test cases for all of the code, and so we won't look at it in detail here:
  1. You would start by designing the architecture for the feature. You would decide on the plugins and frameworks to use, patterns to follow, and so on.
  2. You will be modeling the domain model for the feature depending on the database technology used.
  3. Then, you would create server-side code and database queries to persist and fetch data from the database.
  4. Once the data is ready, you would implement server-side code for any business logic.
  5. Then, you would implement an API that can be used to provide data for the presentation over an HTTP connection.
  6. You would write integration tests for the API.
  7. Since the backend is ready, you would start writing frontend code in JavaScript or similar technology.
  8. You would write client-side services to fetch data from the backend API.
  9. You would write client-side components to display the data on a web page.
  10. You would build the page and style it as per the design provided.
  11. You would write some automated end-to-end tests for the web page.
  12. You are not done yet. Once you have tested whether everything works locally, you would create pull requests or check the code into the version control system used.
  1. You would wait for the continuous integration process to verify everything and fix anything that is broken.
  2. Once everything is green and the code is accepted, you would typically start the deployment of this feature to a staging or acceptance environment, either on-premises or to a cloud provider using technologies like Docker and Kubernetes. If you choose the latter, you would be expected to be familiar with the cloud technologies used as well. You would also be upgrading the database schema as necessary and writing migration scripts when required.
  3. Once the feature is accepted, you might be responsible for deploying it into the production environment in a similar way, troubleshooting issues where necessary. In some teams, you might swap the steps with other team members so that you would be deploying a feature developed by your coworker while they deploy yours.
  4. You might also be responsible, along with your coworkers, for making sure that the production environment is up and running, including the database, virtual machines, and so on.
As you can see, it is no easy task. The range of responsibilities spans from making stylesheet updates on the client-side to running database migration scripts on a virtual machine in the production cloud service. If you are not familiar enough with the setup, then this would be a herculean task, and you would soon be lost in the vast ocean of frameworks, technologies, and design patterns out there.
Full stack development is not for the faint-hearted. It takes a lot of time and effort to keep yourself up to date with the various technologies and patterns in multiple disciplines of software development. The following are some of the common problems you might face as a full stack Java developer:
  • Client-side development is not just about writing plain HTML and JavaScript anymore. It is becoming as complex as server-side development, with build tools, transpilers, frameworks, and patterns.
  • There is a new framework almost every week in the JavaScript world, and if you are coming from a Java background, it could be very overwhelming for you.
  • Container technologies such as Docker revolutionized the software industry, but they also introduced a lot of new stuff to learn and keep track of, such as orchestration tools and container management tools.
  • Cloud services are growing day by day. To stay on track, you would have to familiarize yourself with their APIs and related orchestration tools.
  • Java server-side technologies have also undergone a major shift in recent times with the introduction of JVM languages, such as Scala, Groovy, and Kotlin, forcing you to keep yourself up to date with them. On the other side, server-side frameworks are becoming more feature-rich, and therefore more complex.
The most important thing of all is to make sure that all of these work well together when required. This task will need a lot of configuration, some glue code, and endless cups of coffee.
Transpilers are source-to-source compilers. Whereas a traditional compiler compiles from source to binary, a transpiler compiles from one type of source code to another type of source code. TypeScript and CoffeeScript are excellent examples of this; both compile down to JavaScript.
It's very easy to get lost here, and this is where technologies such as JHipster and Spring Boot step in to help. We will look at the details of these technologies in later chapters, but in short, they help by providing the wiring between moving parts so that you only need to concentrate on writing business code. JHipster also helps by providing the abstractions to deploy and manage the application to various cloud providers.

Web architecture patterns

The full stack landscape is further complicated by the different web architecture patterns commonly used these days. The widely used web application architecture patterns today can be broadly classified into two patterns—monolithic architecture and microservice architecture, the latter of which has become mainstream (fashionable) in recent years.

Monolithic web architecture

A monolithic architecture is the most widely used pattern for web applications because of its simplicity to develop and deploy. Though the actual moving parts will differ from application to application, the general pattern remains the same. In general, a monolithic web application can do the following:
  • It can support different clients, such as desktop/mobile browsers and native desktop/mobile applications.
  • It can expose APIs for third-party consumption.
  • It can integrate with other applications over REST/SOAP web services or message queues.
  • It can handle HTTP requests, execute business logic, access databases, and exchange data with other systems.
  • It can run on web application containers, such as Tomcat and JBoss.
  • It can be scaled vertically by increasing the power of the machines it runs on or scaled horizontally by adding additional instances behind load balancers.
REST (short for REpresentational State Transfer) relies on a stateless, client–server, cacheable communications protocol. HTTP is the most commonly used protocol for REST. It is a lightweight architectural style in which RESTful HTTP communication is used to transfer data between a client and a server, or between two systems.

SOAP (short for Simple Object Access Prot...

Índice