Book Image

Java EE 8 and Angular

By : Prashant Padmanabhan
Book Image

Java EE 8 and Angular

By: Prashant Padmanabhan

Overview of this book

The demand for modern and high performing web enterprise applications is growing rapidly. No more is a basic HTML frontend enough to meet customer demands. This book will be your one-stop guide to build outstanding enterprise web applications with Java EE and Angular. It will teach you how to harness the power of Java EE to build sturdy backends while applying Angular on the frontend. Your journey to building modern web enterprise applications starts here! The book starts with a brief introduction to the fundamentals of Java EE and all the new APIs offered in the latest release. Armed with the knowledge of Java EE 8, you will go over what it's like to build an end-to-end application, configure database connection for JPA, and build scalable microservices using RESTful APIs running in Docker containers. Taking advantage of the Payara Micro capabilities, you will build an Issue Management System, which will have various features exposed as services using the Java EE backend. With a detailed coverage of Angular fundamentals, the book will expand the Issue Management System by building a modern single page application frontend. Moving forward, you will learn to fit both the pieces together, that is, the frontend Angular application with the backend Java EE microservices. As each unit in a microservice promotes high cohesion, you will learn different ways in which independent units can be tested efficiently. Finishing off with concepts on securing your enterprise applications, this book is a handson guide for building modern web applications.
Table of Contents (16 chapters)

What this book covers

Chapter 1, What's in Java EE 8?, walks us through the enhancements that make the Java Enterprise Edition (EE) 8 release an important one.

Chapter 2, The CDI Advantage Combined with JPA, covers the usage of JPA for modeling our domain objects and structuring our code with CDI’s powerful set of services. This chapter will get us through the basics of JPA and CDI, which are fundamental to writing Java EE applications.

Chapter 3, Understanding Microservices, lets you step back and understand the broader picture of a solution before using it as a silver bullet for every problem. We explore some of the key fundamentals when implementing a microservice architecture while comparing it with its peers.

Chapter 4, Building and Deploying Microservices, helps us get our hands on to build our own services. Along the way, we look at the current solutions available, such as containers and frameworks, that help write scalable applications.

Chapter 5, Java EE Becomes JSON Friendly, JSON has made inroads into the Java EE world, finally making it a first-class citizen. Here, we cover the enhancements to JSON-P and look at the new standard JSON-B, both of which play an influential role for RESTful API development.

Chapter 6, Power Your API with JAXRS and CDI, covers these standards that are the most widely used ones for writing RESTful APIs. You will understand, how HTTP-centric mapping between URI and corresponding API classes, marked with annotations are used to work with this style.

Chapter 7, Putting It All Together with Payara, makes use of our knowledge of various Java EE capabilities. We build an end-to-end application based on a Microservice architecture. We not only write code but also document, run, and deploy it in Docker containers.

Chapter 8, Basic TypeScript, talks about how JavaScript rules the world of Web but does have its own challenges when writing complex client-side code. This chapter explores writing TypeScript code and its relation with JavaScript.

Chapter 9, Angular in a Nutshell, shows you how to leverage TypeScript and write single page applications in Angular. You will learn how to use Angular CLI and build components that make up an Angular application.

Chapter 10, Angular Forms, teaches the angular way of dealing with data submission, validation, capturing submitted value, and some rich features of Angular forms over the course of this chapter.

Chapter 11, Building a Real-World Application, helps us start building a frontend business application using our Angular skills. We explore the various facets of Angular templates and components that will be used to build an Issue Management System as a sample.

Chapter 12, Connecting Angular to Java EE Microservices, combines both worlds of Angular and Java EE as we put together the Issue Management System frontend and backend. We will look at how the HttpModule of Angular can be used for connecting to RESTful APIs.

Chapter 13, Testing Java EE Services, explores the fundamentals of testing and its relevance in an microservice architecture.

Chapter 14, Securing the Application, leverages token authentication for securing our frontend and backend application. This chapter goes over JSON Web Token and its usage in Angular and Java EE.